fix: UI bug fixed
This commit is contained in:
@@ -358,7 +358,7 @@ class NanobotIntegration:
|
|||||||
if project_id is not None:
|
if project_id is not None:
|
||||||
from app.api.mcp import list_mcp_servers
|
from app.api.mcp import list_mcp_servers
|
||||||
from nanobot.config.schema import MCPServerConfig
|
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:
|
for s in servers:
|
||||||
cfg = MCPServerConfig(
|
cfg = MCPServerConfig(
|
||||||
type=s.get("type"),
|
type=s.get("type"),
|
||||||
|
|||||||
@@ -747,11 +747,12 @@ export function ChatInterface() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const renderActiveSelections = () => {
|
const renderActiveSelections = () => {
|
||||||
if (!selectedDataSource && !selectedKnowledgeBaseId) return null;
|
const hasValidDataSourceSelection = Boolean(selectedDataSource && selectedDataSourceName);
|
||||||
|
if (!hasValidDataSourceSelection && !selectedKnowledgeBaseId) return null;
|
||||||
return (
|
return (
|
||||||
<div className="px-2 pt-2">
|
<div className="px-2 pt-2">
|
||||||
<div className="flex flex-wrap gap-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">
|
<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" />
|
<Database className="h-3.5 w-3.5" />
|
||||||
{`${t('dataSource')}:${selectedDataSourceName}`}
|
{`${t('dataSource')}:${selectedDataSourceName}`}
|
||||||
|
|||||||
Reference in New Issue
Block a user