Commit fe56f47
Restore the just-sent prompt on Esc before the model starts responding
Match Claude Code's "treat the query as not sent" behavior in the pre-
response window: while `user_turn_pending_start` is true (the user has
submitted but no `TurnStarted` notification has arrived yet) the Esc
handler now also pulls the last rendered user prompt back into the
composer in addition to issuing the interrupt. The user can immediately
edit and resubmit without losing the typed text.
The history cell for the original submission is left in place — removing
it would require an extra rewind-style round trip and the rendered
"User ›" line accurately reflects that the user did press Enter. Mention
bindings are not preserved because `UserMessageDisplay` doesn't carry
them; text, attachments, and text-element ranges round-trip cleanly.
Co-authored-by: Open Codex <hff582580@gmail.com>1 parent c983fb4 commit fe56f47
2 files changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
239 | 273 | | |
240 | 274 | | |
241 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
128 | 134 | | |
129 | 135 | | |
130 | 136 | | |
| |||
0 commit comments