mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-08 06:25:34 +08:00
feat: add clickable overlay buttons for CLI prompts in Shell terminal (#480)
* feat: add clickable overlay buttons for CLI prompt selection Detect numbered selection prompts in the xterm.js terminal buffer and display clickable overlay buttons, allowing users to respond by tapping instead of typing numbers. Useful on mobile/tablet devices. Closes #427 * fix: address CodeRabbit review feedback - Remove fallback option scanning without footer anchor to prevent false positives on regular numbered lists in conversation output - Cancel pending prompt check timer on disconnect to prevent stale options from reappearing after reconnection * fix: require contiguous option block above footer anchor Stop collecting numbered options as soon as a non-matching line is encountered, preventing false matches from non-contiguous numbered text above the prompt. Addresses CodeRabbit review feedback on PR #480. * revert: allow non-contiguous option lines for multi-line labels CLI prompts may wrap options across multiple terminal rows or include blank separators. Revert contiguous-block requirement and document why non-matching lines are tolerated during upward scan.
This commit is contained in:
@@ -5,6 +5,13 @@ export const SHELL_RESTART_DELAY_MS = 200;
|
||||
export const TERMINAL_INIT_DELAY_MS = 100;
|
||||
export const TERMINAL_RESIZE_DELAY_MS = 50;
|
||||
|
||||
// CLI prompt overlay detection
|
||||
export const PROMPT_DEBOUNCE_MS = 500;
|
||||
export const PROMPT_BUFFER_SCAN_LINES = 20;
|
||||
export const PROMPT_OPTION_SCAN_LINES = 15;
|
||||
export const PROMPT_MAX_OPTIONS = 5;
|
||||
export const PROMPT_MIN_OPTIONS = 2;
|
||||
|
||||
export const TERMINAL_OPTIONS: ITerminalOptions = {
|
||||
cursorBlink: true,
|
||||
fontSize: 14,
|
||||
|
||||
Reference in New Issue
Block a user