codeep 1.2.71 → 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/renderer/agentExecution.js +7 -0
- package/dist/utils/agent.js +11 -11
- package/package.json +1 -1
|
@@ -263,6 +263,11 @@ export async function executeAgentTask(task, dryRun, ctx) {
|
|
|
263
263
|
},
|
|
264
264
|
abortSignal: abortController.signal,
|
|
265
265
|
});
|
|
266
|
+
// Hide agent progress panel before adding completion message so the full
|
|
267
|
+
// message area is used when rendering (avoids truncated finalResponse)
|
|
268
|
+
ctx.setAgentRunning(false);
|
|
269
|
+
ctx.setAbortController(null);
|
|
270
|
+
app.setAgentRunning(false);
|
|
266
271
|
if (result.success) {
|
|
267
272
|
const fileChanges = result.actions.filter(a => a.type === 'write' || a.type === 'edit' || a.type === 'delete');
|
|
268
273
|
const otherActions = result.actions.filter(a => a.type !== 'write' && a.type !== 'edit' && a.type !== 'delete');
|
|
@@ -336,9 +341,11 @@ export async function executeAgentTask(task, dryRun, ctx) {
|
|
|
336
341
|
app.notify(`Agent error: ${err.message}`, 5000);
|
|
337
342
|
}
|
|
338
343
|
finally {
|
|
344
|
+
// Ensure cleanup even if an exception occurs (may already be false from success path)
|
|
339
345
|
ctx.setAgentRunning(false);
|
|
340
346
|
ctx.setAbortController(null);
|
|
341
347
|
app.setAgentRunning(false);
|
|
348
|
+
app.render();
|
|
342
349
|
}
|
|
343
350
|
}
|
|
344
351
|
// ─── Skill execution ──────────────────────────────────────────────────────────
|
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",
|