coder-agent 2.3.5 → 2.4.0

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/agent.js CHANGED
@@ -405,14 +405,41 @@ export class Agent {
405
405
  this.memory.add({ role: "user", content: enrichedPrompt });
406
406
  let iterations = 0;
407
407
  const MAX_ITERATIONS = 12;
408
+ let waitCount = 0;
409
+ const MAX_WAITS = 3;
408
410
  const modifiedFiles = new Set();
409
411
  let cleanContent = "";
410
- while (iterations < MAX_ITERATIONS) {
412
+ while (true) {
411
413
  if (signal?.aborted) {
412
414
  const abortErr = new Error("The user aborted a request.");
413
415
  abortErr.name = "AbortError";
414
416
  throw abortErr;
415
417
  }
418
+ if (iterations >= MAX_ITERATIONS) {
419
+ if (waitCount < MAX_WAITS) {
420
+ waitCount++;
421
+ iterations = 0;
422
+ console.log(chalk.dim('\n' + '─'.repeat(48) + '\n'));
423
+ startSpinner("thinking...");
424
+ // Silent wait for 30-40 seconds
425
+ const delayMs = 30000 + Math.random() * 10000;
426
+ const checkInterval = 100;
427
+ let elapsed = 0;
428
+ while (elapsed < delayMs) {
429
+ if (signal?.aborted) {
430
+ const abortErr = new Error("The user aborted a request.");
431
+ abortErr.name = "AbortError";
432
+ throw abortErr;
433
+ }
434
+ await new Promise(resolve => setTimeout(resolve, checkInterval));
435
+ elapsed += checkInterval;
436
+ }
437
+ continue;
438
+ }
439
+ else {
440
+ break;
441
+ }
442
+ }
416
443
  iterations++;
417
444
  updateSpinner("thinking...");
418
445
  const responseObj = await callGeminiAPIWithRotation(this.apiKey, {
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ function printBanner(modelName) {
35
35
  });
36
36
  console.log('');
37
37
  console.log(' ' + chalk.white.bold('coder-agent') +
38
- chalk.dim(' v1.1.0 · by antigravity'));
38
+ chalk.dim(' v1.1.0'));
39
39
  console.log('');
40
40
  console.log(chalk.dim(' ─────────────────────────────────────'));
41
41
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-agent",
3
- "version": "2.3.5",
3
+ "version": "2.4.0",
4
4
  "description": "CLI coding agent powered by Google Gemini",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",