deeper-cli 1.2.3 → 1.2.5
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/chinese_chess_ai/README.md +62 -0
- package/chinese_chess_ai/config.py +63 -0
- package/chinese_chess_ai/requirements.txt +1 -0
- package/dist/cli/index.js +10 -2
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/chat-repl.ts +2 -2
- package/src/model/DeepSeekClient.ts +5 -0
package/package.json
CHANGED
package/src/cli/chat-repl.ts
CHANGED
|
@@ -719,7 +719,7 @@ async function runLoop(
|
|
|
719
719
|
const results = await Promise.allSettled(safe.map(async tc => { const r = await execTool(tc, tools, opts); doneTools++; return r; }));
|
|
720
720
|
for (const r of results) {
|
|
721
721
|
if (r.status === 'fulfilled') { history.push(r.value); ttc++; GS.tc++; }
|
|
722
|
-
else { history.push({ role: 'tool', content: `Error: ${String(r.reason)}`, tool_call_id: 'parallel' }); }
|
|
722
|
+
else { history.push({ role: 'tool', content: `Error: ${String(r.reason)}`, tool_call_id: 'parallel', name: 'parallel' }); }
|
|
723
723
|
}
|
|
724
724
|
} else if (safe.length === 1) {
|
|
725
725
|
const r = await execTool(safe[0], tools, opts);
|
|
@@ -952,7 +952,7 @@ After writing or editing code files, ALWAYS verify the changes:
|
|
|
952
952
|
}
|
|
953
953
|
r.push(e);
|
|
954
954
|
}
|
|
955
|
-
return r;
|
|
955
|
+
return r.map(m => { if (m.role === 'tool' && !m.name) m.name = 'tool'; return m; });
|
|
956
956
|
}
|
|
957
957
|
|
|
958
958
|
function trimHistory(h: Message[], max: number) { while (h.length > max) h.shift(); }
|
|
@@ -210,6 +210,11 @@ export class DeepSeekClient {
|
|
|
210
210
|
const rc = m.reasoning_content || m.thinking;
|
|
211
211
|
if (rc) msg.reasoning_content = rc;
|
|
212
212
|
return msg;
|
|
213
|
+
}).map((msg) => {
|
|
214
|
+
if (msg.role === 'tool' && !msg.name) {
|
|
215
|
+
(msg as Record<string, unknown>).name = 'tool';
|
|
216
|
+
}
|
|
217
|
+
return msg;
|
|
213
218
|
}),
|
|
214
219
|
temperature: config.temperature,
|
|
215
220
|
max_tokens: config.maxTokens,
|