codeep 1.0.4 → 1.0.5

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.
@@ -8,8 +8,8 @@ import { startSession, endSession, undoLastAction, undoAllActions, getCurrentSes
8
8
  import { runAllVerifications, formatErrorsForAgent, hasVerificationErrors, getVerificationSummary } from './verify.js';
9
9
  import { gatherSmartContext, formatSmartContext, extractTargetFile } from './smartContext.js';
10
10
  const DEFAULT_OPTIONS = {
11
- maxIterations: 20,
12
- maxDuration: 5 * 60 * 1000, // 5 minutes
11
+ maxIterations: 50, // Increased for complex tasks like website creation
12
+ maxDuration: 10 * 60 * 1000, // 10 minutes
13
13
  };
14
14
  /**
15
15
  * Generate system prompt for agent mode (used with native tool calling)
@@ -38,7 +38,8 @@ function getAgentSystemPrompt(projectContext) {
38
38
  2. Use edit_file for modifications to existing files (preserves other content)
39
39
  3. Use write_file only for creating new files or complete overwrites
40
40
  4. Use create_directory to create new folders/directories
41
- 5. When the task is complete, respond with a summary of what you did
41
+ 5. When the task is complete, respond with a summary WITHOUT any tool calls
42
+ 6. IMPORTANT: After finishing, your response must NOT include any tool calls - just provide a summary
42
43
 
43
44
  ## Self-Verification
44
45
  After you make changes, the system will automatically run build and tests.
@@ -443,6 +444,13 @@ export async function runAgent(prompt, projectContext, options = {}) {
443
444
  finalResponse = content.replace(/<think>[\s\S]*?<\/think>/gi, '').trim();
444
445
  break;
445
446
  }
447
+ // Also check if response indicates completion (even with tool calls)
448
+ const completionIndicators = ['task completed', 'finished', 'done with', 'successfully created', 'all set'];
449
+ const lowerContent = content.toLowerCase();
450
+ if (completionIndicators.some(indicator => lowerContent.includes(indicator))) {
451
+ // Agent thinks task is complete, but included tool calls - execute them and finish
452
+ // Continue with tool execution but mark this as potentially the last iteration
453
+ }
446
454
  // Add assistant response to history
447
455
  messages.push({ role: 'assistant', content });
448
456
  // Execute tool calls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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",