XS✔ ◾ ✨ Custom prompts - Default built-in MCP servers to selected#770
XS✔ ◾ ✨ Custom prompts - Default built-in MCP servers to selected#770
Conversation
…k them in UI Co-authored-by: yaqi-lyu <121055451+yaqi-lyu@users.noreply.github.com>
PR Metrics✔ Thanks for keeping your pull request small.
Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs! |
|
🚀 Pre-release build is available for this PR: |
|
🚀 Pre-release build is available for this PR: |
There was a problem hiding this comment.
Pull request overview
This PR improves the custom prompt editor UX by automatically selecting built-in MCP servers by default (and keeping them selected), reducing the chance of running prompts without intended built-in tools. It also factors MCP server selection helpers into shared utilities with unit tests.
Changes:
- Added shared MCP selection utilities (
getBuiltinServerIds,getConnectedOrBuiltinIds,ensureBuiltinServerIds) plus tests. - Updated
PromptFormto pre-select built-in servers for new prompts and to merge missing built-ins into existing selections. - Adjusted prompt submit validation + UI messaging around disabled/disconnected servers and “no servers configured” states.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/ui/src/components/settings/custom-prompt/PromptForm.tsx | Defaults/locks built-in server selection; adjusts validation and UI copy for server selection. |
| src/shared/utils/mcp-utils.ts | Introduces shared helper functions for built-in/connected server ID selection and merging. |
| src/shared/utils/mcp-utils.test.ts | Adds vitest coverage for the new shared MCP utilities. |
| src/backend/services/mcp/mcp-server-manager.ts | Prevents “builtin” flagged entries from the external/stored list being merged as externals. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
🚀 Pre-release build is available for this PR: |
|
🚀 Pre-release build is available for this PR: |
|
✅ Automated Release Created Successfully Release Details:
You can monitor the build progress in the Actions tab. |
GitHub Copilot (claude-sonnet-4-5)
Users had to manually re-select built-in MCP servers every time they created a new custom prompt — repetitive and easy to miss, causing prompts to run without intended tools.
src/shared/utils/mcp-utils.ts(new)getBuiltinServerIds(servers)— pure utility that filters built-in server IDs from a config listsrc/shared/utils/mcp-utils.test.ts(new)src/ui/src/components/settings/custom-prompt/PromptForm.tsxshouldDirty: false)isCheckboxDisabled = isDefault || isBuiltin || isServerDisabled. The(Disabled)label now only appears forenabled === falseservers, not built-ins✏️
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest/home/REDACTED/work/_temp/ghcca-node/node/bin/node node scripts/postinstall.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.