fix(openclaw): add openclaw to all Record<AppId, T> usages

Expand McpApps interface, APP_IDS, APP_ICON_MAP, enabledCounts
initializers, and test mock data to include the openclaw key,
resolving TypeScript errors after AppId union was extended.
This commit is contained in:
Jason
2026-02-07 14:49:15 +08:00
parent a33f8fe973
commit 182015264c
6 changed files with 24 additions and 8 deletions
+15 -2
View File
@@ -1,6 +1,11 @@
import React from "react";
import type { AppId } from "@/lib/api/types";
import { ClaudeIcon, CodexIcon, GeminiIcon } from "@/components/BrandIcons";
import {
ClaudeIcon,
CodexIcon,
GeminiIcon,
OpenClawIcon,
} from "@/components/BrandIcons";
import { ProviderIcon } from "@/components/ProviderIcon";
export interface AppConfig {
@@ -10,7 +15,7 @@ export interface AppConfig {
badgeClass: string;
}
export const APP_IDS: AppId[] = ["claude", "codex", "gemini", "opencode"];
export const APP_IDS: AppId[] = ["claude", "codex", "gemini", "opencode", "openclaw"];
export const APP_ICON_MAP: Record<AppId, AppConfig> = {
claude: {
@@ -52,4 +57,12 @@ export const APP_ICON_MAP: Record<AppId, AppConfig> = {
badgeClass:
"bg-indigo-500/10 text-indigo-700 dark:text-indigo-300 hover:bg-indigo-500/20 border-0 gap-1.5",
},
openclaw: {
label: "OpenClaw",
icon: <OpenClawIcon size={14} />,
activeClass:
"bg-rose-500/10 ring-1 ring-rose-500/20 hover:bg-rose-500/20 text-rose-600 dark:text-rose-400",
badgeClass:
"bg-rose-500/10 text-rose-700 dark:text-rose-300 hover:bg-rose-500/20 border-0 gap-1.5",
},
};