Skip to content

feat: add mcp server picker header slot - #267

Closed
SonyLeo wants to merge 2 commits into
opentiny:developfrom
SonyLeo:feat/add-mcp-header-slot
Closed

feat: add mcp server picker header slot#267
SonyLeo wants to merge 2 commits into
opentiny:developfrom
SonyLeo:feat/add-mcp-header-slot

Conversation

@SonyLeo

@SonyLeo SonyLeo commented Dec 2, 2025

Copy link
Copy Markdown
Collaborator

增加头部操作插槽

Summary by CodeRabbit

  • New Features

    • Added support for custom header actions in MCP Server Picker via a named slot, enabling customization of the component header.
  • Documentation

    • Added Slots section to MCP Server Picker documentation describing the header-actions slot and its default content.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 2, 2025

Copy link
Copy Markdown

Walkthrough

A new header-actions slot is added to the MCP Server Picker component, enabling custom header action injection, with corresponding documentation updates describing the slot's purpose and default content.

Changes

Cohort / File(s) Change Summary
Component slot implementation
packages/components/src/mcp-server-picker/index.vue
Added named slot header-actions in component header to allow custom action injection
Documentation
docs/src/components/mcp-server-picker.md
Added "Slots" subsection documenting the header-actions slot with description and default content

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Straightforward slot addition with minimal scope
  • Documentation aligns with implementation
  • No complex logic or state management changes
  • Homogeneous, focused changes across only two files

Poem

🐰 A slot so fine, in headers bright,
Where custom actions dance in light!
We hop and cheer, the path is clear,
For header-actions, no more fear! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a header slot to the mcp-server-picker component. It is concise, specific, and directly relates to the modifications in both the documentation and Vue component files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/components/src/mcp-server-picker/index.vue (1)

303-312: Header header-actions slot integration looks good

The slot is added in a non-breaking way before existing header actions, preserving current UX while enabling extension. Layout inside the flex container also remains predictable for consumers.

If you expect complex content in this slot later, consider documenting that it renders alongside (not instead of) the built-in “自定义添加”按钮和关闭图标, so consumers know to combine it with showCustomAddButton when they want full control.

docs/src/components/mcp-server-picker.md (1)

83-89: Clarify that header-actions augments, not replaces, header actions

The table correctly documents the slot, but readers might assume using header-actions replaces all right-side actions. In the component, this slot is rendered before the built-in “自定义添加”按钮和关闭图标.

Consider tweaking the description, e.g. “头部右侧额外操作区插槽(与自带按钮并排显示,可配合 showCustomAddButton 使用)”, to make the relationship with默认按钮更直观。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b775495 and 09e32ce.

📒 Files selected for processing (2)
  • docs/src/components/mcp-server-picker.md (1 hunks)
  • packages/components/src/mcp-server-picker/index.vue (1 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: e2e-tests

@SonyLeo SonyLeo closed this Dec 25, 2025
@SonyLeo SonyLeo reopened this Dec 25, 2025
@SonyLeo SonyLeo closed this Dec 26, 2025
@SonyLeo SonyLeo reopened this Dec 26, 2025
@github-actions

github-actions Bot commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

🧹 Preview Cleaned Up

The preview deployment has been removed.

@github-actions

github-actions Bot commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

✅ Preview build completed successfully!

Click the image above to preview.
Preview will be automatically removed when this PR is closed.

@github-actions

Copy link
Copy Markdown
Contributor

@SonyLeo SonyLeo closed this Dec 26, 2025
@SonyLeo
SonyLeo deleted the feat/add-mcp-header-slot branch December 26, 2025 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant