mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 09:37:37 +08:00
feat: add Hermes frontend types, API layer, and hooks (Phase 7)
- Add "hermes" to AppId union type and all exhaustive Record<AppId> - Add HermesModelConfig, HermesAgentConfig, HermesEnvConfig types - Add hermes field to VisibleApps, McpApps, ProxyTakeoverStatus - Create src/lib/api/hermes.ts with Tauri invoke wrappers - Create src/hooks/useHermes.ts with 5 query + 3 mutation hooks - Register hermes in APP_IDS, APP_ICON_MAP (violet color scheme) - Split MCP_SKILLS_APP_IDS into MCP_APP_IDS (includes hermes) and SKILLS_APP_IDS (excludes hermes, since Hermes has no Skills support) - Wire hermes additive-mode into App.tsx (remove/duplicate handlers), ProviderList.tsx (live provider ID query + In Config badge), mutations.ts (cache invalidation on switch/add/delete) - Add Hermes checkbox to McpFormModal - Add basic hermes i18n keys (en/zh/ja)
This commit is contained in:
@@ -21,16 +21,20 @@ export const APP_IDS: AppId[] = [
|
||||
"gemini",
|
||||
"opencode",
|
||||
"openclaw",
|
||||
"hermes",
|
||||
];
|
||||
|
||||
/** App IDs shown in MCP & Skills panels (excludes OpenClaw) */
|
||||
export const MCP_SKILLS_APP_IDS: AppId[] = [
|
||||
/** App IDs shown in Skills panels (excludes OpenClaw and Hermes — neither supports Skills) */
|
||||
export const SKILLS_APP_IDS: AppId[] = [
|
||||
"claude",
|
||||
"codex",
|
||||
"gemini",
|
||||
"opencode",
|
||||
];
|
||||
|
||||
/** App IDs shown in MCP panels (excludes OpenClaw) */
|
||||
export const MCP_APP_IDS: AppId[] = [...SKILLS_APP_IDS, "hermes"];
|
||||
|
||||
export const APP_ICON_MAP: Record<AppId, AppConfig> = {
|
||||
claude: {
|
||||
label: "Claude",
|
||||
@@ -79,4 +83,19 @@ export const APP_ICON_MAP: Record<AppId, AppConfig> = {
|
||||
badgeClass:
|
||||
"bg-rose-500/10 text-rose-700 dark:text-rose-300 hover:bg-rose-500/20 border-0 gap-1.5",
|
||||
},
|
||||
hermes: {
|
||||
label: "Hermes",
|
||||
icon: (
|
||||
<ProviderIcon
|
||||
icon="hermes"
|
||||
name="Hermes"
|
||||
size={14}
|
||||
showFallback={false}
|
||||
/>
|
||||
),
|
||||
activeClass:
|
||||
"bg-violet-500/10 ring-1 ring-violet-500/20 hover:bg-violet-500/20 text-violet-600 dark:text-violet-400",
|
||||
badgeClass:
|
||||
"bg-violet-500/10 text-violet-700 dark:text-violet-300 hover:bg-violet-500/20 border-0 gap-1.5",
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user