commit-agent-cli 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -455,32 +455,30 @@ var packageJson = JSON.parse(
455
455
  );
456
456
  var notifier = updateNotifier({
457
457
  pkg: packageJson,
458
- updateCheckInterval: 1e3 * 60 * 60
459
- // Check once per hour (was 24h)
458
+ updateCheckInterval: 0
459
+ // Always check for updates (no cache)
460
460
  });
461
461
  if (notifier.update && notifier.update.current !== notifier.update.latest) {
462
462
  const currentVersion = notifier.update.current;
463
463
  const latestVersion = notifier.update.latest;
464
- const boxWidth = 67;
465
- const padLine = (content, width) => {
466
- const visibleLength = content.replace(/\u001b\[[0-9;]*m/g, "").length;
467
- const padding = width - visibleLength;
468
- return content + " ".repeat(Math.max(0, padding));
464
+ const line1Text = `${packageJson.name} update available! ${currentVersion} \u2192 ${latestVersion}`;
465
+ const line2Text = `Run npm install -g ${packageJson.name}@latest to update.`;
466
+ const maxLength = Math.max(line1Text.length, line2Text.length);
467
+ const boxWidth = maxLength + 2;
468
+ const padLine = (text2, visibleLength) => {
469
+ const padding = boxWidth - visibleLength;
470
+ return text2 + " ".repeat(Math.max(0, padding));
469
471
  };
472
+ const line1Colored = ` ${packageJson.name} update available! ${import_picocolors.default.cyan(currentVersion)} \u2192 ${import_picocolors.default.green(import_picocolors.default.bold(latestVersion))}`;
473
+ const line2Colored = ` Run ${import_picocolors.default.cyan(import_picocolors.default.bold(`npm install -g ${packageJson.name}@latest`))} to update.`;
474
+ const horizontalBorder = "\u2500".repeat(boxWidth);
470
475
  console.log("");
471
- console.log(import_picocolors.default.yellow("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
472
- console.log(import_picocolors.default.yellow("\u2502") + padLine("", boxWidth) + import_picocolors.default.yellow("\u2502"));
473
- console.log(import_picocolors.default.yellow("\u2502") + padLine(" " + import_picocolors.default.bold("New version of commit-cli is available!"), boxWidth) + import_picocolors.default.yellow("\u2502"));
474
- console.log(import_picocolors.default.yellow("\u2502") + padLine("", boxWidth) + import_picocolors.default.yellow("\u2502"));
475
- console.log(import_picocolors.default.yellow("\u2502") + padLine(" Current: " + import_picocolors.default.dim(currentVersion) + " \u2192 Latest: " + import_picocolors.default.green(import_picocolors.default.bold(latestVersion)), boxWidth) + import_picocolors.default.yellow("\u2502"));
476
- console.log(import_picocolors.default.yellow("\u2502") + padLine("", boxWidth) + import_picocolors.default.yellow("\u2502"));
477
- console.log(import_picocolors.default.yellow("\u2502") + padLine(" " + import_picocolors.default.dim("Update after you finish by running:"), boxWidth) + import_picocolors.default.yellow("\u2502"));
478
- console.log(import_picocolors.default.yellow("\u2502") + padLine(" " + import_picocolors.default.cyan(import_picocolors.default.bold(`npm install -g ${packageJson.name}@latest`)), boxWidth) + import_picocolors.default.yellow("\u2502"));
479
- console.log(import_picocolors.default.yellow("\u2502") + padLine("", boxWidth) + import_picocolors.default.yellow("\u2502"));
480
- console.log(import_picocolors.default.yellow("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
476
+ console.log(import_picocolors.default.yellow("\u256D" + horizontalBorder + "\u256E"));
477
+ console.log(import_picocolors.default.yellow("\u2502") + padLine(line1Colored, line1Text.length + 1) + import_picocolors.default.yellow("\u2502"));
478
+ console.log(import_picocolors.default.yellow("\u2502") + padLine(line2Colored, line2Text.length + 1) + import_picocolors.default.yellow("\u2502"));
479
+ console.log(import_picocolors.default.yellow("\u2570" + horizontalBorder + "\u256F"));
481
480
  console.log("");
482
481
  }
483
- notifier.notify({ defer: false, isGlobal: true });
484
482
  var CONFIG_PATH = join2(homedir(), ".commit-cli.json");
485
483
  var ANTHROPIC_MODELS = {
486
484
  "claude-sonnet-4-20250514": "Claude Sonnet 4.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commit-agent-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "AI-powered git commit CLI using LangGraph and Claude 4.5 or Gemini",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",