vibe-cokit 1.15.0 → 1.16.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.
Files changed (2) hide show
  1. package/dist/cli.js +19 -16
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4482,24 +4482,27 @@ ${msg}
4482
4482
  }
4483
4483
 
4484
4484
  // src/commands/providers/claude-code.ts
4485
- import { exec as exec8 } from "child_process";
4486
- import { promisify as promisify8 } from "util";
4487
- var execAsync2 = promisify8(exec8);
4488
- async function runClaudeCodeCLI(args = []) {
4485
+ import { spawn } from "child_process";
4486
+ function runClaudeCodeCLI(args = []) {
4489
4487
  const skipPerms = ["--dangerously-skip-permissions"];
4490
4488
  const allArgs = [...skipPerms, ...args];
4491
- const cmd = `claude ${allArgs.join(" ")}`;
4492
- try {
4493
- const { stdout, stderr } = await execAsync2(cmd);
4494
- if (stdout)
4495
- process.stdout.write(stdout);
4496
- if (stderr)
4497
- process.stderr.write(stderr);
4498
- } catch (err) {
4499
- const msg = getErrorMsg(err);
4500
- console.error(`Error running Claude Code: ${msg}`);
4501
- process.exit(1);
4502
- }
4489
+ return new Promise((resolve, reject) => {
4490
+ const child = spawn("claude", allArgs, {
4491
+ stdio: "inherit",
4492
+ shell: process.platform === "win32"
4493
+ });
4494
+ child.on("error", (err) => {
4495
+ const msg = getErrorMsg(err);
4496
+ console.error(`Error running Claude Code: ${msg}`);
4497
+ process.exit(1);
4498
+ });
4499
+ child.on("exit", (code) => {
4500
+ if (code !== 0 && code !== null) {
4501
+ process.exit(code);
4502
+ }
4503
+ resolve();
4504
+ });
4505
+ });
4503
4506
  }
4504
4507
  async function claudeCodeCommand(args = []) {
4505
4508
  await runClaudeCodeCLI(args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-cokit",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "A toolkit for interacting with Claude Code and OpenCode",
5
5
  "module": "index.ts",
6
6
  "type": "module",