From 61dfe2b4cba48feeb9127f8cbe3766570607ffd5 Mon Sep 17 00:00:00 2001 From: parshvadaftari Date: Thu, 19 Mar 2026 13:32:41 +0530 Subject: [PATCH] fix: default to cwd instead of interactive directory prompt --- src/index.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/index.ts b/src/index.ts index 6a9a0c8..343698f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -178,16 +178,6 @@ function summarizeArgs(args: any): string { .join(", "); } -function askQuestion(question: string): Promise { - const rl = createInterface({ input: process.stdin, output: process.stdout }); - return new Promise((res) => { - rl.question(question, (answer) => { - rl.close(); - res(answer.trim()); - }); - }); -} - function isGitRepo(dir: string): boolean { try { execSync("git rev-parse --is-inside-work-tree", { cwd: dir, stdio: "pipe" }); @@ -345,12 +335,6 @@ async function main(): Promise { }); dir = localSession.dir; console.log(dim(`Local session: ${localSession.branch} (${localSession.dir})`)); - } else if (dir === process.cwd() && !prompt) { - // No --repo: interactive prompt for dir - const answer = await askQuestion(green("? ") + bold("Repository path") + dim(" (. for current dir)") + green(": ")); - if (answer) { - dir = resolve(answer === "." ? process.cwd() : answer); - } } // Create sandbox context if --sandbox flag is set