Skip to content

feat: add TUI prompt history recall#785

Merged
SamSaffron merged 1 commit into
SamSaffron:mainfrom
sam-saffron-jarvis:feat/tui-history-updown
Jun 9, 2026
Merged

feat: add TUI prompt history recall#785
SamSaffron merged 1 commit into
SamSaffron:mainfrom
sam-saffron-jarvis:feat/tui-history-updown

Conversation

@sam-saffron-jarvis

Copy link
Copy Markdown
Contributor

What

Adds shell-style Up/Down prompt history recall in the TUI composer.

  • Uses persisted messages rows as shared cross-session prompt history
  • Traverses global user prompts by monotonic messages.id, filtered to the current agent
  • Preserves the local unsent draft while browsing history and restores it when moving down past newest
  • Lets Up/Down move within multiline composer text before falling back to history
  • Works in the streaming interjection composer before viewport arrow scrolling takes over
  • Keeps recalled history text-only so stale draft files/images are not accidentally sent

Why

This matches the expected terminal behavior:

  1. terminal 1 sends a prompt
  2. terminal 2 sends a prompt in another session
  3. terminal 1 types a draft and presses Up
  4. terminal 1 recalls terminal 2's newer persisted prompt, and Down restores the draft

Verification

  • go test ./...
  • go build ./...
  • go vet ./...

@SamSaffron SamSaffron merged commit 96b9d23 into SamSaffron:main Jun 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants