start-vibing 3.0.2 → 3.0.3
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/cli.js +10 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -420,10 +420,12 @@ async function installClaudeUnix() {
|
|
|
420
420
|
}
|
|
421
421
|
function launchClaude(cwd, options = {}) {
|
|
422
422
|
const { isWindows } = getPlatformInfo();
|
|
423
|
+
const resumeSession = !options.newSession;
|
|
423
424
|
const args = ["--dangerously-skip-permissions"];
|
|
424
|
-
if (
|
|
425
|
+
if (resumeSession) {
|
|
425
426
|
args.unshift("-c");
|
|
426
427
|
}
|
|
428
|
+
const startTime = Date.now();
|
|
427
429
|
const claude = spawn("claude", args, {
|
|
428
430
|
cwd,
|
|
429
431
|
stdio: "inherit",
|
|
@@ -445,6 +447,13 @@ function launchClaude(cwd, options = {}) {
|
|
|
445
447
|
process.exit(1);
|
|
446
448
|
});
|
|
447
449
|
claude.on("exit", (code) => {
|
|
450
|
+
if (code !== 0 && resumeSession && Date.now() - startTime < 5000) {
|
|
451
|
+
console.log("");
|
|
452
|
+
console.log(" No conversation found to continue. Starting new session...");
|
|
453
|
+
console.log("");
|
|
454
|
+
launchClaude(cwd, { newSession: true });
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
448
457
|
process.exit(code || 0);
|
|
449
458
|
});
|
|
450
459
|
}
|
package/package.json
CHANGED