fix: Modify some version issues#1582
Conversation
WalkthroughDefers toggling the help tour step by 1s when the tour is inactive; updates scoped styles and hides a robot dragging handle; hides the market tab and a popconfirm in the MCP picker; marks MCP servers as added and expands the initial server by default; upgrades three robot deps to 0.3.0-rc.0. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HelpIcon
participant Timer
participant State
User->>HelpIcon: trigger help step toggle
HelpIcon->>State: set helpBox = false
alt Tour inactive
HelpIcon->>Timer: setTimeout(1s)
Timer-->>HelpIcon: timeout
HelpIcon->>State: toggle showStep
else Tour active
HelpIcon->>State: toggle showStep (immediate)
end
sequenceDiagram
participant UI
participant useMcp
participant Servers as inUseMcpServers
UI->>useMcp: updateMcpServerStatus(server, added)
useMcp->>useMcp: server.added = added
alt added == true
useMcp->>Servers: create/push server entry
else added == false
useMcp->>Servers: remove server entry
end
note over Servers: initial engine server: expanded = true
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these settings in your CodeRabbit configuration. 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🔭 Outside diff range comments (2)
packages/plugins/robot/src/mcp/useMcp.ts (1)
116-145: Align with “expand on add” objective and avoid duplicate installs.Two improvements suggested:
- Expand newly added plugins by default (PR objective).
- Prevent duplicate entries in
inUseMcpServerswhen re-adding the same server.Apply this diff:
const updateMcpServerStatus = async (server: PluginInfo, added: boolean) => { // 市场添加状态修改 server.added = added if (added) { + // Avoid duplicates if the server is already in use + const existing = inUseMcpServers.value.find((p) => p.id === server.id) + if (existing) { + existing.enabled = true + existing.added = true + existing.expanded = true + existing.tools = server.tools || existing.tools || [] + existing.toolCount = existing.tools?.length || 0 + if (server.id === ENGINE_MCP_SERVER.id) { + await updateEngineTools() + updateEngineServer(existing, added) + } + connectMcpServer(existing) + return + } const newServer: PluginInfo = { ...server, id: server.id || `mcp-server-${Date.now()}`, enabled: true, added: true, - expanded: false, + expanded: true, tools: server.tools || [], toolCount: server.tools?.length || 0 } inUseMcpServers.value.push(newServer) if (server.id === ENGINE_MCP_SERVER.id) { await updateEngineTools() updateEngineServer(newServer, added) } // TODO: 连接MCP Server connectMcpServer(newServer)Note: Mutating
server.added(the market list item) is fine if the UI expects live reflection; otherwise, consider cloning or synchronizing through a dedicated store action.packages/plugins/robot/src/mcp/McpServer.vue (1)
18-23: Remove unsupported:show-market-tabprop from McpServerPicker — fix requiredVerified: @opentiny/tiny-robot's McpServerPicker does not expose a
show-market-tabprop, so that attribute is ignored and should be removed or replaced with a supported workaround.Files to update:
- packages/plugins/robot/src/mcp/McpServer.vue (around lines 18–23)
Suggested change (remove the unsupported prop):
@plugin-expand="handlePluginExpand" @plugin-add="updateMcpServerStatus" @plugin-toggle="handlePluginToggle" @tool-toggle="updateMcpServerToolStatus" />Options:
- Remove the prop (as above).
- Hide the market tab with CSS in your app if needed.
- Create a small wrapper around McpServerPicker to programmatically remove the tab entry.
🧹 Nitpick comments (1)
packages/plugins/robot/src/mcp/McpServer.vue (1)
83-89: Hiding delete popconfirm via CSS is brittle; prefer a prop/slot or narrowed selector.CSS-based suppression of
.tiny-popconfirmunder.plugin-card__operationscan be fragile against library DOM changes and may hide other confirmations unintentionally. If the picker supports disabling remove actions via props or slots, use that. If not, add a more specific selector or an inline comment explaining the intent.Example of a narrower selector (adjust if a more specific class exists for “installed” items):
:deep(.mcp-server-picker__content-item.installed) { .plugin-card__operations { .tiny-popconfirm { display: none !important; } } }Add a short comment:
// Hide delete confirmation for installed MCP plugins per product requirements
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/plugins/help/src/HelpIcon.vue(1 hunks)packages/plugins/robot/src/Main.vue(1 hunks)packages/plugins/robot/src/mcp/McpServer.vue(2 hunks)packages/plugins/robot/src/mcp/useMcp.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: push-check
🔇 Additional comments (1)
packages/plugins/robot/src/mcp/useMcp.ts (1)
53-54: Default expand for engine MCP server: LGTM.Setting
expanded: truefor the built-in engine server aligns with the “expand by default” objective and improves discoverability.
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
Refactor
Style
Chore