[nexus] fix(04-03): add root directory prompt to CLI onboarding (ONBD-06)
This commit is contained in:
parent
c3e481230c
commit
104dd06036
1 changed files with 12 additions and 1 deletions
|
|
@ -559,7 +559,18 @@ export async function onboard(opts: OnboardOptions): Promise<void> {
|
||||||
const { runCommand } = await import("./run.js");
|
const { runCommand } = await import("./run.js");
|
||||||
// [nexus] Start bootstrap concurrently — health-check poll waits for server readiness
|
// [nexus] Start bootstrap concurrently — health-check poll waits for server readiness
|
||||||
const serverUrl = `http://${server.host}:${server.port}`;
|
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) => {
|
bootstrapNexusAgents(serverUrl, rootDir).catch((err: unknown) => {
|
||||||
// [nexus] Bootstrap failures are non-fatal
|
// [nexus] Bootstrap failures are non-fatal
|
||||||
console.warn("[nexus] Agent bootstrap error:", err instanceof Error ? err.message : String(err));
|
console.warn("[nexus] Agent bootstrap error:", err instanceof Error ? err.message : String(err));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue