diff --git a/desktop/src/features/agents/ui/AgentConfigPanel.tsx b/desktop/src/features/agents/ui/AgentConfigPanel.tsx index 26ecab3c0..c68563425 100644 --- a/desktop/src/features/agents/ui/AgentConfigPanel.tsx +++ b/desktop/src/features/agents/ui/AgentConfigPanel.tsx @@ -17,7 +17,7 @@ import { useAgentConfigSurface } from "../hooks"; import { cn } from "@/shared/lib/cn"; import { copyTextToClipboard } from "@/shared/lib/clipboard"; import { Spinner } from "@/shared/ui/spinner"; -import { McpServersSection } from "./McpServersSection"; +import { McpServersSection, BuzzAgentMcpServerRow } from "./McpServersSection"; import type { ConfigField, ConfigOrigin, @@ -366,8 +366,15 @@ export function AgentConfigPanel({ ); } - const { normalized, advanced, extensions, runtimeId, sources, isPreSpawn } = - data; + const { + normalized, + advanced, + extensions, + runtimeId, + sources, + isPreSpawn, + buzzAgentMcpServers, + } = data; const configFilePath = sources.configFilePath; const normalizedEntries = ( @@ -419,6 +426,19 @@ export function AgentConfigPanel({ 0 ? ( +
+ {buzzAgentMcpServers.map((server) => ( + + ))} +
+ ) : undefined + } extensions={extensions} runtimeId={runtimeId} variant={advancedMode === "flat" ? "profile" : "compact"} diff --git a/desktop/src/features/agents/ui/McpServersSection.tsx b/desktop/src/features/agents/ui/McpServersSection.tsx index 3e6c93ca5..f20beda4f 100644 --- a/desktop/src/features/agents/ui/McpServersSection.tsx +++ b/desktop/src/features/agents/ui/McpServersSection.tsx @@ -1,6 +1,6 @@ import type * as React from "react"; import { CheckCircle2, CircleSlash } from "lucide-react"; -import type { ExtensionEntry } from "@/shared/api/types"; +import type { ExtensionEntry, McpServerConfig } from "@/shared/api/types"; import { cn } from "@/shared/lib/cn"; type McpServersSectionProps = { @@ -38,9 +38,18 @@ export function McpServersSection({ MCP Servers

- {isBuzzAgent && buzzAgentSlot ? buzzAgentSlot : null} - - {extensions.length > 0 ? ( + {isBuzzAgent ? ( + (buzzAgentSlot ?? ( +

+ No custom servers configured +

+ )) + ) : extensions.length > 0 ? (
{extensions.map((extension) => ( ); } + +/** + * Read-only row for an *effective merged* buzz-agent MCP server — "what + * runs." Shows the resolved command line rather than `kind`/enabled state + * (unlike `McpServerRow`), since every entry here is already enabled by + * contract (`RuntimeConfigSurface.buzzAgentMcpServers` is enabled-only). + */ +export function BuzzAgentMcpServerRow({ + server, + variant, +}: { + server: McpServerConfig; + variant: "compact" | "profile"; +}) { + const StatusIcon = server.enabled ? CheckCircle2 : CircleSlash; + const commandLine = [server.command, ...server.args] + .filter(Boolean) + .join(" "); + + return ( +
+ + + + + + {server.name} + + + {commandLine || "stdio"} + + +
+ ); +}