Skip to main content

Module modal_hints

Module modal_hints 

Source
Expand description

Shared copy for inline list modals: footer key hints and recurring sentences.

Modal headers stay descriptive (full sentences, no keybindings); all keybinding guidance lives in footer_hint / summary rows using these constants so approval, limit, and picker modals read identically.

Constants§

APPROVAL_NAVIGATE_CANCEL
Navigate, select, or cancel: MCP approval variant.
APPROVAL_NAVIGATE_DENY
Navigate, select, or deny: tool approval, hook approval, session-limit, and policy-denied prompts.
APPROVAL_NAVIGATE_STOP
Navigate, select, or stop: tool-loop-limit variant.

Functions§

choose_handling_line
Trailing sentence before approval options, e.g. choose_handling_line("this tool").
truncate_modal_text
Truncate modal body text to max_chars characters, appending … only when truncation actually happened so shortened text never reads as complete.