Inline chat v3: add history navigation on arrow up/down#303427
Merged
Conversation
Co-authored-by: jrieken <1794099+jrieken@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/f58ffb33-62c1-4de4-866d-cdf17e6d849b
Copilot
AI
changed the title
[WIP] Fix inline chat v3 to have history on arrow up/down
Inline chat v3: add history navigation on arrow up/down
Mar 20, 2026
jrieken
approved these changes
Mar 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds prompt history navigation to the Inline Chat v3 input widget so users can recall previously submitted prompts with Up/Down arrows, mirroring established patterns (e.g., SCM input history).
Changes:
- Introduces a
HistoryNavigator2<string>toInlineChatInputWidgetand wires Up/Down arrow handling for history traversal (with action bar focus fallback). - Adds
addToHistory(value)on the input widget and calls it from submit/queue actions prior to hiding the widget. - Resets the history cursor on widget
show()so each open starts at the uncommitted tail.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.ts | Adds HistoryNavigator2 state and arrow-key handling for history navigation within the inline chat input editor. |
| src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.ts | Records submitted/queued prompts into the new input history before hiding the widget. |
aeschli
approved these changes
Mar 20, 2026
Member
|
@copilot How we make it that #sym:_historyNavigator is shared across all instances of the #sym:InlineChatInputWidget ? Now, each instance has a different history and IMO that's not so good. Can we have a service for this? Ideally the service also handles persistence so that history survives reloads |
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.
Inline chat v3 input widget lacks history navigation — pressing arrow up/down does not recall previously sent prompts.
Adds
HistoryNavigator2-based history toInlineChatInputWidget, following the same pattern as SCM input (SCMInput.showPreviousHistoryValue):HistoryNavigator2<string>tracks submitted prompts; last entry is always the uncommitted current textreplaceLast, navigates to previous entryaddToHistory(value)called fromSubmitInlineChatInputActionandQueueInChatActionbefore hiding💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.