core/tools/process: split write_pty (literal) vs write_pty_keys

This commit is contained in:
2026-07-18 15:46:11 +08:00
parent 4ff03d8135
commit 29230af911
7 changed files with 79 additions and 26 deletions
+1 -1
View File
@@ -234,7 +234,7 @@ Safety defaults:
- PTY sessions: caps, idle TTL, output budget; master FD is non-inheritable; sessions closed on chat exit.
Prefer file tools over full-screen editors (`vim`/`nano`) for edits. `read_pty` escapes CSI so tool
results cannot reprogram the host TTY; `close_pty` / chat exit also restore the host terminal.
`write_pty` accepts escapes: `\xHH`, `ctrl+x`, `key=esc|enter|…`.
`write_pty` is literal text only; use `write_pty_keys` for `\xHH`, `ctrl+x`, `key=esc|enter|…`.
## Usage / context (CLI)