codeep 1.2.72 → 1.2.73
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/utils/agent.js +11 -11
- package/package.json +1 -1
package/dist/utils/agent.js
CHANGED
|
@@ -342,17 +342,17 @@ export async function runAgent(prompt, projectContext, options = {}) {
|
|
|
342
342
|
.replace(/\{'path'[\s\S]*?\}/g, '')
|
|
343
343
|
.replace(/```(?:json|tool_call)?\s*\{[\s\S]*?\}\s*```/g, '') // Only strip tool-call-like code blocks
|
|
344
344
|
.trim();
|
|
345
|
-
//
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
const hasIncompleteWork =
|
|
345
|
+
// Detect incomplete response using language-agnostic structural signals only.
|
|
346
|
+
// Keyword lists are brittle (language-dependent) — rely on punctuation/length instead.
|
|
347
|
+
const trimmed = finalResponse.trimEnd();
|
|
348
|
+
// A response ending with ':' means the model was about to list steps or execute tools
|
|
349
|
+
const endsWithColon = trimmed.endsWith(':');
|
|
350
|
+
// A very short response (< 120 chars) with no sentence-ending punctuation is likely
|
|
351
|
+
// a mid-thought fragment, not a real conclusion
|
|
352
|
+
const lastChar = trimmed.slice(-1);
|
|
353
|
+
const hasProperEnding = ['.', '!', '?', '"', '\'', '`', ')'].includes(lastChar);
|
|
354
|
+
const isShortFragment = trimmed.length < 120 && !hasProperEnding;
|
|
355
|
+
const hasIncompleteWork = (endsWithColon || isShortFragment)
|
|
356
356
|
&& incompleteWorkRetries < maxIncompleteWorkRetries;
|
|
357
357
|
if (hasIncompleteWork) {
|
|
358
358
|
debug('Model wants to continue, prompting for next action');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.73",
|
|
4
4
|
"description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|