diff --git a/src/components/common/AppCountBar.tsx b/src/components/common/AppCountBar.tsx index 295d8e24..4e80998a 100644 --- a/src/components/common/AppCountBar.tsx +++ b/src/components/common/AppCountBar.tsx @@ -6,11 +6,13 @@ import { APP_IDS, APP_ICON_MAP } from "@/config/appConfig"; interface AppCountBarProps { totalLabel: string; counts: Record; + appIds?: AppId[]; } export const AppCountBar: React.FC = ({ totalLabel, counts, + appIds = APP_IDS, }) => { return (
@@ -18,7 +20,7 @@ export const AppCountBar: React.FC = ({ {totalLabel}
- {APP_IDS.map((app) => ( + {appIds.map((app) => ( ; onToggle: (app: AppId, enabled: boolean) => void; + appIds?: AppId[]; } export const AppToggleGroup: React.FC = ({ apps, onToggle, + appIds = APP_IDS, }) => { return (
- {APP_IDS.map((app) => { + {appIds.map((app) => { const { label, icon, activeClass } = APP_ICON_MAP[app]; const enabled = apps[app]; return ( diff --git a/src/components/mcp/UnifiedMcpPanel.tsx b/src/components/mcp/UnifiedMcpPanel.tsx index 57e0cd85..9694c551 100644 --- a/src/components/mcp/UnifiedMcpPanel.tsx +++ b/src/components/mcp/UnifiedMcpPanel.tsx @@ -17,7 +17,7 @@ import { Edit3, Trash2, ExternalLink } from "lucide-react"; import { settingsApi } from "@/lib/api"; import { mcpPresets } from "@/config/mcpPresets"; import { toast } from "sonner"; -import { APP_IDS } from "@/config/appConfig"; +import { MCP_SKILLS_APP_IDS } from "@/config/appConfig"; import { AppCountBar } from "@/components/common/AppCountBar"; import { AppToggleGroup } from "@/components/common/AppToggleGroup"; import { ListItemRow } from "@/components/common/ListItemRow"; @@ -58,7 +58,7 @@ const UnifiedMcpPanel = React.forwardRef< const enabledCounts = useMemo(() => { const counts = { claude: 0, codex: 0, gemini: 0, opencode: 0, openclaw: 0 }; serverEntries.forEach(([_, server]) => { - for (const app of APP_IDS) { + for (const app of MCP_SKILLS_APP_IDS) { if (server.apps[app]) counts[app]++; } }); @@ -136,6 +136,7 @@ const UnifiedMcpPanel = React.forwardRef<
@@ -277,6 +278,7 @@ const UnifiedMcpListItem: React.FC = ({ onToggleApp(id, app, enabled)} + appIds={MCP_SKILLS_APP_IDS} />
diff --git a/src/components/skills/UnifiedSkillsPanel.tsx b/src/components/skills/UnifiedSkillsPanel.tsx index 17e23a86..d485fc99 100644 --- a/src/components/skills/UnifiedSkillsPanel.tsx +++ b/src/components/skills/UnifiedSkillsPanel.tsx @@ -16,7 +16,7 @@ import type { AppId } from "@/lib/api/types"; import { ConfirmDialog } from "@/components/ConfirmDialog"; import { settingsApi, skillsApi } from "@/lib/api"; import { toast } from "sonner"; -import { APP_IDS } from "@/config/appConfig"; +import { MCP_SKILLS_APP_IDS } from "@/config/appConfig"; import { AppCountBar } from "@/components/common/AppCountBar"; import { AppToggleGroup } from "@/components/common/AppToggleGroup"; import { ListItemRow } from "@/components/common/ListItemRow"; @@ -56,7 +56,7 @@ const UnifiedSkillsPanel = React.forwardRef< const counts = { claude: 0, codex: 0, gemini: 0, opencode: 0, openclaw: 0 }; if (!skills) return counts; skills.forEach((skill) => { - for (const app of APP_IDS) { + for (const app of MCP_SKILLS_APP_IDS) { if (skill.apps[app]) counts[app]++; } }); @@ -159,6 +159,7 @@ const UnifiedSkillsPanel = React.forwardRef<
@@ -282,6 +283,7 @@ const InstalledSkillListItem: React.FC = ({ onToggleApp(skill.id, app, enabled)} + appIds={MCP_SKILLS_APP_IDS} />
diff --git a/src/config/appConfig.tsx b/src/config/appConfig.tsx index 95b7d2ed..db87b75a 100644 --- a/src/config/appConfig.tsx +++ b/src/config/appConfig.tsx @@ -23,6 +23,14 @@ export const APP_IDS: AppId[] = [ "openclaw", ]; +/** App IDs shown in MCP & Skills panels (excludes OpenClaw) */ +export const MCP_SKILLS_APP_IDS: AppId[] = [ + "claude", + "codex", + "gemini", + "opencode", +]; + export const APP_ICON_MAP: Record = { claude: { label: "Claude",