feat(tui): show MCP server summary in welcome panel and update /mcp hints#223
feat(tui): show MCP server summary in welcome panel and update /mcp hints#223kermanx wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: b2cf284 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2cf284761
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| host.state.theme.colors.textMuted, | ||
| ); | ||
| host.setAppState({ | ||
| mcpServersSummary: formatMcpStartupStatusSummary(hidden, visible.length), |
There was a problem hiding this comment.
Include visible servers in welcome MCP summary
In syncMcpServerStatusSnapshot, mcpServersSummary is built from hidden, which explicitly excludes every server selected for the startup status rows. As a result, the welcome panel shows no MCP line for the common case of four or fewer non-disabled servers (for example, one connected server), and when disabled servers are present it summarizes only disabled/overflow servers rather than the current overall MCP state advertised by the feature.
Useful? React with 👍 / 👎.
| availableModels: {}, | ||
| availableProviders: {}, | ||
| sessionTitle: null, | ||
| mcpServersSummary: null, |
There was a problem hiding this comment.
Clear MCP summary before rendering a new session
This summary is stored in shared AppState, but resetSessionRuntime/syncRuntimeState never clears it before clearTranscriptAndRedraw() renders the next session's welcome panel. After switching from a session with an MCP summary to another session, the old summary remains visible until this async snapshot finishes, and it can remain indefinitely if listMcpServers() fails, so the welcome panel can show MCP state from the previous session.
Useful? React with 👍 / 👎.
| host.setAppState({ | ||
| mcpServersSummary: formatMcpStartupStatusSummary(hidden, visible.length), | ||
| }); |
There was a problem hiding this comment.
Recompute welcome MCP counts on status events
This only seeds mcpServersSummary from the startup snapshot; later mcp.server.status events still go through renderMcpServerStatus() and never update the app-state summary. In a startup where a hidden server is initially pending/failed and then connects (or needs auth), the welcome panel continues to show the stale count until another full snapshot is taken, so the advertised live MCP summary becomes misleading.
Useful? React with 👍 / 👎.
Problem
用户在启动 Kimi Code 时,无法快速感知当前 MCP 服务器的整体状态;
同时
/mcp命令的输出缺少明确的配置入口提示,且提示语中混用了/skill:mcp-config与/mcp-config。What changed
Welcome 面板增加 MCP 状态行
WelcomeComponent)的Directory / Session / Model / Version下方新增一行 MCP:,实时展示当前会话的 MCP 服务器摘要,例如1 connected · 2 disabled。session-event-handler在启动同步 MCP 状态后,将摘要写入AppState.mcpServersSummary,Welcome 面板随状态变化自动刷新。/mcp输出面板增加配置入口提示Configure with /mcp-config,让用户无需记忆命令即可找到配置入口。统一 MCP 相关提示语
needs-authaction、空状态提示、OAuth 错误提示)统一使用/mcp-config,去掉/skill:mcp-config的混用。Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.