🐛 fix: Display OAuth MCP servers according to Chat Menu Setting (#8643)

* fix: chatMenu not being respected in MCPSelect

* fix: chatMenu not being respected in MCPSubMenu
This commit is contained in:
Dustin Healy 2025-07-25 07:21:10 -07:00 committed by GitHub
parent ec67cf2d3a
commit 3dc9e85fab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 5 deletions

View file

@ -17,9 +17,14 @@ function MCPSelect() {
const { mcpSelect, startupConfig } = useBadgeRowContext();
const { mcpValues, setMCPValues, mcpToolDetails, isPinned } = mcpSelect;
// Get all configured MCP servers from config
// Get all configured MCP servers from config that allow chat menu
const configuredServers = useMemo(() => {
return Object.keys(startupConfig?.mcpServers || {});
if (!startupConfig?.mcpServers) {
return [];
}
return Object.entries(startupConfig.mcpServers)
.filter(([, config]) => config.chatMenu !== false)
.map(([serverName]) => serverName);
}, [startupConfig?.mcpServers]);
const [isConfigModalOpen, setIsConfigModalOpen] = useState(false);