coder-agent 2.3.5 → 2.5.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
@@ -244,7 +244,9 @@ async function callGeminiAPIWithRotation(apiKey, params, maxRetries = 3, initial
244
244
  "gemini-2.5-flash",
245
245
  "gemini-2.5-pro",
246
246
  "gemini-3.5-flash",
247
- "gemini-3.1-flash-lite"
247
+ "gemini-3.1-flash-lite",
248
+ "gemma-4-31b-it",
249
+ "gemma-4-26b-a4b-it"
248
250
  ];
249
251
  let currentModel = params.model;
250
252
  let modelIndex = rotationList.indexOf(currentModel);
@@ -405,14 +407,41 @@ export class Agent {
405
407
  this.memory.add({ role: "user", content: enrichedPrompt });
406
408
  let iterations = 0;
407
409
  const MAX_ITERATIONS = 12;
410
+ let waitCount = 0;
411
+ const MAX_WAITS = 3;
408
412
  const modifiedFiles = new Set();
409
413
  let cleanContent = "";
410
- while (iterations < MAX_ITERATIONS) {
414
+ while (true) {
411
415
  if (signal?.aborted) {
412
416
  const abortErr = new Error("The user aborted a request.");
413
417
  abortErr.name = "AbortError";
414
418
  throw abortErr;
415
419
  }
420
+ if (iterations >= MAX_ITERATIONS) {
421
+ if (waitCount < MAX_WAITS) {
422
+ waitCount++;
423
+ iterations = 0;
424
+ console.log(chalk.dim('\n' + '─'.repeat(48) + '\n'));
425
+ startSpinner("thinking...");
426
+ // Silent wait for 30-40 seconds
427
+ const delayMs = 30000 + Math.random() * 10000;
428
+ const checkInterval = 100;
429
+ let elapsed = 0;
430
+ while (elapsed < delayMs) {
431
+ if (signal?.aborted) {
432
+ const abortErr = new Error("The user aborted a request.");
433
+ abortErr.name = "AbortError";
434
+ throw abortErr;
435
+ }
436
+ await new Promise(resolve => setTimeout(resolve, checkInterval));
437
+ elapsed += checkInterval;
438
+ }
439
+ continue;
440
+ }
441
+ else {
442
+ break;
443
+ }
444
+ }
416
445
  iterations++;
417
446
  updateSpinner("thinking...");
418
447
  const responseObj = await callGeminiAPIWithRotation(this.apiKey, {
package/dist/index.js CHANGED
@@ -10,7 +10,9 @@ const VALID_MODELS = [
10
10
  "gemini-3.5-flash",
11
11
  "gemini-3.1-flash-lite",
12
12
  "gemini-2.0-flash",
13
- "gemini-2.0-pro-exp"
13
+ "gemini-2.0-pro-exp",
14
+ "gemma-4-31b-it",
15
+ "gemma-4-26b-a4b-it"
14
16
  ];
15
17
  function printBanner(modelName) {
16
18
  console.clear();
@@ -35,7 +37,7 @@ function printBanner(modelName) {
35
37
  });
36
38
  console.log('');
37
39
  console.log(' ' + chalk.white.bold('coder-agent') +
38
- chalk.dim(' v1.1.0 · by antigravity'));
40
+ chalk.dim(' v1.1.0'));
39
41
  console.log('');
40
42
  console.log(chalk.dim(' ─────────────────────────────────────'));
41
43
  console.log('');
@@ -67,11 +69,13 @@ function printHelp() {
67
69
  console.log(chalk.white(" --set-key <api_key> — Save your Gemini API Key globally"));
68
70
  console.log(chalk.white(" --set-gemini-key <api_key> — Save your Gemini API Key globally (alias)"));
69
71
  console.log("");
70
- console.log(chalk.gray(" Popular Gemini Models:"));
72
+ console.log(chalk.gray(" Popular Gemini & Gemma Models:"));
71
73
  console.log(chalk.white(" gemini-3.5-flash — Newest, highly capable & fast"));
72
74
  console.log(chalk.white(" gemini-2.5-flash — Default, highly capable & fast"));
73
75
  console.log(chalk.white(" gemini-2.5-pro — Reasoning model, excellent coding"));
74
76
  console.log(chalk.white(" gemini-3.1-flash-lite — Light-weight, high volume"));
77
+ console.log(chalk.white(" gemma-4-31b-it — Gemma 4 31B instruction-tuned"));
78
+ console.log(chalk.white(" gemma-4-26b-a4b-it — Gemma 4 26B Mixture-of-Experts"));
75
79
  console.log(chalk.white(" gemini-2.0-flash — (Deprecated) Ultra-fast, lightweight"));
76
80
  console.log(chalk.white(" gemini-2.0-pro-exp — (Deprecated) Experimental reasoning"));
77
81
  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.5.0",
4
4
  "description": "CLI coding agent powered by Google Gemini",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",