Add front end logic for MCP connectors

This commit is contained in:
Manoj Aggarwal 2026-01-13 21:10:03 -08:00
parent 792548b379
commit c78ea98a68
8 changed files with 71 additions and 65 deletions

View file

@ -56,12 +56,6 @@ export const MCPConfig: FC<MCPConfigProps> = ({ connector, onConfigChange, onNam
const serverConfigs = mcpConn.config?.server_configs as MCPServerConfig[] | undefined;
if (serverConfigs && Array.isArray(serverConfigs)) {
allServerConfigs.push(...serverConfigs);
} else {
// Fallback to single server_config
const serverConfig = mcpConn.config?.server_config as MCPServerConfig | undefined;
if (serverConfig) {
allServerConfigs.push(serverConfig);
}
}
}

View file

@ -99,7 +99,7 @@ export const ConnectorConnectView: FC<ConnectorConnectViewProps> = ({
</div>
<div>
<h2 className="text-xl sm:text-2xl font-semibold tracking-tight">
Connect {getConnectorTypeDisplay(connectorType)}
Connect {connectorType === "MCP_CONNECTOR" ? "MCP(s)" : getConnectorTypeDisplay(connectorType)}
</h2>
<p className="text-xs sm:text-base text-muted-foreground mt-1">
Enter your connection details
@ -139,7 +139,7 @@ export const ConnectorConnectView: FC<ConnectorConnectViewProps> = ({
Connecting...
</>
) : (
<>Connect {getConnectorTypeDisplay(connectorType)}</>
<>Connect {connectorType === "MCP_CONNECTOR" ? "MCP(s)" : getConnectorTypeDisplay(connectorType)}</>
)}
</Button>
</div>