agentscope-ai/agentscope-java

[Bug]:AgentScope2.0版本 ShellExecuteTool和LocalFilesystemWithShell win10下无法执行脚本命令

已关闭

#2,268 创建于 2026年7月17日

 (0 条评论) (0 个反应) (0 位负责人)Java (693 个派生)user submission
area/harnessbuggood first issue

仓库指标

星标
 (3,253 个星标)
PR 合并指标
 (平均合并 2天 8小时) (30 天内合并 58 个 PR)

描述

ShellExecuteTool :去除文件夹两侧的单引号,否则win10系统下无法执行命令 把 effectiveCommand = "cd '" + wd.replace("'", "'\''") + "' && " + command; 修改为: effectiveCommand = "cd " + wd.replace("'", "'\''") + " && " + command;

LocalFilesystemWithShell:win10运行条件下,指定编码是GBK否则中文乱码,导致llm不知道问题出在哪 把 stdout = new String(proc.getInputStream().readAllBytes()); stderr = new String(proc.getErrorStream().readAllBytes()); 修改为 if(isWin){ stdout = new String(proc.getInputStream().readAllBytes(), Charset.forName("GBK")); stderr = new String(proc.getErrorStream().readAllBytes(), Charset.forName("GBK")); }else{ stdout = new String(proc.getInputStream().readAllBytes(), StandardCharsets.UTF_8); stderr = new String(proc.getErrorStream().readAllBytes(), StandardCharsets.UTF_8); }

贡献者指南