fix(web): show correct MCP server runtime status in sidebar dots

Use runtime_info.status from the API instead of only checking the enable
flag. Dots now show: green (connected), yellow (connecting), red (error),
gray (disabled or no status).
This commit is contained in:
Junyan Qin
2026-03-27 20:02:16 +08:00
parent 23fa47b07e
commit d0e54a45c7
2 changed files with 30 additions and 12 deletions
@@ -21,6 +21,8 @@ export interface SidebarEntityItem {
updatedAt?: string; // ISO timestamp for sorting by most recently edited
// Bot-specific fields
enabled?: boolean;
// MCP-specific fields
runtimeStatus?: 'connecting' | 'connected' | 'error';
// Plugin-specific fields
installSource?: string;
installInfo?: Record<string, unknown>;
@@ -169,6 +171,7 @@ export function SidebarDataProvider({
id: server.name,
name: server.name,
enabled: server.enable,
runtimeStatus: server.runtime_info?.status,
})),
);
} catch (error) {