Expand description
Confirmation gating for the script WriteText command.
crate::protocol::strip_vt_sequences removes ESC-initiated sequences but
deliberately passes printable characters and newlines, so a script holding
allow_write_text can type a whole command line and submit it. Filtering
cannot close that gap — the payload is ordinary text — so the control on this
path is user confirmation, mirroring the trigger subsystem’s
prompt_before_run.
The frontend queues the write onto the same pending-action queue the trigger dialog reads. The pieces that decide whether to queue, what id to queue it under, and how the text is shown live here so they can be tested without a window.
Constants§
- MAX_
PENDING_ WRITE_ TEXT_ PROMPTS - Pending confirmations tolerated before a
WriteTextpayload is dropped.
Functions§
- describe_
write_ text - Render a sanitized
WriteTextpayload for the confirmation dialog. - write_
text_ action_ id - Synthetic confirmation id for a script
WriteTextpayload. - write_
text_ needs_ confirmation - Whether this payload must go to the confirmation dialog before it is written.