-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix(ui): enable MCP UI to send a prompt message when an element is clicked #6207
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
Conversation
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 fixes a critical bug where MCP UI prompts were not being submitted to the chat. The append prop was missing from the ProgressiveMessageList component in BaseChat, causing interactive buttons in MCP UI resources to call an empty default function instead of actually submitting prompts. Additionally, the MCP Elicitation documentation page is being made publicly visible.
- Wires up the
appendprop to enable MCP UI prompt submission - Removes
unlisted: truefrom MCP Elicitation documentation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ui/desktop/src/components/BaseChat.tsx | Adds missing append prop to ProgressiveMessageList component, linking it to handleSubmit |
| documentation/docs/guides/mcp-elicitation.md | Removes unlisted: true to make the MCP Elicitation guide publicly visible |
|
…mpts The append prop was not being passed from BaseChat to ProgressiveMessageList, which meant MCP UI buttons that send 'prompt' type postMessages were calling an empty default function instead of actually submitting to the chat. This fix enables MCP UI interactive buttons to work properly by connecting the prompt action handler to handleSubmit.
6673186 to
98217c3
Compare
zanesq
left a comment
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.
LGTM!
* main: (155 commits) remove Tool Selection Strategy preview (#6250) fix(cli): correct bash syntax in terminal integration functions (#6181) fix : opening a session to view it modifies session history order in desktop (#6156) test: fix recipe and audio tests to avoid side effects (#6231) chore: Update gemini versions in test_providers.sh (#6246) feat: option to stream json - jsonl really (#6228) feat: add mcp app renderer (#6095) docs: update skills extension to support .agents/skills directories (#6199) Add YouTube short to Chrome DevTools MCP tutorial (#6244) docs: Caveats for privacy information in logs documentation (#6218) move goose issue solver to opus (#6233) feat: improved UX for tool calls via execute_code (#6205) Blog: Code Mode Doesn't Replace MCP (#6227) fix: prevent keychain requests during cargo test (#6219) test: fix test_max_turns_limit slow execution and wrong message type (#6221) Skills vs MCP blog (#6220) Add blog post: Does Your AI Agent Need a Plan? (#6209) fix(ui): enable MCP UI to send a prompt message when an element is clicked (#6207) docs: param option for recipe deeplink/open (#6206) docs: edit in place or fork session (#6203) ...
Summary
The
appendprop was not being passed fromBaseChattoProgressiveMessageList, which meant MCP UI buttons that sendprompttype postMessages were calling an empty default function() => {}instead of actually submitting to the chat.Problem
When an MCP UI (rendered via
MCPUIResourceRenderer) sends a prompt message like:The message was received by
@mcp-ui/client, which calledappendPromptToChat(prompt)inMCPUIResourceRenderer. However, sinceappendwas not passed down through the component chain, it defaulted to an empty function and nothing happened.Fix
Added the missing
appendprop toProgressiveMessageListinBaseChat.tsx:Testing
Related
This fix is also required for the MCP Apps feature branch (
feat/add-mcp-app-renderer) to work properly, as it also relies on theappendprop flowing down fromBaseChat.Broken version
Screen.Recording.2025-12-19.at.5.37.47.PM.mov
Fixed version
Screen.Recording.2025-12-19.at.5.35.57.PM.mov
watch on 2x speed