mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 08:43:02 +08:00
refactor(MetaAction): separate key attribute into name and location
Context: This change adapts MetaAction locating to support different MetaAction types, including loading from the local filesystem and from MCP tools.
This commit is contained in:
@@ -6,7 +6,6 @@ import org.junit.jupiter.api.Test;
|
||||
import work.slhaf.partner.core.action.entity.MetaAction;
|
||||
import work.slhaf.partner.core.action.entity.MetaActionType;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
@@ -30,10 +29,10 @@ public class LocalRunnerClientTest {
|
||||
private static @NotNull MetaAction buildTmpMetaAction() {
|
||||
MetaAction metaAction = new MetaAction();
|
||||
metaAction.setIo(false);
|
||||
metaAction.setKey("hello_world");
|
||||
metaAction.setName("hello_world");
|
||||
metaAction.setParams(Map.of("name", "origin_run"));
|
||||
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"));
|
||||
metaAction.setLocation("/home/slhaf/Projects/IdeaProjects/Projects/Partner/Partner-Main/src/test/java/resources/action/tmp/hello_world.py");
|
||||
return metaAction;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import work.slhaf.partner.core.action.entity.MetaAction;
|
||||
import work.slhaf.partner.core.action.entity.MetaActionInfo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -86,7 +85,7 @@ public class RunnerClientTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path buildTmpPath(MetaAction tempAction, String codeType) {
|
||||
public String buildTmpPath(MetaAction tempAction, String codeType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user