Summary
build-tools/packages/build-cli/src/commands/ai.ts defines an isUserCancellation helper (lines 335-342) that detects ExitPromptError, AbortError, and cancellation-related error messages from @inquirer/prompts. This is currently the only place in build-cli that handles prompt cancellation gracefully.
Other commands that use @inquirer/prompts (confirm, rawlist) — including bump.ts, release.ts, release/report.ts, and handlers/checkFunctions.ts — do not catch cancellation at all. Pressing Ctrl+C in those commands produces an unhandled rejection and a raw stack trace.
Proposal
Move isUserCancellation to a shared location (e.g. src/library/prompt.ts) and adopt it in the other @inquirer/prompts callers so that Ctrl+C exits cleanly across all interactive commands.
Context
Identified during code reuse review of the flub ai PR. Deferred because applying the fix across all callers is a broader change.
Summary
build-tools/packages/build-cli/src/commands/ai.tsdefines anisUserCancellationhelper (lines 335-342) that detectsExitPromptError,AbortError, and cancellation-related error messages from@inquirer/prompts. This is currently the only place in build-cli that handles prompt cancellation gracefully.Other commands that use
@inquirer/prompts(confirm,rawlist) — includingbump.ts,release.ts,release/report.ts, andhandlers/checkFunctions.ts— do not catch cancellation at all. Pressing Ctrl+C in those commands produces an unhandled rejection and a raw stack trace.Proposal
Move
isUserCancellationto a shared location (e.g.src/library/prompt.ts) and adopt it in the other@inquirer/promptscallers so that Ctrl+C exits cleanly across all interactive commands.Context
Identified during code reuse review of the
flub aiPR. Deferred because applying the fix across all callers is a broader change.