deeper-cli 1.0.0 → 1.0.1
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/cli/index.js +2 -5
- package/dist/cli/index.js.map +1 -1
- package/package.json +60 -60
- package/src/cli/chat-repl.ts +929 -932
package/dist/cli/index.js
CHANGED
|
@@ -10748,8 +10748,7 @@ async function startRepl(opts) {
|
|
|
10748
10748
|
];
|
|
10749
10749
|
const tds = toolsToDefs(tools);
|
|
10750
10750
|
let ce = 0, stag = 0;
|
|
10751
|
-
|
|
10752
|
-
for (let iter = 0; iter < MAX_ITER_SUB; iter++) {
|
|
10751
|
+
while (true) {
|
|
10753
10752
|
const msgs = buildMsgs(lh);
|
|
10754
10753
|
let fc = "", th = "";
|
|
10755
10754
|
let tcs = [];
|
|
@@ -10830,7 +10829,6 @@ async function startRepl(opts) {
|
|
|
10830
10829
|
const final = lh[lh.length - 1]?.content || "\u5B8C\u6210";
|
|
10831
10830
|
return final.slice(0, 800);
|
|
10832
10831
|
}
|
|
10833
|
-
return `\u8FBE\u5230\u6700\u5927\u8FED\u4EE3(${MAX_ITER_SUB})`;
|
|
10834
10832
|
};
|
|
10835
10833
|
if (isBg) {
|
|
10836
10834
|
run2().then((result) => {
|
|
@@ -11135,8 +11133,7 @@ ${prevSummary.slice(0, 800)}` });
|
|
|
11135
11133
|
}
|
|
11136
11134
|
async function runLoop(opts, history, tools, toolDefs, confirm) {
|
|
11137
11135
|
let ttc = 0, ce = 0, stagnation = 0;
|
|
11138
|
-
|
|
11139
|
-
for (let iter = 0; iter < MAX_ITER_MAIN; iter++) {
|
|
11136
|
+
for (let iter = 0; ; iter++) {
|
|
11140
11137
|
const ctxTokens = estimateTokens(history.map((m) => m.content || "").join("\n"));
|
|
11141
11138
|
const toolsTokenOverhead = toolDefs.length * 80;
|
|
11142
11139
|
const totalCtx = ctxTokens + toolsTokenOverhead;
|