promptProgramOptions top-level constant

ProgramOptions const promptProgramOptions

Shared defaults for "artisanal-style" prompts that run a single bubble and return a value.

Prompts run in inline mode to preserve the artisanal command UX (print output above/between prompts), while still using the Bubble Tea event loop.

Signal handlers are enabled so that Ctrl+C (SIGINT) is intercepted by the running Program rather than killing the Dart process immediately. Each prompt wrapper handles InterruptMsg by completing its controller with null and issuing Cmd.quit(), which triggers Program._cleanup() and restores the terminal to a clean state before the process exits.

Implementation

const promptProgramOptions = ProgramOptions(
  altScreen: false,
  hideCursor: false,
  fps: 20,
  mouse: false,
  bracketedPaste: false,
  signalHandlers: true,
  sendInterrupt: true,
  useUltravioletRenderer: false,
  useUltravioletInputDecoder: false,
  shutdownSharedStdinOnExit: false,
);