codeep 1.2.72 → 1.2.74
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/dist/utils/agentChat.js +1 -0
- 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/dist/utils/agentChat.js
CHANGED
|
@@ -123,6 +123,7 @@ export function getAgentSystemPrompt(projectContext) {
|
|
|
123
123
|
7. NEVER use execute_command for: ls, find, cat, grep, mkdir, rm, cp, mv, touch
|
|
124
124
|
8. Use execute_command ONLY for: npm, git, composer, pip, cargo (build/package managers)
|
|
125
125
|
9. When the task is complete, respond with a summary WITHOUT any tool calls
|
|
126
|
+
10. CRITICAL: If the task is NOT complete, you MUST call a tool — never respond with only text mid-task. Do not "think out loud" or describe what you are about to do without calling a tool. Act immediately.
|
|
126
127
|
|
|
127
128
|
## Project Information
|
|
128
129
|
Name: ${projectContext.name || 'Unknown'}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.74",
|
|
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",
|