"use client"; import { Item, ItemActions, ItemContent, ItemDescription, ItemTitle, } from "@/components/ui/item"; import { Switch } from "@/components/ui/switch"; import { useI18n } from "@/core/i18n/hooks"; import { useMCPConfig, useEnableMCPServer } from "@/core/mcp/hooks"; import type { MCPServerConfig } from "@/core/mcp/types"; import { env } from "@/env"; import { SettingsSection } from "./settings-section"; export function ToolSettingsPage() { const { t } = useI18n(); const { config, isLoading, error } = useMCPConfig(); return ( {isLoading ? (
{t.common.loading}
) : error ? (
Error: {error.message}
) : ( config && )}
); } function MCPServerList({ servers, }: { servers: Record; }) { const { mutate: enableMCPServer } = useEnableMCPServer(); return (
{Object.entries(servers).map(([name, config]) => (
{name}
{config.description}
enableMCPServer({ serverName: name, enabled: checked }) } />
))}
); }