fix: UI bug fixed

This commit is contained in:
qixinbo
2026-03-29 23:40:12 +08:00
parent 72d25826a1
commit a3fbfb301a
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -358,7 +358,7 @@ class NanobotIntegration:
if project_id is not None:
from app.api.mcp import list_mcp_servers
from nanobot.config.schema import MCPServerConfig
servers = list_mcp_servers(project_id=project_id)
servers = await list_mcp_servers(project_id=project_id)
for s in servers:
cfg = MCPServerConfig(
type=s.get("type"),
+3 -2
View File
@@ -747,11 +747,12 @@ export function ChatInterface() {
};
const renderActiveSelections = () => {
if (!selectedDataSource && !selectedKnowledgeBaseId) return null;
const hasValidDataSourceSelection = Boolean(selectedDataSource && selectedDataSourceName);
if (!hasValidDataSourceSelection && !selectedKnowledgeBaseId) return null;
return (
<div className="px-2 pt-2">
<div className="flex flex-wrap gap-2">
{selectedDataSource ? (
{hasValidDataSourceSelection ? (
<div className="px-3 py-1.5 rounded-full text-xs border flex items-center gap-1.5 bg-blue-50 text-blue-700 border-blue-200">
<Database className="h-3.5 w-3.5" />
{`${t('dataSource')}${selectedDataSourceName}`}