@zhongqian97-code/ecode 0.5.35 → 0.5.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1837,28 +1837,29 @@ ${prompt}` : prompt;
|
|
|
1837
1837
|
};
|
|
1838
1838
|
const executeToolCall = async (tc) => {
|
|
1839
1839
|
let result;
|
|
1840
|
-
|
|
1840
|
+
const toolName = tc.name.toLowerCase().trim();
|
|
1841
|
+
if (toolName === "bash") {
|
|
1841
1842
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1842
1843
|
result = await handleBashTool(tcArgs.command, bashDeps);
|
|
1843
|
-
} else if (
|
|
1844
|
+
} else if (toolName === "read") {
|
|
1844
1845
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1845
1846
|
result = await readFile3(tcArgs);
|
|
1846
|
-
} else if (
|
|
1847
|
+
} else if (toolName === "write") {
|
|
1847
1848
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1848
1849
|
result = await writeFile2(tcArgs);
|
|
1849
|
-
} else if (
|
|
1850
|
+
} else if (toolName === "edit") {
|
|
1850
1851
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1851
1852
|
result = await editFile(tcArgs);
|
|
1852
|
-
} else if (
|
|
1853
|
+
} else if (toolName === "glob") {
|
|
1853
1854
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1854
1855
|
result = await globFiles(tcArgs);
|
|
1855
|
-
} else if (
|
|
1856
|
+
} else if (toolName === "grep") {
|
|
1856
1857
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1857
1858
|
result = await grepFiles(tcArgs);
|
|
1858
|
-
} else if (
|
|
1859
|
+
} else if (toolName === "apply_patch") {
|
|
1859
1860
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1860
1861
|
result = await applyPatch(tcArgs);
|
|
1861
|
-
} else if (
|
|
1862
|
+
} else if (toolName === "todo") {
|
|
1862
1863
|
const tcArgs = JSON.parse(tc.arguments);
|
|
1863
1864
|
result = todo(tcArgs);
|
|
1864
1865
|
} else {
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
todo,
|
|
35
35
|
webFetch,
|
|
36
36
|
writeFile
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-BRSZMOHF.js";
|
|
38
38
|
import {
|
|
39
39
|
createSessionMetadata,
|
|
40
40
|
generateTitle,
|
|
@@ -493,7 +493,8 @@ var SessionRuntime = class {
|
|
|
493
493
|
* 其他工具:直接执行,不需要审批流程。
|
|
494
494
|
*/
|
|
495
495
|
async executeToolCall(tc, signal) {
|
|
496
|
-
const
|
|
496
|
+
const name = tc.name.toLowerCase().trim();
|
|
497
|
+
const args = tc.arguments;
|
|
497
498
|
try {
|
|
498
499
|
if (name === "bash") {
|
|
499
500
|
const parsed = JSON.parse(args);
|
|
@@ -901,6 +902,6 @@ Node.js 16/18 \u8BF7\u4F7F\u7528 --web \u6216 --pipe \u6A21\u5F0F\u3002
|
|
|
901
902
|
);
|
|
902
903
|
process.exit(1);
|
|
903
904
|
}
|
|
904
|
-
const { App, React, render } = await import("./ui-
|
|
905
|
+
const { App, React, render } = await import("./ui-QZG4SHLC.js");
|
|
905
906
|
render(React.createElement(App, { config: finalConfig, version: VERSION, autoMode, registry, trustedSkillDirs, initialMessages }));
|
|
906
907
|
}
|