Skip to content

Inline simple attachments for Copilot SDK#321518

Closed
dmitrivMS wants to merge 1 commit into
mainfrom
dev/dmitriv/agent-host-code-attachment
Closed

Inline simple attachments for Copilot SDK#321518
dmitrivMS wants to merge 1 commit into
mainfrom
dev/dmitriv/agent-host-code-attachment

Conversation

@dmitrivMS

Copy link
Copy Markdown
Contributor

Fixes #320612

Copilot AI review requested due to automatic review settings June 15, 2026 22:18
@dmitrivMS dmitrivMS added the agent-host Issues for the agent-host implementation (not the protocol) label Jun 15, 2026
@dmitrivMS dmitrivMS requested a review from connor4312 June 15, 2026 22:18
@dmitrivMS dmitrivMS self-assigned this Jun 15, 2026
@dmitrivMS dmitrivMS requested a review from DonJayamanne June 15, 2026 22:18
@dmitrivMS dmitrivMS enabled auto-merge (squash) June 15, 2026 22:18
@dmitrivMS dmitrivMS requested a review from roblourens June 15, 2026 22:18

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

This PR addresses #320612 by changing how Copilot SDK “Simple” attachments (those carrying modelRepresentation, e.g. pasted code blocks/feedback text) are sent: instead of being transmitted as opaque SDK blob attachments, they’re appended directly to the prompt so the model receives the content inline.

Changes:

  • Inline Simple attachments with modelRepresentation into the outgoing prompt in CopilotAgentSession.send.
  • Only forward non-simple (or non-inlineable) attachments through the Copilot SDK attachments field.
  • Update the Copilot agent session unit test to expect the new prompt shape (and no SDK attachments) for simple attachments.
Show a summary per file
File Description
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Inlines Simple attachment modelRepresentation text into the prompt and stops converting it to SDK blob attachments.
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts Updates expectations to validate prompt inlining behavior for simple attachments.

Copilot's findings

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

@dmitrivMS

Copy link
Copy Markdown
Contributor Author

Not needed - CLI regression.

@dmitrivMS dmitrivMS closed this Jun 16, 2026
auto-merge was automatically disabled June 16, 2026 00:52

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-host Issues for the agent-host implementation (not the protocol)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

local agent host: pasted code block attachments aren't sent

2 participants