Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,6 @@ function summarizeArgs(args: any): string {
.join(", ");
}

function askQuestion(question: string): Promise<string> {
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" });
Expand Down Expand Up @@ -345,12 +335,6 @@ async function main(): Promise<void> {
});
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
Expand Down