feat(profiles): split Claude Desktop into independent profile scope

This commit is contained in:
Jason
2026-07-04 23:18:20 +08:00
parent 3ec83578f6
commit 754af2cc31
11 changed files with 137 additions and 43 deletions
+4 -2
View File
@@ -8,19 +8,21 @@ import type { PerApp, Profile, ProfileScope } from "@/lib/api/profiles";
*/
export const APP_PROFILE_SCOPE: Partial<Record<AppId, ProfileScope>> = {
claude: "claude",
"claude-desktop": "claude",
"claude-desktop": "claude-desktop",
codex: "codex",
};
/** 分组显示名(产品名,不进 i18n;与后端托盘子菜单标签一致) */
export const PROFILE_SCOPE_LABELS: Record<ProfileScope, string> = {
claude: "Claude Code",
"claude-desktop": "Claude Desktop",
codex: "Codex",
};
/** 分组内的 payload 槽位 key(后端 ProfileScope::apps 的前端镜像) */
const SCOPE_SLOT_KEYS: Record<ProfileScope, (keyof PerApp<unknown>)[]> = {
claude: ["claude", "claude-desktop"],
claude: ["claude"],
"claude-desktop": ["claude-desktop"],
codex: ["codex"],
};