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:
@@ -10,7 +10,7 @@ import {
|
||||
commit,
|
||||
} from "../git";
|
||||
import { selectFiles } from "../selector";
|
||||
import { BACK } from "../menu";
|
||||
import { BACK, SKIP_WAIT } from "../menu";
|
||||
import { collectProjectContext } from "../context";
|
||||
import { buildPrompt, SYSTEM_PROMPT } from "../prompt";
|
||||
import { generateCommitMessage } from "../ai";
|
||||
@@ -221,7 +221,7 @@ export async function handleCommit(args: ParsedArgs): Promise<number> {
|
||||
console.log(` ${GREEN()}Auto-staged ${unstagedFiles.length} file(s).${RESET()}`);
|
||||
} else {
|
||||
const selected = await selectFiles(stagedFiles, 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