# feat\(web\): recall sent prompts with the up arrow \(\#9173\) · gitcafe/t3code

[View on GitCafe](https://git.cafe/gitcafe/t3code/commit/fd773172e7f26f2d98de3eb572f3317b0ad8d443)

Repository: [gitcafe/t3code](https://git.cafe/gitcafe/t3code)

Visibility: public

Requested revision: fd773172e7f26f2d98de3eb572f3317b0ad8d443

Requested commit: fd773172e7f26f2d98de3eb572f3317b0ad8d443

Commit: fd773172e7f26f2d98de3eb572f3317b0ad8d443

Tree: c3b411f7d1c27c5777cbfaef9786284bf859bc7d

Author: Theo Browne

Committer: GitHub

## Message

```
feat(web): recall sent prompts with the up arrow (#9173)

Press ArrowUp in an empty composer to get the last prompt sent in this thread. ArrowUp again goes further back, ArrowDown comes forward, and going past the newest prompt clears the composer.

History is per thread and derived from the thread's user messages on the keypress, so nothing new is stored or synced. Send-time appends (terminal and element context, preview annotations, review comments, the ultrathink prefix) and app-composed sends are stripped. With text in the composer, arrows move the caret unless the caret is on the first or last visual line of an unedited recalled prompt. Modifiers, IME composition, menus, approvals, and pending questions take priority. Attachments are not restored.

Prior art: #1778 by @PratyushChauhan, #4336 by @mfazekas, #7952 by @sethwebster.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
```

## Parents

- [df8e0eb46bca3dc01c17cc74a53b19aaacbe252b](https://git.cafe/gitcafe/t3code/commit/df8e0eb46bca3dc01c17cc74a53b19aaacbe252b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/t3code/tree/fd773172e7f26f2d98de3eb572f3317b0ad8d443?format=markdown)
