feat: add blob attachment type for inline base64 data#731
feat: add blob attachment type for inline base64 data#731MackinnonBuck wants to merge 2 commits intomainfrom
Conversation
Cross-SDK Consistency Review ✅This PR successfully adds the ✅ What's great:
Minor suggestion:There are a couple of documentation comments that could be updated for completeness (see inline comments), but these are non-blocking polish items. The actual implementation is solid and consistent across all SDKs. Great work maintaining feature parity! 🎉
|
75cd246 to
9d9671a
Compare
SDK Consistency Review: Critical Issues Found
|
9d9671a to
7f62d6c
Compare
|
CI failures are expected until the runtime PR merges. |
Add support for a new 'blob' attachment type that allows sending base64-encoded content (e.g. images) directly without disk I/O. Generated types will be updated automatically when the runtime publishes the new schema to @github/copilot. This commit includes: - Add blob variant to Node.js and Python hand-written types - Export attachment types from Python SDK public API - Update docs: image-input.md, all language READMEs, streaming-events.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7f62d6c to
7398b25
Compare
✅ Cross-SDK Consistency ReviewI've reviewed PR #731 for cross-SDK consistency across all four language implementations (Node.js/TypeScript, Python, Go, and .NET). Summary: Excellent consistency maintained ✨This PR successfully adds the Type Definitions ✅
API Consistency ✅All SDKs expose the same three required/optional fields with appropriate naming conventions:
Documentation ✅
No consistency issues found 🎉The implementation properly accounts for language idioms (camelCase in TS/Python dict keys, PascalCase in Go/C# public APIs) while maintaining semantic equivalence across all SDKs.
|
There was a problem hiding this comment.
Pull request overview
Adds cross-SDK support for a new "blob" attachment type so callers can send inline base64 content (e.g., images) without writing to disk first, alongside the existing file/directory/selection attachment mechanisms.
Changes:
- Extended Node and Python attachment type unions to include
type: "blob"with base64data+mimeType. - Exported Python attachment-related types from the package public API.
- Updated docs and scenario documentation with blob-attachment examples across Node/Python/Go/.NET.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/scenarios/prompts/attachments/README.md | Documents the blob attachment wire format and language-specific syntax. |
| python/copilot/types.py | Adds BlobAttachment TypedDict and extends the Attachment union. |
| python/copilot/init.py | Re-exports attachment types (Attachment, BlobAttachment, etc.) from the public API. |
| python/README.md | Adds a blob-attachment example to the Image Support section. |
| nodejs/src/types.ts | Extends MessageOptions.attachments union with a "blob" variant. |
| nodejs/README.md | Adds a blob-attachment example to the Image Support section. |
| go/README.md | Adds a blob-attachment example to the Image Support section. |
| dotnet/README.md | Adds blob-attachment example and updates file-attachment snippet to the derived attachment type. |
| docs/features/streaming-events.md | Updates attachment type list to include blob. |
| docs/features/image-input.md | Adds “Quick Start — Blob Attachment” with examples for all four languages and updates guidance. |
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
✅ Cross-SDK Consistency Review: PASSEDI've completed a comprehensive review of this PR for cross-language SDK consistency. No issues found — this PR maintains excellent feature parity across all four SDK implementations. SummaryThis PR adds support for the Verification Results
Field Naming ConsistencyAll SDKs expose the same three fields with language-appropriate naming conventions:
Documentation Coverage✅ All language READMEs updated with blob attachment examples Notes
Recommendation: Approve — This PR maintains full cross-SDK feature parity with appropriate language idioms.
|
Summary
Add support for the new
blobattachment type, which allows sending base64-encoded content (e.g. images, screenshots) directly to Copilot sessions without writing to disk first.This complements the existing
fileattachment type. While file attachments require a path on disk, blob attachments accept inline base64 data — useful when images are already in memory (screenshots, API responses, generated images).Changes
Hand-written types
nodejs/src/types.ts): Addedtype: "blob"variant to theMessageOptions.attachmentsunionpython/copilot/types.py): AddedBlobAttachmentTypedDict withtype,data,mimeType,displayNamefields; updatedAttachmentunionPublic API exports
python/copilot/__init__.py): ExportedBlobAttachment,FileAttachment,DirectoryAttachment,SelectionAttachment, andAttachmentfrom the public APIDocumentation
docs/features/image-input.md: Added "Quick Start — Blob Attachment" section with examples for all 4 languages; updated overview, tips, and supported formatsdocs/features/streaming-events.md: Added "blob" to the attachment type listtest/scenarios/prompts/attachments/README.md: Documented blob attachment format and language-specific syntaxNot included
mainvia the@github/copilot1.0.4 package update (Update @github/copilot to 1.0.4 #796)Related