Skip to content

Conversation

@aronchick
Copy link

Summary

Implements shell-like history navigation for the agent input field, allowing users to navigate through previous messages using arrow keys (similar to terminal history or Claude Code).

Features

  • Navigate through message history with Up/Down arrow keys (web only)
  • Draft preservation: current input is saved when first navigating into history
  • Draft restoration: saved draft is restored when navigating back past all history
  • Automatic cursor positioning at end of loaded text
  • History state reset on message send
  • Non-interfering: only active when autocomplete suggestions are not visible

Technical details

  • Created useUserMessageHistory hook in sources/hooks/
  • Collects all user messages from all sessions, sorted by timestamp
  • Uses on-demand history fetching to avoid stale data
  • Integrates with existing AgentInput keyboard navigation

Test plan

  • Test arrow up/down navigation through message history on web
  • Verify draft preservation when navigating into history
  • Verify draft restoration when navigating back
  • Test that history resets after sending a message
  • Verify no interference with autocomplete functionality

Generated with Claude Code

Implements shell-like history navigation for the agent input field, allowing users to navigate through previous messages using arrow keys (similar to terminal history or Claude Code).

Features:
- Navigate through message history with Up/Down arrow keys (web only)
- Draft preservation: current input is saved when first navigating into history
- Draft restoration: saved draft is restored when navigating back past all history
- Automatic cursor positioning at end of loaded text
- History state reset on message send
- Non-interfering: only active when autocomplete suggestions are not visible

Technical details:
- Created useUserMessageHistory hook in sources/hooks/
- Collects all user messages from all sessions, sorted by timestamp
- Uses on-demand history fetching to avoid stale data
- Integrates with existing AgentInput keyboard navigation

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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.

1 participant