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
+2
View File
@@ -66,6 +66,7 @@ const McpFormModal: React.FC<McpFormModalProps> = ({
codex: boolean;
gemini: boolean;
opencode: boolean;
openclaw: boolean;
}>(() => {
if (initialData?.apps) {
return { ...initialData.apps };
@@ -75,6 +76,7 @@ const McpFormModal: React.FC<McpFormModalProps> = ({
codex: defaultEnabledApps.includes("codex"),
gemini: defaultEnabledApps.includes("gemini"),
opencode: defaultEnabledApps.includes("opencode"),
openclaw: defaultEnabledApps.includes("openclaw"),
};
});
+1 -1
View File
@@ -56,7 +56,7 @@ const UnifiedMcpPanel = React.forwardRef<
}, [serversMap]);
const enabledCounts = useMemo(() => {
const counts = { claude: 0, codex: 0, gemini: 0, opencode: 0 };
const counts = { claude: 0, codex: 0, gemini: 0, opencode: 0, openclaw: 0 };
serverEntries.forEach(([_, server]) => {
for (const app of APP_IDS) {
if (server.apps[app]) counts[app]++;
+1 -1
View File
@@ -53,7 +53,7 @@ const UnifiedSkillsPanel = React.forwardRef<
const installFromZipMutation = useInstallSkillsFromZip();
const enabledCounts = useMemo(() => {
const counts = { claude: 0, codex: 0, gemini: 0, opencode: 0 };
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) {