feat: gear button on the Tool Exposure row opens settings pre-selecting the active profile#36
Open
dehuaichendragonplus wants to merge 1 commit into
Conversation
…pre-selecting the active profile The MCP Server window's Tool Exposure row was only a core/full dropdown; per-tool editing lived in a separate window reachable only via the Funplay/Tool Exposure menu, and that window always opened editing the "core" list even when "full" was active. - FunplayMCPToolExposurePanel: add a gear button (built-in SettingsIcon, with a "gear" text fallback + tooltip) to the right of the core/full dropdown; the dropdown flex-grows and the gear sits on its right. Clicking opens the Tool Exposure settings window. - FunplayToolExposureWindow: add a ShowWindow(string editProfile) overload that pre-selects which profile's tool list to edit, handling both a freshly-created window (CreateGUI reads _editingProfile) and a reused already-built window (setting the PopupField value reloads the list). The parameterless ShowWindow() menu handler is unchanged. - The gear reads the current MCPToolExportProfile on click, so with "full" selected the settings window opens editing the full list (157/157) instead of always starting on core. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Why
The MCP Server window's Tool Exposure row is just a
core/fulldropdown. The fine-grained, per-tool editing lives in a separate Tool Exposure window that is only reachable through theFunplay/Tool Exposuremenu item — not discoverable from the row it actually configures. Worse, that window always opened editing the core list even when full was the active profile, so a user who switched the row tofulland then went to customize was silently editing the wrong list.Approach
core/fullPopupFieldand a new gearButtonin a horizontal row — the dropdownflex-grows to fill and the gear sits on its right. The gear uses the built-in editorSettingsIcon(d_SettingsIconon the pro skin) with a⚙text fallback if the icon can't be resolved on some editor/skin, plus a tooltip. Clicking opens the Tool Exposure settings window.ShowWindow(string editProfile)overload that pre-selects which profile's tool list to edit. It handles both window lifecycles: a freshly-created window (itsCreateGUI/BuildUIreads_editingProfilewhen it builds) and a reused, already-built window (setting thePopupFieldvalue fires its change callback, which reloads the tool list). The parameterlessShowWindow()behind theFunplay/Tool Exposuremenu item is untouched.MCPToolExportProfileon click, so it always opens editing the list the user is actually using.New API
FunplayToolExposureWindow.ShowWindow(string editProfile)— additive overload; the existing parameterlessShowWindow()is unchanged.Benefits
Test results
Verified in Unity
6000.3.13f1:core/fulldropdown (screenshot-verified).ShowWindow("full")→ the window's_editingProfileand the "Edit Tool List" dropdown are bothfull, and the header readsEditing full: 157/157 tools(verified by reflection and by screenshot).ShowWindow("core")keeps editingcore.Compatibility
initialize, or tool-surface change, so it is compatible with every MCP client.ShowWindowoverload); the menu-item path and all existing window behavior are unchanged.Checklist
Funplay > MCP Serveropens and theFunplay/Tool Exposuremenu item still works.idea/or.DS_StoreCHANGELOG.md