patchcord 0.3.79 → 0.3.81
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/bin/patchcord.mjs +4 -29
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -386,8 +386,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
386
386
|
const rlU = createRLU({ input: process.stdin, output: process.stdout });
|
|
387
387
|
const askU = (q) => new Promise((resolve) => rlU.question(q, resolve));
|
|
388
388
|
|
|
389
|
-
const updateAnswer = (await askU(` ${bold}Update ${existingToolName} agent? (
|
|
390
|
-
if (updateAnswer
|
|
389
|
+
const updateAnswer = (await askU(` ${bold}Update ${existingToolName} agent? (y/N):${r} `)).trim().toLowerCase();
|
|
390
|
+
if (updateAnswer === "y" || updateAnswer === "yes") {
|
|
391
391
|
token = existingToken;
|
|
392
392
|
if (existingIdentity) {
|
|
393
393
|
identity = existingIdentity;
|
|
@@ -405,33 +405,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
405
405
|
const addAnswer = (await askU(` ${bold}Add another agent to this project? (y/N):${r} `)).trim().toLowerCase();
|
|
406
406
|
rlU.close();
|
|
407
407
|
if (addAnswer === "y" || addAnswer === "yes") {
|
|
408
|
-
//
|
|
409
|
-
token =
|
|
410
|
-
if (existingIdentity) {
|
|
411
|
-
identity = existingIdentity;
|
|
412
|
-
console.log(` ${green}✓${r} ${bold}${identity}${r}`);
|
|
413
|
-
} else {
|
|
414
|
-
console.log(` ${yellow}⚠${r} Token expired or invalid. Starting fresh setup.`);
|
|
415
|
-
token = "";
|
|
416
|
-
}
|
|
417
|
-
// Show tool picker
|
|
418
|
-
if (token) {
|
|
419
|
-
const { createInterface: createRL4 } = await import("readline");
|
|
420
|
-
const rl4 = createRL4({ input: process.stdin, output: process.stdout });
|
|
421
|
-
const ask4 = (q) => new Promise((resolve) => rl4.question(q, resolve));
|
|
422
|
-
console.log(`\n${bold}Which agent are you adding?${r}\n`);
|
|
423
|
-
console.log(` ${cyan}1.${r} Claude Code ${cyan}5.${r} Gemini CLI`);
|
|
424
|
-
console.log(` ${cyan}2.${r} Codex CLI ${cyan}6.${r} VS Code`);
|
|
425
|
-
console.log(` ${cyan}3.${r} Cursor ${cyan}7.${r} Zed`);
|
|
426
|
-
console.log(` ${cyan}4.${r} Windsurf ${cyan}8.${r} OpenCode`);
|
|
427
|
-
console.log(` ${cyan}9.${r} OpenClaw\n`);
|
|
428
|
-
choice = (await ask4(`${dim}Choose (1-9):${r} `)).trim();
|
|
429
|
-
rl4.close();
|
|
430
|
-
if (!["1","2","3","4","5","6","7","8","9"].includes(choice)) {
|
|
431
|
-
console.error("Invalid choice.");
|
|
432
|
-
process.exit(1);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
408
|
+
// Drop into browser connect flow — don't reuse token, fresh setup
|
|
409
|
+
token = "";
|
|
435
410
|
}
|
|
436
411
|
}
|
|
437
412
|
}
|