[nexus] fix(04-03): add root directory prompt to CLI onboarding (ONBD-06)
This commit is contained in:
parent
355229c495
commit
5cab6c096c
1 changed files with 12 additions and 1 deletions
|
|
@ -810,7 +810,18 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
|
|||
const { runCommand } = await import("./run.js");
|
||||
// [nexus] Start bootstrap concurrently — health-check poll waits for server readiness
|
||||
const serverUrl = `http://${server.host}:${server.port}`;
|
||||
const rootDir = process.cwd();
|
||||
// [nexus] Prompt for project root directory (mirrors UI wizard flow)
|
||||
let rootDir = process.cwd();
|
||||
if (process.stdin.isTTY && process.stdout.isTTY) {
|
||||
const answer = await p.text({
|
||||
message: "Project root directory:",
|
||||
initialValue: process.cwd(),
|
||||
placeholder: process.cwd(),
|
||||
});
|
||||
if (!p.isCancel(answer) && answer) {
|
||||
rootDir = answer;
|
||||
}
|
||||
}
|
||||
bootstrapNexusAgents(serverUrl, rootDir).catch((err: unknown) => {
|
||||
// [nexus] Bootstrap failures are non-fatal
|
||||
console.warn("[nexus] Agent bootstrap error:", err instanceof Error ? err.message : String(err));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue