Repository navigation
feat(agent): add composer history search - #287
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1b94a07b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.history_position = None; | ||
| self.history_draft = None; |
There was a problem hiding this comment.
Preserve in-progress history navigation during updates
When SetTextPanelComposerHistory arrives after the user has pressed Up, these assignments discard the saved draft and history position while leaving the recalled entry in the buffer. The next Down key is therefore handled as ordinary cursor movement and can no longer restore the user's original unsent draft and cursor. This can occur with a late Agent storage response or any plugin that refreshes history while the composer is active; preserve the navigation state or restore the saved draft before resetting it.
Useful? React with 👍 / 👎.
The docked Agent composer persists submitted prompts, but it did not restore that history into a new pane and lacked the shell-style navigation users expect when iterating on prior requests.
This change:
Ctrl-rsubstring search to text-panel composers while preserving multiline cursor motion, the exact unsent draft and cursor, and Normal-mode redoSetTextPanelComposerHistoryhost call, merging late storage results without discarding newer in-memory prompts0.15.0How to Test
Ctrl-r, type a substring, and useCtrl-r, Up, or Down to cycle matches. Enter should load the match without sending it; Escape orCtrl-gshould restore the untouched draft. Normal-modeCtrl-rshould still redo.Ctrl-r.Automated coverage:
cargo test --all-features --lib -- --test-threads=1(2,040 passed, 1 ignored)cargo clippy --all-targets --all-features -- -D warningscargo fmt --all -- --check