Skip to content

chat: ask side questions from selected responses#327465

Merged
connor4312 merged 2 commits into
mainfrom
connor4312/side-chat-selection
Jul 25, 2026
Merged

chat: ask side questions from selected responses#327465
connor4312 merged 2 commits into
mainfrom
connor4312/side-chat-selection

Conversation

@connor4312

Copy link
Copy Markdown
Member

What changed

  • adds an Agents-window-only Ask Question affordance when selecting assistant markdown in a chat response
  • reuses the feedback input widget with accessible busy/error handling while a side chat is created and opened
  • anchors the new side chat to the selected response and preserves the exact selected-text snapshot through Agent Host context
  • keeps /btw on the shared side-chat orchestration path
  • documents the behavior and adds focused unit and cross-provider replay coverage

Validation

  • npm run typecheck-client
  • npm run valid-layers-check
  • npm run precommit
  • focused browser unit tests: 29 passing
  • focused Copilot Agent Host E2E strict replay: passing
  • focused Claude Agent Host E2E strict replay: passing

Reuse the feedback input affordance in the Agents window to create side chats from selected assistant markdown, with accessible pending state and Agent Host context coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 25, 2026 14:45
@connor4312
connor4312 enabled auto-merge (squash) July 25, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds an Agents-window-only “Ask Question” side-chat flow triggered from selected assistant markdown, reusing the existing feedback input UI (now extracted as a reusable widget) and keeping /btw and selection-based side chats on a shared orchestration path.

Changes:

  • Introduces response-selection side chat controller + selection resolver and wires it into the Agents window chat view.
  • Extracts a reusable FeedbackInputWidget with busy/accessibility handling and updates editor feedback overlay to use it.
  • Updates accessibility help text gating + expands unit/E2E replay coverage (including selection context propagation).
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/accessibility/chatAccessibilityHelp.test.ts Adds coverage for sessions-window-only accessibility help text.
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts Exposes getElementFromNode via the widget API.
src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Plumbs getElementFromNode through the list/renderer.
src/vs/workbench/contrib/chat/browser/chat.ts Extends IChatWidget with getElementFromNode.
src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts Gates “Ask Question” help text on sessions window via environment service.
src/vs/sessions/contrib/chat/test/browser/responseSelectionSideChatController.test.ts Adds focused unit tests for the selection side-chat UI/controller behavior.
src/vs/sessions/contrib/chat/test/browser/responseSelectionResolver.test.ts Adds tests for resolving valid/invalid selections to a single response.
src/vs/sessions/contrib/chat/browser/sideChatOrchestration.ts Centralizes open+send and create+open+send orchestration helpers.
src/vs/sessions/contrib/chat/browser/responseSelectionSideChatController.ts Implements “Ask Question” overlay and side-chat creation from selection.
src/vs/sessions/contrib/chat/browser/responseSelectionResolver.ts Resolves DOM selection to a single assistant response markdown scope.
src/vs/sessions/contrib/chat/browser/chatView.ts Wires the selection side-chat controller into the Agents window chat view lifecycle.
src/vs/sessions/contrib/chat/browser/btwSlashCommand.contribution.ts Reuses shared orchestration helper for /btw open+send.
src/vs/sessions/contrib/agentFeedback/test/browser/feedbackInputWidget.test.ts Adds unit tests for busy state and sizing behavior in extracted widget.
src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackEditorInput.css Adds disabled styling + busy indicator layout and reduced-motion handling.
src/vs/sessions/contrib/agentFeedback/browser/feedbackInputWidget.ts Extracts reusable textarea + action bar widget with accessible busy state.
src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackEditorInputContribution.ts Refactors editor feedback overlay to wrap and delegate to FeedbackInputWidget.
src/vs/sessions/SESSIONS.md Documents selection-triggered side chat behavior and busy/error semantics.
src/vs/platform/agentHost/test/node/e2e/suites/multiChatSuite.ts Extends multi-chat E2E to assert selection context arrives in side-chat origin/prompt.
src/vs/platform/agentHost/test/node/e2e/captures/copilotcli-side-chat-receives-bounded-source-context-without-copied-history.yaml Updates replay capture to include side-chat context block + selected text.
src/vs/platform/agentHost/test/node/e2e/captures/claude-side-chat-receives-bounded-source-context-without-copied-history.yaml Updates replay capture to include side-chat context block + selected text.
.github/skills/sessions/SKILL.md Adds guidance about not leaking sessions-only environment facts into shared APIs.

Review details

  • Files reviewed: 21/21 changed files
  • Comments generated: 6
  • Review effort level: Low

Comment thread src/vs/sessions/contrib/chat/browser/sideChatOrchestration.ts
Comment thread src/vs/sessions/contrib/chat/browser/sideChatOrchestration.ts
Comment thread src/vs/sessions/SESSIONS.md Outdated
@connor4312
connor4312 disabled auto-merge July 25, 2026 15:04
Preserve accessible labels and multiline input behavior, guard stale async UI completion after navigation, and normalize side-chat orchestration APIs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@connor4312
connor4312 enabled auto-merge (squash) July 25, 2026 15:49
@connor4312
connor4312 merged commit f6af01a into main Jul 25, 2026
29 checks passed
@connor4312
connor4312 deleted the connor4312/side-chat-selection branch July 25, 2026 16:51
@vs-code-engineering vs-code-engineering Bot added this to the 1.131.0 milestone Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants