Skip to content

Pass session capabilities to chat parser#314027

Merged
roblourens merged 4 commits intomainfrom
agents/when-i-send-a-chat-message-from-the-e025da95
May 6, 2026
Merged

Pass session capabilities to chat parser#314027
roblourens merged 4 commits intomainfrom
agents/when-i-send-a-chat-message-from-the-e025da95

Conversation

@roblourens
Copy link
Copy Markdown
Member

When parsing outgoing chat requests, use the contributed chat session capabilities as the attachment capability context, matching the remote session restore path. This keeps slash prompt commands highlighted correctly for agent-host sessions when messages are first sent, not only after reopening the session.

Adds targeted coverage for both live send and restored history parsing paths. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 4, 2026 04:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Screenshot Changes

Base: 88511523 Current: 2f0a18da

Changed (13)

chat/input/chatInput/Default/Dark
Before After
before after
chat/input/chatInput/Default/Light
Before After
before after
chat/input/chatInput/WithArtifacts/Light
Before After
before after
chat/input/chatInput/WithFileChanges/Light
Before After
before after
chat/input/chatInput/WithTodos/Dark
Before After
before after
chat/input/chatInput/WithTodos/Light
Before After
before after
chat/input/chatInput/WithTodosAndFileChanges/Dark
Before After
before after
chat/input/chatInput/WithTodosAndFileChanges/Light
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Dark
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Light
Before After
before after
chat/widget/chatWidget/SimpleQA/Dark
Before After
before after
chat/widget/chatWidget/SimpleQA/Light
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Light
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns outgoing chat request parsing with the remote session restore parsing path by ensuring contributed chat session capabilities are passed through as the parser’s attachment-capability context. This keeps slash prompt commands highlighted correctly for agent-host sessions immediately on send.

Changes:

  • Pass session-contributed attachment capabilities into ChatRequestParser when parsing outgoing requests.
  • Centralize capability selection logic in ChatService via a small helper.
  • Add tests covering capability propagation for live send and remote-history restore parsing.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts Ensures attachmentCapabilities passed to the request parser prefer contributed session capabilities (matching restore path).
src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts Adds targeted tests asserting /skill ... is parsed as a ChatRequestSlashPromptPart for agent-host sessions.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens
Copy link
Copy Markdown
Member Author

@copilot review

(Written by Copilot)

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

@copilot review

(Written by Copilot)

Addressed both issues raised in the review (commit 5cce8ec7):

  1. Fixed the typo in chatServiceImpl.ts: "Resolve slash commandsin" → "Resolve slash commands in"
  2. Added a test 'sendRequest with agentIdSilent passes agent host session capabilities to the request parser' that asserts /skill plan is parsed into a ChatRequestSlashPromptPart when using agentIdSilent (the locked-participant path used by ChatWidget).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts
@roblourens roblourens marked this pull request as ready for review May 6, 2026 04:19
@roblourens roblourens enabled auto-merge (squash) May 6, 2026 04:19
@roblourens roblourens merged commit a19e441 into main May 6, 2026
53 of 56 checks passed
@roblourens roblourens deleted the agents/when-i-send-a-chat-message-from-the-e025da95 branch May 6, 2026 04:36
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 6, 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.

4 participants