Fix inline chat follow-up actions being non-functional when editor loses focus#308183
Merged
Fix inline chat follow-up actions being non-functional when editor loses focus#308183
Conversation
…nning toolbar actions When the inline chat overlay widget shows follow-up actions (Rephrase, Ask in Chat, etc.), clicking them after focusing into another editor resulted in no action because EditorAction2 resolves the target editor via the focused/active code editor service. Add a custom ActionRunner that focuses the owning editor before running any toolbar action. Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/47203e8e-c359-4980-891c-3dee04e83d2f Co-authored-by: jrieken <1794099+jrieken@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix focus issue in InlineChatSessionOverlayWidget actions
Fix inline chat follow-up actions being non-functional when editor loses focus
Apr 7, 2026
jrieken
approved these changes
Apr 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes inline chat overlay toolbar actions (e.g., Rephrase / Keep / Undo) failing after the editor loses focus by ensuring the owning editor is focused before running toolbar actions, so EditorAction2 resolves the correct target editor.
Changes:
- Added a custom
ActionRunnerfor the inline chat overlayMenuWorkbenchToolBarto focus the owning editor before executing actions.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.ts | Adds a toolbar actionRunner that focuses the overlay’s editor before delegating to the action execution. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
…idget.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Screenshot ChangesBase: Changed (5) |
deepak1556
approved these changes
Apr 7, 2026
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 overlay toolbar actions (Rephrase, Ask in Chat, Keep, Undo) silently fail if the user focuses a different editor before clicking them. The actions extend
EditorAction2, which resolves the target editor viacodeEditorService.getFocusedCodeEditor()— returning the wrong editor after a focus change, soInlineChatController.get()finds nothing.Adds a custom
ActionRunnerto theMenuWorkbenchToolBarinInlineChatSessionOverlayWidgetthat focuses the owning editor before delegating to the action:Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
redirector.gvt1.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=10296 --enable-crash-reporter=22e96589-1fbf-499b-8b9a-9396b772936a,no_channel --user-data-dir=/tmp/vscode-tests-1775558631599 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5330674278902452832,13785858715475631409,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 n/sh on --pretty falsbash --inlineSources anguage-features--noprofile sh(dns block).build/electron/code-oss .build/electron/code-oss test/unit/electron/index.js --crash-reporter-directory=/home/REDACTED/work/vscode/vscode/.build/crashes --run src/vs/workbench/contrib/inlineChat/test/browser/inlineChatAffordance.test.ts xtensions/typescript-language-features/web/tsconfig.json --pretty false --sourceMap --inlineSourbash .build/electron/--project n/sh(dns block)If you need me to access, download, or install something from one of these locations, you can either: