diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-15 15:07:45 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-15 15:07:45 +0100 |
| commit | 37184044609997604bfa1ab08be356d8b4e5e19d (patch) | |
| tree | b6e33c9b3d8d8fa0b51ecced4d154f4d63bf4534 /docs/PLAN.md | |
| parent | docs: correct the context-window assumption in ADR 0002 (diff) | |
| download | agent686-37184044609997604bfa1ab08be356d8b4e5e19d.tar.gz agent686-37184044609997604bfa1ab08be356d8b4e5e19d.zip | |
Input editor: history, bracketed paste, in-line editing
- crossterm raw mode only for the duration of a prompt, so SIGINT keeps
working during a turn
- persisted history with prompt commands excluded and newlines escaped
- bracketed paste inserts one multi-line buffer instead of firing N turns
- ctrl-a/e/u/k/w editing, ctrl-c abandons the line, ctrl-d exits
- ctrl-j submits, so pipes and pty harnesses work
- width fallback: a 0-column pty is 80 columns, not 1
Diffstat (limited to '')
| -rw-r--r-- | docs/PLAN.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/PLAN.md b/docs/PLAN.md index 75fd25b..9be54fa 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md | |||
| @@ -127,6 +127,23 @@ turn that failed after writing its prompt can be resumed without editing the | |||
| 127 | transcript; and `deepseek-v4.1-flash` accepted a 500k-token prompt, so the | 127 | transcript; and `deepseek-v4.1-flash` accepted a 500k-token prompt, so the |
| 128 | context ceiling is far higher than the 128k the plan assumed. | 128 | context ceiling is far higher than the 128k the plan assumed. |
| 129 | 129 | ||
| 130 | **M7 — Input editor.** ✅ Done. | ||
| 131 | |||
| 132 | Replaces plain `read_line` behind the same seam. `crossterm` raw mode is enabled | ||
| 133 | only while a prompt is being read, so Ctrl-C during a turn is still a signal and | ||
| 134 | the double-Ctrl-C exit keeps working. | ||
| 135 | |||
| 136 | - Up/down history, persisted to `~/.local/share/agent686/history`, capped at 200 | ||
| 137 | entries, with prompt-mode commands excluded and newlines escaped per record. | ||
| 138 | - Bracketed paste arrives as one block, including newlines: pasting a stack trace | ||
| 139 | is one prompt, not thirty. | ||
| 140 | - Editing: left/right/home/end, backspace/delete, ctrl-a/e/u/k/w. Ctrl-C abandons | ||
| 141 | the line, Ctrl-D exits. Ctrl-J submits too, so pipes and test harnesses work. | ||
| 142 | - Redraw moves up by the number of rows the previous buffer occupied, which | ||
| 143 | needed a correct terminal width: a pty that reports 0 columns is treated as 80, | ||
| 144 | not as 1 (treating it as 1 made every character wrap onto its own line). | ||
| 145 | - Non-TTY stdin still falls back to plain line reading. | ||
| 146 | |||
| 130 | ## Acceptance test (v1) | 147 | ## Acceptance test (v1) |
| 131 | 148 | ||
| 132 | > "Make a simple calculator in C" — run on the i386 box, from an empty directory. | 149 | > "Make a simple calculator in C" — run on the i386 box, from an empty directory. |
