zames_pro 2.15.0 → 2.15.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/agent-loop.js +5 -1
- package/package.json +1 -1
package/dist/agent-loop.js
CHANGED
|
@@ -310,11 +310,15 @@ export async function runAgentLoop({ browser, tools, task, workdir, maxIteration
|
|
|
310
310
|
MAX_MALFORMED_RETRIES +
|
|
311
311
|
')');
|
|
312
312
|
}
|
|
313
|
+
const large = String(rawResponse || '').length > 3000;
|
|
314
|
+
const truncHint = large
|
|
315
|
+
? 'Your call was too long and got cut off. Do NOT resend the same huge call: split it. For a large file use Write with small content_base64 pieces, or write several smaller files. Keep each tool call under about 2000 characters.'
|
|
316
|
+
: 'For example: a small JSON tool-call object';
|
|
313
317
|
message =
|
|
314
318
|
'Your previous answer was not recognized as a tool call. ' +
|
|
315
319
|
'Reply with EXACTLY one JSON tool-call object, no text before or after. ' +
|
|
316
320
|
'Do NOT use XML/DSML tags — plain JSON only. ' +
|
|
317
|
-
|
|
321
|
+
truncHint;
|
|
318
322
|
continue;
|
|
319
323
|
}
|
|
320
324
|
const trimmed = (rawResponse || '').trim();
|