fix(ui): skip "Press Enter" pause when user backs out of subcommand
Build / bun-build (push) Successful in 5m42s
Build / bun-build (push) Successful in 5m42s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { loadConfig } from "../config";
|
||||
import { isGitRepo, getStagedDiff, getUnstagedFiles, getRepoRoot, stageFiles } from "../git";
|
||||
import { selectFiles } from "../selector";
|
||||
import { BACK } from "../menu";
|
||||
import { BACK, SKIP_WAIT } from "../menu";
|
||||
import { collectProjectContext } from "../context";
|
||||
import { EXPLAIN_SYSTEM_PROMPT, buildExplainPrompt } from "../prompt";
|
||||
import { callAI } from "../ai";
|
||||
@@ -52,7 +52,7 @@ export async function handleExplain(args: ParsedArgs): Promise<number> {
|
||||
const unstagedFiles = await getUnstagedFiles();
|
||||
if (unstagedFiles.length > 0) {
|
||||
const selected = await selectFiles([], unstagedFiles);
|
||||
if (selected === BACK) return 0;
|
||||
if (selected === BACK) return SKIP_WAIT as unknown as number;
|
||||
if (selected.length > 0) {
|
||||
await stageFiles(selected);
|
||||
console.log(` ${GREEN()}Staged ${selected.length} file(s).${RESET()}`);
|
||||
|
||||
Reference in New Issue
Block a user