Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Add support for image attachments in chat messages and update related schemas - #3594

Merged
TylerLeonhardt merged 3 commits into
mainfrom
tyler/usual-perch
Feb 10, 2026
Merged

TylerLeonhardt merged 3 commits into
mainfrom
tyler/usual-perch

Conversation

@TylerLeonhardt

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings February 9, 2026 22:41
@TylerLeonhardt TylerLeonhardt self-assigned this Feb 9, 2026
@vs-code-engineering vs-code-engineering Bot added this to the February 2026 milestone Feb 9, 2026

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

Adds end-to-end support for image attachments flowing through Claude session parsing, chat history reconstruction, and Claude agent prompt construction, and advertises the new capability via contributed chat participant metadata.

Changes:

  • Parse/validate image content blocks in Claude session JSONL and add MIME-type normalization utilities.
  • Convert session image blocks into VS Code chat prompt references (binary data or URL URIs) when building chat history.
  • Resolve ChatReferenceBinaryData references into Anthropic image content blocks when sending prompts to Claude, and expose supportsImageAttachments in package.json.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/extension/chatSessions/vscode-node/test/chatHistoryBuilder.spec.ts Adds unit tests ensuring image blocks become chat references (binary + URL).
src/extension/chatSessions/vscode-node/chatHistoryBuilder.ts Extracts image blocks into ChatPromptReference[] and allows image-only request turns.
src/extension/agents/claude/node/test/mockClaudeCodeSdkService.ts Captures received SDK user messages for assertions in tests.
src/extension/agents/claude/node/test/claudeCodeAgent.spec.ts Adds tests verifying image references are converted into Anthropic image blocks (and MIME normalization/skips).
src/extension/agents/claude/node/sessionParser/test/claudeSessionSchema.spec.ts Adds schema validation tests for image blocks and MIME normalization.
src/extension/agents/claude/node/sessionParser/claudeSessionSchema.ts Introduces vImageBlock and toAnthropicImageMediaType for supported image MIME types.
src/extension/agents/claude/node/claudeCodeAgent.ts Updates prompt resolution to include image content blocks based on ChatReferenceBinaryData.
package.json Declares supportsImageAttachments capability for the Claude agent participant.

@TylerLeonhardt
TylerLeonhardt added this pull request to the merge queue Feb 9, 2026
Merged via the queue into main with commit 015d124 Feb 10, 2026
19 checks passed
@TylerLeonhardt
TylerLeonhardt deleted the tyler/usual-perch branch February 10, 2026 00:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude mode does not support images yet

3 participants