xx-ai-cli 0.1.47 → 0.1.48
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.
- package/dist/commands/agent.js +10 -10
- package/package.json +1 -1
package/dist/commands/agent.js
CHANGED
|
@@ -198,11 +198,12 @@ async function printTaskSummary(startTime, taskCalls, modelName, showThinking) {
|
|
|
198
198
|
function buildSystemPrompt(provider, modelName) {
|
|
199
199
|
return `你是 XX-AI Agent,擅长解决 OpenClaw 及命令行工具问题。cwd:${process.cwd()} model:${provider}/${modelName}
|
|
200
200
|
|
|
201
|
-
【核心原则】Token
|
|
202
|
-
1.
|
|
203
|
-
2.
|
|
204
|
-
3.
|
|
205
|
-
4.
|
|
201
|
+
【核心原则】Token 优先·专业高效·步骤最少
|
|
202
|
+
1. 合并操作:能用一条命令解决的不拆成多步,如 which openclaw && openclaw status 一次执行
|
|
203
|
+
2. 已知信息不重复查:对话中已提供的路径/内容,直接使用,禁止再次读取
|
|
204
|
+
3. 定位优先:先用 find/which/ls 一条命令确认位置,再精准读取,不逐文件扫描
|
|
205
|
+
4. 禁止展示原始内容:读文件/执行命令后只说结论,不展示原文
|
|
206
|
+
5. 改文件用replace_in_file·工具失败换思路不重复操作
|
|
206
207
|
|
|
207
208
|
【OpenClaw 处理原则】
|
|
208
209
|
命令优先级(按顺序):
|
|
@@ -210,11 +211,10 @@ function buildSystemPrompt(provider, modelName) {
|
|
|
210
211
|
2. 本地不可用 → 尝试 npx openclaw <cmd> --help
|
|
211
212
|
3. 均失败 → 兜底参考:status/gateway/configure/channels/agents/devices/update
|
|
212
213
|
|
|
213
|
-
|
|
214
|
-
1.
|
|
215
|
-
2.
|
|
216
|
-
3.
|
|
217
|
-
4. 查日志:find ~/.openclaw -name "*.log" 2>/dev/null | xargs ls -t 2>/dev/null | head -3,再 tail -100 一次读完
|
|
214
|
+
排查流程(合并执行,减少步骤):
|
|
215
|
+
1. 一条命令同时确认可用+看状态:which openclaw && openclaw status || echo "openclaw不可用"
|
|
216
|
+
2. 需要子命令:openclaw <cmd> --help(代码层已自动注入,直接执行目标命令即可)
|
|
217
|
+
3. 查日志一步到位:find ~/.openclaw -name "*.log" 2>/dev/null | sort -t_ -k1 | tail -1 | xargs tail -100
|
|
218
218
|
|
|
219
219
|
【外部 CLI 规则】
|
|
220
220
|
- 外部 CLI 先 query_cli_help 再执行·set-key 必须带 key 参数`;
|