mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🪄 fix: MCP UI Renders for OAuth and Custom User Vars Servers (#9559)
This commit is contained in:
parent
8d6cb5eee0
commit
a2ff6613c5
3 changed files with 11 additions and 22 deletions
|
|
@ -8,7 +8,6 @@ function MCPSelectContent() {
|
|||
const { conversationId, mcpServerManager } = useBadgeRowContext();
|
||||
const {
|
||||
localize,
|
||||
isPinned,
|
||||
mcpValues,
|
||||
isInitializing,
|
||||
placeholderText,
|
||||
|
|
@ -69,14 +68,6 @@ function MCPSelectContent() {
|
|||
[getServerStatusIconProps, isInitializing],
|
||||
);
|
||||
|
||||
if ((!mcpValues || mcpValues.length === 0) && !isPinned) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!configuredServers || configuredServers.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const configDialogProps = getConfigDialogProps();
|
||||
|
||||
return (
|
||||
|
|
@ -102,8 +93,13 @@ function MCPSelectContent() {
|
|||
}
|
||||
|
||||
function MCPSelect() {
|
||||
const { mcpServerNames } = useBadgeRowContext();
|
||||
if ((mcpServerNames?.length ?? 0) === 0) return null;
|
||||
const { mcpServerManager } = useBadgeRowContext();
|
||||
const { configuredServers } = mcpServerManager;
|
||||
|
||||
if (!configuredServers || configuredServers.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <MCPSelectContent />;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue