feat(mcp): show MCP loading status before first response#1318
Merged
feat(mcp): show MCP loading status before first response#1318
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces explicit wire-level MCP loading lifecycle events and wires them through both CLI shell and web UIs so users get immediate feedback while MCP tools are connecting, before the first assistant response.
Changes:
- Add new wire event types
MCPLoadingBegin/MCPLoadingEnd(Python + web TypeScript). - Emit loading events in
KimiSoulwhen MCP tool loading is still pending (using newKimiToolset.has_pending_mcp_tools()). - Render MCP loading indicators in both the shell UI (spinner) and web session stream (temporary status message), and update ACP session matching + wire serde tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/hooks/wireTypes.ts | Adds TS wire event types and includes them in the WireEvent union. |
| web/src/hooks/useSessionStream.ts | Displays/removes a temporary “Connecting to MCP servers…” status message on MCP loading events. |
| tests/core/test_wire_message.py | Extends wire serde snapshot coverage to include the new MCP loading message types. |
| src/kimi_cli/wire/types.py | Defines MCPLoadingBegin/End models and includes them in the wire Event union + exports. |
| src/kimi_cli/ui/shell/visualize.py | Adds an MCP “connecting” spinner and prioritizes it in the live view compose order. |
| src/kimi_cli/soul/toolset.py | Adds has_pending_mcp_tools() helper to detect in-flight background MCP loading. |
| src/kimi_cli/soul/kimisoul.py | Emits MCPLoadingBegin/End around wait_for_mcp_tools() when MCP loading is pending. |
| src/kimi_cli/acp/session.py | Updates match handling to accept/ignore the new MCP loading messages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kai <me@kaiyi.cool>
… lingering loading indicators
This was referenced Mar 3, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds explicit MCP loading status events and surfaces them in both shell and web UIs so users see feedback while MCP tools are connecting.
MCPLoadingBegin/MCPLoadingEndwire events.KimiSoulwhen MCP tool loading is pending.has_pending_mcp_tools()inKimiToolsetto gate event emission.Connecting to MCP servers...spinner.Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.