feat(app): readline-style prompt history navigation in composer#671
Open
minimAluminiumalism wants to merge 1 commit intogetpaseo:mainfrom
Open
feat(app): readline-style prompt history navigation in composer#671minimAluminiumalism wants to merge 1 commit intogetpaseo:mainfrom
minimAluminiumalism wants to merge 1 commit intogetpaseo:mainfrom
Conversation
ArrowUp/ArrowDown on the composer now recall previously sent prompts. Sources are merged: the active agent's user_messages take priority, backfilled by a 200-entry global FIFO persisted via AsyncStorage. Triggers only when the cursor sits on the first/last line, so multi-line editing keeps default cursor movement. Defers to the autocomplete popover when it's open. IME composition is short-circuited by the existing onKeyPress chain in message-input.tsx. Pure client-side change (sessionStore + AsyncStorage); no server, schema, or WebSocket changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds ArrowUp/ArrowDown prompt history recall to the composer. Empty input + ArrowUp recalls the most recently sent prompt; further ArrowUp walks further into the past; ArrowDown walks back to the original draft.
Pure client-side change. No server, schema, WebSocket, or persisted-format changes.
notes
npm run devagainst~/.paseo-yellow-swan.Screenshots
Test plan
npm run typecheck(all workspaces)npm run lint -- <8 touched files>(0 warnings, 0 errors)npm run format:checknpx vitest run packages/app/src/utils/cursor-line-position.test.ts --bail=1(15 tests)npx vitest run packages/app/src/stores/prompt-history-store.test.ts --bail=1(11 tests)npx vitest run packages/app/src/hooks/use-prompt-history.test.ts --bail=1(14 tests)npx vitest run packages/app/src/components/composer.test.tsx --bail=1(33 tests, 31 pre-existing + 2 new)Notes