d9d7abf8d7c4cade8d6ff76cc879c0b8271349e3
Shell-style. Up walks back, Down walks forward, and past the newest is the draft you were composing when you left — stashed on the way in, because losing what you had typed to the key pressed to get back to it would be the worst version of this. Up only takes the key from the FIRST line and Down from the last. In a multi-line draft there is a line to move to, and swallowing the arrow would strand the caret; on the edge there is nowhere to go, which is exactly when history is what was meant. An empty list, or already at the oldest, leaves the key alone too. Per tab and shared by every chat in it, in sessionStorage. The prompt most worth reaching for is often one sent somewhere else — re-asking in a fresh chat, or in the other panel — and scoping it per session would empty the history exactly when a new chat makes it most useful. Slash commands count; they are prompts you sent. The tests caught a real one: `record` wrote state while `step` read a ref that only refreshed on the next render, so sending and immediately pressing Up walked the list as it was one prompt ago. The ref is written first now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
42 MiB
Languages
TypeScript
90.9%
Shell
4.7%
JavaScript
4.1%
CSS
0.2%
HTML
0.1%