codeep 1.0.19 → 1.0.20

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.
@@ -508,12 +508,15 @@ export async function runAgent(prompt, projectContext, options = {}) {
508
508
  const taskKeywords = ['create', 'build', 'make', 'implement', 'add', 'generate', 'write', 'setup', 'develop', 'kreiraj', 'napravi', 'dodaj', 'website', 'app', 'feature'];
509
509
  const promptLowerCase = prompt.toLowerCase();
510
510
  const isCreationTask = taskKeywords.some(kw => promptLowerCase.includes(kw));
511
- const hasCreatedFiles = actions.some(a => a.type === 'write' || a.type === 'mkdir');
511
+ // Only count actual FILE writes, not directories
512
+ const hasCreatedFiles = actions.some(a => a.type === 'write');
512
513
  const writeFileCount = actions.filter(a => a.type === 'write').length;
514
+ const hasMkdir = actions.some(a => a.type === 'mkdir');
513
515
  const isVeryEarlyIteration = iteration <= 5; // Extended to 5 iterations
514
- console.error(`[DEBUG] Task check: isCreationTask=${isCreationTask}, hasCreatedFiles=${hasCreatedFiles}, writeFileCount=${writeFileCount}, iteration=${iteration}`);
515
- // STRICT RULE: If it's a creation task, agent MUST create files
516
- // Don't accept early stopping even if it has "done some actions"
516
+ console.error(`[DEBUG] Task check: isCreationTask=${isCreationTask}, hasCreatedFiles=${hasCreatedFiles}, writeFileCount=${writeFileCount}, hasMkdir=${hasMkdir}, iteration=${iteration}`);
517
+ console.error(`[DEBUG] Actions breakdown:`, actions.map(a => `${a.type}:${a.target}`).join(', '));
518
+ // STRICT RULE: If it's a creation task, agent MUST create FILES (not just directories)
519
+ // Creating a directory is not enough - we need actual file content
517
520
  if (isCreationTask && !hasCreatedFiles && iteration <= 10) {
518
521
  console.error(`[DEBUG] BLOCKING early stop - creation task detected but NO files created yet (iteration ${iteration}, ${actions.length} actions)`);
519
522
  // Force agent to create files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
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",