chore(MetaAction): remove unused order attribute

This commit is contained in:
2025-12-19 20:53:01 +08:00
parent 225802c1a8
commit dc4074715e
3 changed files with 1 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
package work.slhaf.partner.core.action.entity;
import lombok.Data;
import org.jetbrains.annotations.NotNull;
import java.nio.file.Path;
import java.util.Map;
@@ -12,7 +11,7 @@ import static work.slhaf.partner.common.Constant.Path.ACTION_PROGRAM;
* 行动链中的单一元素,封装了调用外部行动程序的必要信息与结果容器,可被{@link work.slhaf.partner.core.action.ActionCapability}执行
*/
@Data
public class MetaAction implements Comparable<MetaAction> {
public class MetaAction {
/**
* 行动key用于标识与定位行动程序
@@ -26,10 +25,6 @@ public class MetaAction implements Comparable<MetaAction> {
* 行动结果,包括执行状态和相应内容(执行结果或者错误信息)
*/
private Result result = new Result();
/**
* 执行顺序,升序排列
*/
private int order;
/**
* 是否IO密集用于决定使用何种线程池
*/
@@ -48,11 +43,6 @@ public class MetaAction implements Comparable<MetaAction> {
};
}
@Override
public int compareTo(@NotNull MetaAction metaAction) {
return this.order - metaAction.order;
}
@Data
public static class Result {
private ResultStatus status = ResultStatus.WAITING;

View File

@@ -69,7 +69,6 @@ public class DynamicActionGenerator extends AgentRunningSubModule<GeneratorInput
tempAction.setKey(input.getKey());
tempAction.setParams(input.getParams());
tempAction.setIo(true);
tempAction.setOrder(-1);
tempAction.setType(MetaActionType.ORIGIN);
return tempAction;
}

View File

@@ -32,7 +32,6 @@ public class LocalRunnerClientTest {
metaAction.setIo(false);
metaAction.setKey("hello_world");
metaAction.setParams(Map.of("name", "origin_run"));
metaAction.setOrder(-1);
metaAction.setType(MetaActionType.ORIGIN);
metaAction.setPath(Path.of("/home/slhaf/Projects/IdeaProjects/Projects/Partner/Partner-Main/src/test/java/resources/action/tmp/hello_world.py"));
return metaAction;