APP-4336: Track CLI agent rich input prompts for up-arrow history#9512
Draft
MaggieShan wants to merge 1 commit intomasterfrom
Draft
APP-4336: Track CLI agent rich input prompts for up-arrow history#9512MaggieShan wants to merge 1 commit intomasterfrom
MaggieShan wants to merge 1 commit intomasterfrom
Conversation
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>
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.
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
cli_agent_prompts_for_terminal_viewmap onBlocklistAIHistoryModel, plus arecord_cli_agent_promptsetter and anall_cli_agent_promptsgetter that emitsAIQueryHistoryentries with the rightHistoryOrder.CLIAgentPromptHistorystruct that carries the originatingCLIAgentso we can tab-separate Base vs FTU prompts later.submit_cli_agent_rich_inputnow records each non-empty submission into the history model before delegating to the existing PTY pipeline.History::up_arrow_suggestions_for_terminal_viewchains the new prompts in alongsideall_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
Promptstab.Out of scope (tracked as TODOs in the plan)
Promptsinto separateAgentandFull terminal usetabs in the inline history menu, mirroring the model selector atapp/src/terminal/input/models/view.rs (75-90).Validation
cargo check -p warpclean (no new warnings).cargo fmt -- --checkpasses.cargo clippy -p warp --all-targets --all-features --tests -- -D warningspasses (only pre-existing third-partyminimp4-sysC warnings remain).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.