Skip to content

APP-4336: Track CLI agent rich input prompts for up-arrow history#9512

Draft
MaggieShan wants to merge 1 commit intomasterfrom
oz-agent/APP-4336-lrc-prompts-up-arrow
Draft

APP-4336: Track CLI agent rich input prompts for up-arrow history#9512
MaggieShan wants to merge 1 commit intomasterfrom
oz-agent/APP-4336-lrc-prompts-up-arrow

Conversation

@MaggieShan
Copy link
Copy Markdown
Contributor

Description

Fixes APP-4336: Show LRC prompts in up-arrow history.

Prompts a user submits via the CLI agent (Full Terminal Use) rich input composer are written directly to the agent's PTY, so they never became AI exchanges and were missing from the up-arrow inline history menu. This PR tracks those submissions and surfaces them in up-arrow history.

Implementation

  • New cli_agent_prompts_for_terminal_view map on BlocklistAIHistoryModel, plus a record_cli_agent_prompt setter and an all_cli_agent_prompts getter that emits AIQueryHistory entries with the right HistoryOrder.
  • New CLIAgentPromptHistory struct that carries the originating CLIAgent so we can tab-separate Base vs FTU prompts later.
  • submit_cli_agent_rich_input now records each non-empty submission into the history model before delegating to the existing PTY pipeline.
  • History::up_arrow_suggestions_for_terminal_view chains the new prompts in alongside all_ai_queries, reusing the existing dedupe path so identical text from a Base prompt and an FTU prompt collapse correctly.

The tracking is in-memory only for now and the inline history menu still surfaces all prompts under the existing Prompts tab.

Out of scope (tracked as TODOs in the plan)

  • SQLite persistence so prompts survive restarts.
  • Splitting Prompts into separate Agent and Full terminal use tabs in the inline history menu, mirroring the model selector at app/src/terminal/input/models/view.rs (75-90).
  • The "prompt dropping" issue from the same Slack thread \u2014 separate ticket.

Validation

  • cargo check -p warp clean (no new warnings).
  • cargo fmt -- --check passes.
  • cargo clippy -p warp --all-targets --all-features --tests -- -D warnings passes (only pre-existing third-party minimp4-sys C warnings remain).
  • Manual test pending: open a Claude Code (or similar) CLI session, submit prompts via the rich input, then up-arrow in the same terminal view.

Conversation: https://staging.warp.dev/conversation/f2d943d2-18fe-4631-8085-6baa0f2df5e4
Run: https://oz.staging.warp.dev/runs/019ddb4f-b6ca-78c5-aa17-7b4e10205a1a
Plans:

This PR was generated with Oz.

Prompts the user submits via the CLI agent (Full Terminal Use) rich input
composer are written directly to the agent's PTY, so they don't become AI
exchanges and never showed up in the up-arrow inline history menu.

This change records each rich-input submission in BlocklistAIHistoryModel
and surfaces those entries alongside regular AI queries in
up_arrow_suggestions_for_terminal_view. Tracking is per terminal view and
in-memory only for now; persistence and a tab UX that splits Base agent
prompts from FTU prompts (mirroring the model selector) are TODOs.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant