This repository was archived by the owner on May 20, 2026. It is now read-only.
Repository navigation
Add support for image attachments in chat messages and update related schemas - #3594
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
ChatReferenceBinaryDatareferences into Anthropicimagecontent blocks when sending prompts to Claude, and exposesupportsImageAttachmentsinpackage.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. |
Don Jayamanne (DonJayamanne)
approved these changes
Feb 9, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes microsoft/vscode#293474