@polka-codes/cli 0.6.2 → 0.6.4

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 +10 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24629,7 +24629,7 @@ var {
24629
24629
  Help
24630
24630
  } = import__.default;
24631
24631
  // package.json
24632
- var version = "0.6.2";
24632
+ var version = "0.6.4";
24633
24633
 
24634
24634
  // ../../node_modules/@anthropic-ai/sdk/version.mjs
24635
24635
  var VERSION = "0.36.2";
@@ -34507,6 +34507,9 @@ ${agents}`;
34507
34507
  await this.#callback({ kind: "ToolInterrupted" /* ToolInterrupted */, agent: this, tool: content.name });
34508
34508
  return { exit: toolResp };
34509
34509
  case "HandOver" /* HandOver */:
34510
+ if (toolReponses.length > 0) {
34511
+ continue;
34512
+ }
34510
34513
  await this.#callback({
34511
34514
  kind: "ToolHandOver" /* ToolHandOver */,
34512
34515
  agent: this,
@@ -34518,6 +34521,9 @@ ${agents}`;
34518
34521
  });
34519
34522
  return { exit: toolResp };
34520
34523
  case "Delegate" /* Delegate */:
34524
+ if (toolReponses.length > 0) {
34525
+ continue;
34526
+ }
34521
34527
  await this.#callback({
34522
34528
  kind: "ToolDelegate" /* ToolDelegate */,
34523
34529
  agent: this,
@@ -45458,7 +45464,7 @@ var readConfig = (path4) => {
45458
45464
 
45459
45465
  // src/options.ts
45460
45466
  function addSharedOptions(command) {
45461
- return command.option("-c --config <paths...>", "Path to config file(s)").option("--api-provider <provider>", "API provider").option("--model <model>", "Model ID").option("--api-key <key>", "API key").option("--max-messages <iterations>", "Maximum number of messages to send. Default to 50", Number.parseInt, 50).option("--budget <budget>", "Budget for the AI service. Default to $1000", Number.parseFloat, 1000).option("-v --verbose", "Enable verbose output. Use -v for level 1, -vv for level 2", (value, prev) => prev + 1, 0).option("-d --base-dir <path>", "Base directory to run commands in");
45467
+ return command.option("-c --config <paths>", "Path to config file(s)", (value, prev) => prev.concat(value), []).option("--api-provider <provider>", "API provider").option("--model <model>", "Model ID").option("--api-key <key>", "API key").option("--max-messages <iterations>", "Maximum number of messages to send. Default to 50", Number.parseInt, 50).option("--budget <budget>", "Budget for the AI service. Default to $1000", Number.parseFloat, 1000).option("-v --verbose", "Enable verbose output. Use -v for level 1, -vv for level 2", (value, prev) => prev + 1, 0).option("-d --base-dir <path>", "Base directory to run commands in");
45462
45468
  }
45463
45469
  function parseOptions(options, cwdArg, home = os2.homedir()) {
45464
45470
  let cwd = cwdArg;
@@ -46801,7 +46807,7 @@ var commitCommand = new Command("commit").description("Create a commit with AI-g
46801
46807
  }
46802
46808
  }
46803
46809
  }
46804
- const diff = execSync("git diff --cached -U200").toString();
46810
+ const diff = execSync("git diff --cached -U50").toString();
46805
46811
  spinner.text = "Generating commit message...";
46806
46812
  const result = await generateGitCommitMessage(ai, { diff, context: message });
46807
46813
  usage.printUsage();
@@ -47078,7 +47084,7 @@ var prCommand = new Command("pr").description("Create a GitHub pull request").ar
47078
47084
  const commits = execSync2(`git --no-pager log --oneline --no-color --no-merges --no-decorate ${defaultBranch}..HEAD`, {
47079
47085
  encoding: "utf-8"
47080
47086
  });
47081
- const diff = execSync2(`git diff --cached -U200 ${defaultBranch}`, { encoding: "utf-8" });
47087
+ const diff = execSync2(`git diff --cached -U50 ${defaultBranch}`, { encoding: "utf-8" });
47082
47088
  const usage = new UsageMeter;
47083
47089
  const ai = createService(provider2, {
47084
47090
  apiKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/cli",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",