-
Notifications
You must be signed in to change notification settings - Fork 39
fix: ui/message accepts message array #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
commit: |
There was a problem hiding this 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 the ui/message specification with the existing implementation in the ext-apps SDK by changing the content parameter from a single object to an array of content blocks. This enables multi-modal messages such as combining text and images in a single message.
Key changes:
- Updated
ui/messagecontent parameter to accept an array of content blocks instead of a single object - Maintains consistency with the existing TypeScript implementation which already uses
ContentBlock[]from the MCP SDK - Enables the use case mentioned in issue #48 for multi-modal messages
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| content: [ | ||
| { | ||
| type: "text", | ||
| text: string | ||
| } | ||
| ] |
Copilot
AI
Dec 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specification should document what content types are supported in the content array. While the PR description mentions supporting images (e.g., "prompting the agent with a text message and an image"), the spec only shows a single text content block.
Consider adding:
- A reference to the MCP SDK's
ContentBlocktype definition - Documentation of supported content types (text, image, etc.)
- An example showing multiple content items in the array (e.g., text + image)
This would help implementers understand the full capabilities of this API and align with the stated goal of supporting additional use cases like multi-modal messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ochafik I see that the SDK supports ContentBlock as-is. There are types that are extremely cool and open up really interesting use cases, but I'm not sure hosts would know how to support and may require negotiation (e.g., audio, embedded resource). Should we limit it to text (and perhaps image if we add negotiation) for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec defines the
ui/message's content as a single message. Passing an array would support additional use cases (e.g., prompting the agent with a text message and an image). This is already the implementation in theext-appsSDK.See #48