refactor(runner): rename method buildFileExecutionCommands in CommandExecutionService

This commit is contained in:
2026-03-16 16:52:04 +08:00
parent c4b8c2a858
commit 108cf9b071
3 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicInteger;
public class CommandExecutionService {
public String[] buildCommands(String launcher, Map<String, Object> params, String absolutePath) {
public String[] buildFileExecutionCommands(String launcher, Map<String, Object> params, String absolutePath) {
int paramSize = params == null ? 0 : params.size();
String[] commands = new String[paramSize + 2];
commands[0] = launcher;

View File

@@ -21,7 +21,7 @@ public class OriginExecutionService {
public RunnerClient.RunnerResponse run(MetaAction metaAction) {
RunnerClient.RunnerResponse response = new RunnerClient.RunnerResponse();
File file = new File(metaAction.getLocation());
String[] commands = commandExecutionService.buildCommands(metaAction.getLauncher(), metaAction.getParams(), file.getAbsolutePath());
String[] commands = commandExecutionService.buildFileExecutionCommands(metaAction.getLauncher(), metaAction.getParams(), file.getAbsolutePath());
WrappedLaunchSpec wrapped = ExecutionPolicyRegistry.INSTANCE.prepare(Arrays.stream(commands).toList());
List<String> wrappedCommands = new ArrayList<>();
wrappedCommands.add(wrapped.getCommand());

View File

@@ -314,7 +314,7 @@ public class DynamicActionMcpManager implements AutoCloseable {
if (arguments == null) {
arguments = Map.of();
}
String[] commands = commandExecutionService.buildCommands(launcher, arguments, program.getAbsolutePath());
String[] commands = commandExecutionService.buildFileExecutionCommands(launcher, arguments, program.getAbsolutePath());
if (commands == null) {
return Mono.just(McpSchema.CallToolResult.builder()
.addTextContent("未知文件类型: " + program.getName())