patchcord 0.3.58 → 0.3.59
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 +18 -4
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -439,13 +439,27 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
|
|
|
439
439
|
|
|
440
440
|
token = sseResult.token;
|
|
441
441
|
identity = `${sseResult.agent_id}@${sseResult.namespace_id}`;
|
|
442
|
-
clientType = sseResult.client_type || "";
|
|
442
|
+
clientType = sseResult.client_type || sseResult.tool || "";
|
|
443
443
|
choice = CLIENT_TYPE_MAP[clientType] || "";
|
|
444
|
+
console.log(` ${green}✓${r} ${bold}${identity}${r} connected.`);
|
|
445
|
+
|
|
444
446
|
if (!choice) {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
+
// Backend didn't send tool type — ask in terminal
|
|
448
|
+
const { createInterface: createRL3 } = await import("readline");
|
|
449
|
+
const rl3 = createRL3({ input: process.stdin, output: process.stdout });
|
|
450
|
+
const ask3 = (q) => new Promise((resolve) => rl3.question(q, resolve));
|
|
451
|
+
console.log(`\n${bold}Which tool are you setting up?${r}\n`);
|
|
452
|
+
console.log(` ${cyan}1.${r} Claude Code ${cyan}5.${r} Gemini CLI`);
|
|
453
|
+
console.log(` ${cyan}2.${r} Codex CLI ${cyan}6.${r} VS Code`);
|
|
454
|
+
console.log(` ${cyan}3.${r} Cursor ${cyan}7.${r} Zed`);
|
|
455
|
+
console.log(` ${cyan}4.${r} Windsurf ${cyan}8.${r} OpenCode\n`);
|
|
456
|
+
choice = (await ask3(`${dim}Choose (1-8):${r} `)).trim();
|
|
457
|
+
rl3.close();
|
|
458
|
+
if (!["1","2","3","4","5","6","7","8"].includes(choice)) {
|
|
459
|
+
console.error("Invalid choice.");
|
|
460
|
+
process.exit(1);
|
|
461
|
+
}
|
|
447
462
|
}
|
|
448
|
-
console.log(` ${green}✓${r} ${bold}${identity}${r} connected.`);
|
|
449
463
|
}
|
|
450
464
|
}
|
|
451
465
|
|