feat(core): add support for MCP progress updates#19046
feat(core): add support for MCP progress updates#19046NTaylorMullen wants to merge 1 commit intomainfrom
Conversation
- Implement progressToken generation and notification handling in McpClient - Update Scheduler to listen for McpProgress events and update tool execution state - Enhance CLI UI to display real-time progress messages and percentages Fixes #6590
Summary of ChangesHello @NTaylorMullen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces comprehensive support for displaying real-time progress updates for long-running Model Context Protocol (MCP) tool calls. It integrates a new event system for progress notifications, updates the core MCP client to handle and report these notifications, and modifies the scheduler to track the progress state. The user interface has also been enhanced to visually present this progress information, providing users with better feedback during tool execution. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Size Change: +3.36 kB (+0.01%) Total Size: 24.4 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for Model Context Protocol (MCP) progress updates, providing real-time feedback for long-running tool calls. The changes are well-structured, spanning from the core event system and MCP client to the scheduler and CLI UI components. Key additions include the McpProgress event, a McpProgressReporter in the client to manage progress tokens, and UI updates to display progress messages and percentages. The implementation is robust, with proper handling of token registration/unregistration and state updates. The accompanying tests are thorough and cover the new functionality well. Overall, this is a solid feature addition that enhances the user experience for tool execution.
Summary
Added support for Model Context Protocol (MCP) progress updates to provide real-time feedback for long-running tool calls.
Details
McpProgressevent and payload tocoreEvents.McpProgressReporterto manageprogressTokentocallIdmapping.notifications/progresshandler to receive and broadcast progress from servers.progressTokento the_metafield of tool call requests.ExecutingToolCalltype to trackprogressMessageandprogressPercent.Schedulerto listen for progress events and update the state manager.IndividualToolCallDisplayand mapping logic to propagate progress fields.ToolInfocomponent inToolShared.tsxto display the message and percentage in the tool header while executing.Example Test Server:
Related Issues
Fixes #6590
How to Validate
notifications/progressmethod).Pre-Merge Checklist