diff --git a/src-tauri/src/settings.rs b/src-tauri/src/settings.rs index 8bdd24cca..78c72e5fa 100644 --- a/src-tauri/src/settings.rs +++ b/src-tauri/src/settings.rs @@ -374,6 +374,9 @@ pub struct AppSettings { /// Whether to show the failover toggle independently on the main page #[serde(default)] pub enable_failover_toggle: bool, + /// Whether to show the project profile switcher on the main page header + #[serde(default = "default_show_profile_switcher")] + pub show_profile_switcher: bool, /// Keep Codex ChatGPT login material in auth.json when switching to third-party providers. /// Opt-in: defaults to false so third-party switches cleanly overwrite auth.json. #[serde(default)] @@ -490,6 +493,10 @@ fn default_minimize_to_tray_on_close() -> bool { true } +fn default_show_profile_switcher() -> bool { + true +} + impl Default for AppSettings { fn default() -> Self { Self { @@ -506,6 +513,7 @@ impl Default for AppSettings { usage_dashboard_refresh_interval_ms: None, stream_check_confirmed: None, enable_failover_toggle: false, + show_profile_switcher: true, preserve_codex_official_auth_on_switch: false, unify_codex_session_history: false, unify_codex_migrate_existing: None, diff --git a/src/App.tsx b/src/App.tsx index 877db16e6..645f1002d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1263,14 +1263,15 @@ function App() { )} )} - {currentView === "providers" && ( -
- -
- )} + {currentView === "providers" && + (settingsData?.showProfileSwitcher ?? true) && ( +
+ +
+ )}
+ } + title={t("settings.appVisibility.showProfileSwitcher")} + description={t("settings.appVisibility.showProfileSwitcherDescription")} + checked={settings.showProfileSwitcher ?? true} + onCheckedChange={(value) => onChange({ showProfileSwitcher: value })} + /> ); } diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 82d153475..99ac9650f 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -697,7 +697,9 @@ "claudeDesc": "Anthropic Claude Code CLI", "codexDesc": "OpenAI Codex CLI", "geminiDesc": "Google Gemini CLI", - "opencodeDesc": "OpenCode CLI" + "opencodeDesc": "OpenCode CLI", + "showProfileSwitcher": "Show project switcher", + "showProfileSwitcherDescription": "Show the project switcher in the main page header" }, "skillStorage": { "title": "Skill Storage Location", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 9c5625015..372a1bcc2 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -697,7 +697,9 @@ "claudeDesc": "Anthropic Claude Code CLI", "codexDesc": "OpenAI Codex CLI", "geminiDesc": "Google Gemini CLI", - "opencodeDesc": "OpenCode CLI" + "opencodeDesc": "OpenCode CLI", + "showProfileSwitcher": "プロジェクト切り替えを表示", + "showProfileSwitcherDescription": "メイン画面上部にプロジェクト切り替えを表示します" }, "skillStorage": { "title": "スキル保存場所", diff --git a/src/i18n/locales/zh-TW.json b/src/i18n/locales/zh-TW.json index 7a90cedee..9a5159b69 100644 --- a/src/i18n/locales/zh-TW.json +++ b/src/i18n/locales/zh-TW.json @@ -697,7 +697,9 @@ "claudeDesc": "Anthropic Claude Code CLI", "codexDesc": "OpenAI Codex CLI", "geminiDesc": "Google Gemini CLI", - "opencodeDesc": "OpenCode CLI" + "opencodeDesc": "OpenCode CLI", + "showProfileSwitcher": "顯示專案切換", + "showProfileSwitcherDescription": "在主頁面頂部顯示專案切換入口" }, "skillStorage": { "title": "Skills 儲存位置", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index 285f0fdf7..14217da66 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -697,7 +697,9 @@ "claudeDesc": "Anthropic Claude Code CLI", "codexDesc": "OpenAI Codex CLI", "geminiDesc": "Google Gemini CLI", - "opencodeDesc": "OpenCode CLI" + "opencodeDesc": "OpenCode CLI", + "showProfileSwitcher": "显示项目切换", + "showProfileSwitcherDescription": "在主页面顶部显示项目切换入口" }, "skillStorage": { "title": "Skills 存储位置", diff --git a/src/types.ts b/src/types.ts index eab67ac61..7a025b818 100644 --- a/src/types.ts +++ b/src/types.ts @@ -375,6 +375,8 @@ export interface Settings { streamCheckConfirmed?: boolean; // Whether to show the failover toggle independently on the main page enableFailoverToggle?: boolean; + // Whether to show the project profile switcher on the main page header + showProfileSwitcher?: boolean; // Preserve Codex ChatGPT login in auth.json when switching third-party providers preserveCodexOfficialAuthOnSwitch?: boolean; // Run official Codex under the shared "custom" provider id so future