mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 09:37:37 +08:00
feat(copilot): add GitHub Copilot reverse proxy support (#930)
* refactor(toolsearch): replace binary patch with ENABLE_TOOL_SEARCH env var toggle
- Remove toolsearch_patch.rs binary patching mechanism (~590 lines)
- Delete `toolsearch_patch.rs` and `commands/toolsearch.rs`
- Remove auto-patch startup logic and command registration from lib.rs
- Remove `tool_search_bypass` field from settings.rs
- Remove frontend settings ToggleRow, useSettings hook sync logic, and API methods
- Clean up zh/en/ja i18n keys (notifications + settings)
- Add ENABLE_TOOL_SEARCH toggle to Claude provider form
- Add checkbox in CommonConfigEditor.tsx (alongside teammates toggle)
- When enabled, writes `"env": { "ENABLE_TOOL_SEARCH": "true" }`
- When disabled, removes the key; takes effect on provider switch
- Add zh/en/ja i18n key: `claudeConfig.enableToolSearch`
Claude Code 2.1.76+ natively supports this env var, eliminating the need for binary patching.
* feat(claude): add effortLevel high toggle to provider form
- Add "high-effort thinking" checkbox to Claude provider config form
- When checked, writes `"effortLevel": "high"`; when unchecked, removes the field
- Add zh/en/ja i18n translations
* refactor(claude): remove deprecated alwaysThinking toggle
- Claude Code now enables extended thinking by default; alwaysThinkingEnabled is a no-op
- Thinking control is now handled via effortLevel (added in prior commit)
- Remove state, switch case, and checkbox UI from CommonConfigEditor
- Clean up alwaysThinking i18n keys across zh/en/ja locales
* feat(opencode): add setCacheKey: true to all provider presets
- Add setCacheKey: true to options in all 33 regular presets
- Add setCacheKey: true to OPENCODE_DEFAULT_CONFIG for custom providers
- Exclude 2 OMO presets (Oh My OpenCode / Slim) which have their own config mechanism
Closes #1523
* fix(codex): resolve 1M context window toggle causing MCP editor flicker
- Add localValueRef to short-circuit duplicate CodeMirror updateListener callbacks,
breaking the React state → CodeMirror → stale onChange → React state feedback loop
- Use localValueRef.current in handleContextWindowToggle and handleCompactLimitChange
to avoid stale closure reads
- Change compact limit input from type="number" to type="text" with inputMode="numeric"
to remove unnecessary spinner buttons
* feat(codex): add 1M context window toggle utilities and i18n keys
- Add extractCodexTopLevelInt, setCodexTopLevelInt, removeCodexTopLevelField
TOML helpers in providerConfigUtils.ts
- Add i18n keys for contextWindow1M, autoCompactLimit in zh/en/ja locales
* feat(claude): collapse model mapping fields by default
- Wrap 5 model mapping inputs in a Collapsible, collapsed by default
- Auto-expand when any model value is present (including preset-filled)
- Show hint text when collapsed explaining most users need no config
- Add zh/en/ja i18n keys for toggle label and collapsed hint
- Use variant={null} to avoid ghost button hover style clash in dark mode
* feat(claude): merge advanced fields into single collapsible section
- Merge API format, auth field, and model mapping into a unified "Advanced Options" collapsible
- Extend smart-expand logic to detect non-default values across all advanced fields
- Preserve model mapping sub-header and hint with a separator line
- Update zh/en/ja i18n keys (advancedOptionsToggle, advancedOptionsHint, modelMappingLabel, modelMappingHint)
* feat(copilot): add GitHub Copilot reverse proxy support
Add GitHub Copilot as a Claude provider variant with OAuth device code
authentication and Anthropic ↔ OpenAI format transformation.
Backend:
- Add CopilotAuthManager for GitHub OAuth device code flow
- Implement Copilot token auto-refresh (60s before expiry)
- Persist GitHub token to ~/.cc-switch/copilot_auth.json
- Add ProviderType::GitHubCopilot and AuthStrategy::GitHubCopilot
- Modify forwarder to use /chat/completions for Copilot
- Add Copilot-specific headers (Editor-Version, Editor-Plugin-Version)
Frontend:
- Add CopilotAuthSection component for OAuth UI
- Add useCopilotAuth hook for OAuth state management
- Auto-copy user code to clipboard and open browser
- Use 8-second polling interval to avoid GitHub rate limits
- Skip API Key validation for Copilot providers
- Add GitHub Copilot preset with claude-sonnet-4 model
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix(copilot): remove is_expired() calls from tests
Remove references to deleted is_expired() method in test code.
Only is_expiring_soon() is needed for token refresh logic.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* feat(copilot): add real-time model listing from Copilot API
- Add fetch_models() to CopilotAuthManager calling GET /models endpoint
- Add copilot_get_models Tauri command
- Add copilotGetModels() frontend API wrapper
- Modify ClaudeFormFields to show model dropdown for Copilot providers
- Fetches available models on component mount when isCopilotPreset
- Groups models by vendor (Anthropic, OpenAI, Google, etc.)
- Input + dropdown button combo allows both manual entry and selection
- Non-Copilot providers keep original plain Input behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(copilot): add usage query integration
- Add Copilot usage API integration (fetch_usage method)
- Add copilot_get_usage Tauri command
- Add GitHub Copilot template in usage query modal
- Unify naming: copilot → github_copilot
- Add constants management (TEMPLATE_TYPES, PROVIDER_TYPES)
- Improve error handling with detailed error messages
- Add database migration (v5 → v6) for template type update
- Add i18n translations (zh, en, ja)
- Improve type safety with TemplateType
- Apply code formatting (cargo fmt, prettier)
* 修复github 登录和注销问题 ,模型选择问题
* feat(copilot): add multi-account support for GitHub Copilot
- Add multi-account storage structure with v1 to v2 migration
- Add per-account token caching and auto-refresh
- Add new Tauri commands for account management
- Integrate account selection in Proxy forwarder
- Add account selection UI in CopilotAuthSection
- Save githubAccountId to ProviderMeta
- Add i18n translations for multi-account features (zh/en/ja)
* 修复用量查询Reset字段出现多余字符
* refactor(auth-binding): introduce generic provider auth binding primitives
- add shared authBinding types in Rust and TypeScript while keeping githubAccountId as a compatibility field\n- resolve Copilot token, models, and usage through provider-bound account lookup instead of only the implicit default account\n- fix the Unix build regression in settings.rs by restoring std::io::Write for write_all()\n- remove the accidental .github ignore entry and drop leftover Copilot form debug logs\n- keep the first migration step non-breaking by writing both authBinding and the legacy githubAccountId field from the form
* refactor(auth-service): add managed auth command surface and explicit default account state
- introduce generic managed auth commands and frontend auth API wrappers for provider-scoped login, status, account listing, removal, logout, and default-account selection\n- store an explicit Copilot default_account_id instead of relying on HashMap iteration order, and use it consistently for fallback token/model/usage resolution\n- sort managed accounts deterministically and surface default-account state to the UI\n- refactor the Copilot form hook to wrap a generic useManagedAuth implementation while preserving the existing component contract\n- add default-account controls to the Copilot auth section and extend Copilot auth status serialization/tests for the new state
* feat(auth-center): add a dedicated settings entrypoint for managed OAuth accounts
- add an Auth Center tab to Settings so managed OAuth accounts are no longer hidden inside individual provider forms\n- introduce a first AuthCenterPanel that hosts GitHub Copilot account management as the initial managed auth provider\n- keep the provider form experience intact while establishing a global account-management surface for future providers such as OpenAI\n- validate that the new settings tab works cleanly with the generic managed auth hook and existing Copilot account controls
* feat(add-provider): expose managed OAuth sources alongside universal providers
- add an OAuth tab to the Add Provider flow so managed auth sources sit beside app-specific and universal providers\n- reuse the new Auth Center panel inside the dialog, keeping account management discoverable during provider creation\n- make the dialog footer adapt to the OAuth tab so account setup does not pretend to create a provider directly\n- align the add-provider UX with the new architecture where OAuth accounts are global assets and providers bind to them later
* fix(auth-reliability): harden managed auth persistence and refresh behavior
- replace direct Copilot auth store writes with private temp-file writes and atomic rename semantics, and document the local token storage limitation\n- add per-account refresh locks plus a double-check path so concurrent requests do not stampede GitHub token refresh\n- surface legacy migration failures through auth status, expose them in the UI, and add translated copy for the new account-state labels\n- stop writing the legacy githubAccountId field from the provider form while keeping compatibility reads in place\n- add logout error recovery and Copilot model-load toasts so auth failures are no longer silently swallowed
* refactor(copilot-detection): prefer provider type before URL fallbacks
- update forwarder endpoint rewriting to treat providerType as the primary GitHub Copilot signal\n- keep githubcopilot.com string matching only as a compatibility fallback for older provider records without providerType\n- reduce one more path where Copilot behavior depended purely on URL heuristics
* fix(copilot-auth): add cancel button to error state in CopilotAuthSection
- 错误状态下仅有"重试"按钮,用户无法退出(如不可恢复的 403 未订阅错误)
- 新增"取消"按钮,复用已有的 cancelAuth 逻辑重置为 idle 状态
* 修复打包后github账号头像显示异常
* 修复github copilot 来源的模型测试报错
* feat(copilot-preset): add default model presets for GitHub Copilot
- 补充 Copilot 预设的默认模型配置,用户选完预设即可直接使用
- ANTHROPIC_MODEL: claude-opus-4.6
- ANTHROPIC_DEFAULT_HAIKU_MODEL: claude-haiku-4.5
- ANTHROPIC_DEFAULT_SONNET_MODEL: claude-sonnet-4.6
- ANTHROPIC_DEFAULT_OPUS_MODEL: claude-opus-4.6
---------
Co-authored-by: Jason <farion1231@gmail.com>
Co-authored-by: 周梦泽 <mengze.zhou@dafeng-tech.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,8 +63,9 @@
|
||||
"extractFailed": "Extract failed: {{error}}",
|
||||
"saveFailed": "Save failed: {{error}}",
|
||||
"hideAttribution": "Hide AI Attribution",
|
||||
"alwaysThinking": "Extended Thinking",
|
||||
"enableTeammates": "Teammates Mode"
|
||||
"enableTeammates": "Teammates Mode",
|
||||
"enableToolSearch": "Enable Tool Search",
|
||||
"effortHigh": "High Effort Thinking"
|
||||
},
|
||||
"header": {
|
||||
"viewOnGithub": "View on GitHub",
|
||||
@@ -166,8 +167,6 @@
|
||||
"syncClaudePluginFailed": "Sync Claude plugin failed",
|
||||
"skipClaudeOnboardingFailed": "Failed to skip Claude Code first-run confirmation",
|
||||
"clearClaudeOnboardingSkipFailed": "Failed to restore Claude Code first-run confirmation",
|
||||
"toolSearchPatchFailed": "Failed to apply Tool Search patch",
|
||||
"toolSearchRestoreFailed": "Failed to restore Tool Search patch",
|
||||
"updateSuccess": "Provider updated successfully",
|
||||
"updateFailed": "Failed to update provider: {{error}}",
|
||||
"deleteSuccess": "Provider deleted",
|
||||
@@ -465,8 +464,6 @@
|
||||
"enableClaudePluginIntegrationDescription": "When enabled, the VS Code Claude Code extension provider will switch with this app",
|
||||
"skipClaudeOnboarding": "Skip Claude Code first-run confirmation",
|
||||
"skipClaudeOnboardingDescription": "When enabled, Claude Code will skip the first-run confirmation",
|
||||
"toolSearchBypass": "Bypass Tool Search domain restriction",
|
||||
"toolSearchBypassDescription": "Remove the Tool Search domain whitelist in the active Claude Code installation. Auto-reapplied after that installation updates",
|
||||
"appVisibility": {
|
||||
"title": "Homepage Display",
|
||||
"description": "Choose which apps to show on the homepage",
|
||||
@@ -760,11 +757,45 @@
|
||||
"smallModelPlaceholder": "",
|
||||
"haikuModelPlaceholder": "",
|
||||
"modelHelper": "Optional: Specify default Claude model to use, leave blank to use system default.",
|
||||
"modelMappingLabel": "Model Mapping",
|
||||
"modelMappingHint": "Usually not needed if the provider natively serves Claude models. Only configure when you need to map requests to different model names.",
|
||||
"advancedOptionsToggle": "Advanced Options",
|
||||
"advancedOptionsHint": "Includes API format, auth field, and model mapping. Defaults work for most use cases.",
|
||||
"categoryOfficial": "Official",
|
||||
"categoryCnOfficial": "Opensource Official",
|
||||
"categoryAggregation": "Aggregation",
|
||||
"categoryThirdParty": "Third Party"
|
||||
},
|
||||
"copilot": {
|
||||
"authSection": "GitHub Copilot Authentication",
|
||||
"authStatus": "Authentication Status",
|
||||
"authenticated": "Authenticated as {{username}}",
|
||||
"notAuthenticated": "Not authenticated",
|
||||
"loginWithGitHub": "Login with GitHub",
|
||||
"loginRequired": "Please login to GitHub Copilot first",
|
||||
"waitingForAuth": "Waiting for authorization...",
|
||||
"enterCode": "Please enter the code in your browser:",
|
||||
"logout": "Logout",
|
||||
"authSuccess": "GitHub Copilot authentication successful",
|
||||
"authFailed": "Authentication failed: {{error}}",
|
||||
"authTimeout": "Authentication timed out, please try again",
|
||||
"tokenExpired": "Token expired, please re-authenticate",
|
||||
"accountCount": "{{count}} account(s)",
|
||||
"selectAccount": "Select Account",
|
||||
"selectAccountPlaceholder": "Select a GitHub account",
|
||||
"useDefaultAccount": "Use default account",
|
||||
"loggedInAccounts": "Logged in accounts",
|
||||
"defaultAccount": "Default",
|
||||
"selected": "Selected",
|
||||
"removeAccount": "Remove account",
|
||||
"setAsDefault": "Set as default",
|
||||
"addAnotherAccount": "Add another account",
|
||||
"logoutAll": "Logout all accounts",
|
||||
"retry": "Retry",
|
||||
"copyCode": "Copy code",
|
||||
"migrationFailed": "Legacy auth migration failed: {{error}}",
|
||||
"loadModelsFailed": "Failed to load Copilot models"
|
||||
},
|
||||
"endpointTest": {
|
||||
"title": "API Endpoint Management",
|
||||
"endpoints": "endpoints",
|
||||
@@ -835,7 +866,10 @@
|
||||
"saveFailed": "Save failed: {{error}}",
|
||||
"modelNameHint": "Specify the model to use, will be auto-updated in config.toml",
|
||||
"modelName": "Model Name",
|
||||
"modelNamePlaceholder": "e.g., gpt-5-codex"
|
||||
"modelNamePlaceholder": "e.g., gpt-5-codex",
|
||||
"contextWindow1M": "1M Context Window",
|
||||
"autoCompactLimit": "Auto Compact Limit",
|
||||
"autoCompactLimitHint": "Auto-compacts history when context reaches this token limit"
|
||||
},
|
||||
"geminiConfig": {
|
||||
"envFile": "Environment Variables (.env)",
|
||||
@@ -1017,6 +1051,10 @@
|
||||
"templateCustom": "Custom",
|
||||
"templateGeneral": "General",
|
||||
"templateNewAPI": "NewAPI",
|
||||
"templateCopilot": "GitHub Copilot",
|
||||
"copilotAutoAuth": "Auto OAuth authentication, no manual credentials needed",
|
||||
"resetDate": "Reset date",
|
||||
"premiumRequests": "Premium Requests",
|
||||
"credentialsConfig": "Credentials",
|
||||
"credentialsHint": "Leave empty to use provider config",
|
||||
"optional": "optional",
|
||||
|
||||
@@ -63,8 +63,9 @@
|
||||
"extractFailed": "抽出に失敗しました: {{error}}",
|
||||
"saveFailed": "保存に失敗しました: {{error}}",
|
||||
"hideAttribution": "AI署名を非表示",
|
||||
"alwaysThinking": "拡張思考",
|
||||
"enableTeammates": "Teammates モード"
|
||||
"enableTeammates": "Teammates モード",
|
||||
"enableToolSearch": "Tool Search を有効化",
|
||||
"effortHigh": "高強度思考"
|
||||
},
|
||||
"header": {
|
||||
"viewOnGithub": "GitHub で見る",
|
||||
@@ -166,8 +167,6 @@
|
||||
"syncClaudePluginFailed": "Claude プラグインとの同期に失敗しました",
|
||||
"skipClaudeOnboardingFailed": "Claude Code の初回確認スキップに失敗しました",
|
||||
"clearClaudeOnboardingSkipFailed": "Claude Code の初回確認の復元に失敗しました",
|
||||
"toolSearchPatchFailed": "Tool Search パッチの適用に失敗しました",
|
||||
"toolSearchRestoreFailed": "Tool Search パッチの復元に失敗しました",
|
||||
"updateSuccess": "プロバイダーを更新しました",
|
||||
"updateFailed": "プロバイダーの更新に失敗しました: {{error}}",
|
||||
"deleteSuccess": "プロバイダーを削除しました",
|
||||
@@ -465,8 +464,6 @@
|
||||
"enableClaudePluginIntegrationDescription": "オンにすると VS Code の Claude Code 拡張のプロバイダーも同期します",
|
||||
"skipClaudeOnboarding": "Claude Code の初回確認をスキップ",
|
||||
"skipClaudeOnboardingDescription": "オンにすると Claude Code の初回インストール確認をスキップします",
|
||||
"toolSearchBypass": "Tool Search ドメイン制限を解除",
|
||||
"toolSearchBypassDescription": "現在アクティブな Claude Code インストールの Tool Search ドメインホワイトリスト制限を解除します。そのインストールの更新後は自動で再適用されます",
|
||||
"appVisibility": {
|
||||
"title": "ホームページ表示",
|
||||
"description": "ホームページに表示するアプリを選択",
|
||||
@@ -760,11 +757,45 @@
|
||||
"smallModelPlaceholder": "",
|
||||
"haikuModelPlaceholder": "",
|
||||
"modelHelper": "任意: 既定で使いたい Claude モデルを指定。空欄ならシステム既定を使用します。",
|
||||
"modelMappingLabel": "モデルマッピング",
|
||||
"modelMappingHint": "プロバイダーが Claude モデルをネイティブ提供している場合、通常は設定不要です。リクエストを別のモデル名にマッピングする場合のみ設定してください。",
|
||||
"advancedOptionsToggle": "高級オプション",
|
||||
"advancedOptionsHint": "API フォーマット、認証フィールド、モデルマッピングの設定を含みます。通常はデフォルトのままで問題ありません。",
|
||||
"categoryOfficial": "公式",
|
||||
"categoryCnOfficial": "オープンソース公式",
|
||||
"categoryAggregation": "アグリゲーター",
|
||||
"categoryThirdParty": "サードパーティ"
|
||||
},
|
||||
"copilot": {
|
||||
"authSection": "GitHub Copilot 認証",
|
||||
"authStatus": "認証状態",
|
||||
"authenticated": "認証済み: {{username}}",
|
||||
"notAuthenticated": "未認証",
|
||||
"loginWithGitHub": "GitHub でログイン",
|
||||
"loginRequired": "先に GitHub Copilot にログインしてください",
|
||||
"waitingForAuth": "認証を待っています...",
|
||||
"enterCode": "ブラウザで以下のコードを入力してください:",
|
||||
"logout": "ログアウト",
|
||||
"authSuccess": "GitHub Copilot 認証に成功しました",
|
||||
"authFailed": "認証に失敗しました: {{error}}",
|
||||
"authTimeout": "認証がタイムアウトしました。もう一度お試しください",
|
||||
"tokenExpired": "トークンの有効期限が切れました。再認証してください",
|
||||
"accountCount": "{{count}} アカウント",
|
||||
"selectAccount": "アカウントを選択",
|
||||
"selectAccountPlaceholder": "GitHub アカウントを選択",
|
||||
"useDefaultAccount": "デフォルトアカウントを使用",
|
||||
"loggedInAccounts": "ログイン済みアカウント",
|
||||
"defaultAccount": "デフォルト",
|
||||
"selected": "選択中",
|
||||
"removeAccount": "アカウントを削除",
|
||||
"setAsDefault": "デフォルトに設定",
|
||||
"addAnotherAccount": "別のアカウントを追加",
|
||||
"logoutAll": "すべてのアカウントをログアウト",
|
||||
"retry": "再試行",
|
||||
"copyCode": "コードをコピー",
|
||||
"migrationFailed": "旧認証データの移行に失敗しました: {{error}}",
|
||||
"loadModelsFailed": "Copilot モデル一覧の読み込みに失敗しました"
|
||||
},
|
||||
"endpointTest": {
|
||||
"title": "API エンドポイント管理",
|
||||
"endpoints": "エンドポイント",
|
||||
@@ -835,7 +866,10 @@
|
||||
"saveFailed": "保存に失敗しました: {{error}}",
|
||||
"modelNameHint": "使用するモデルを指定します。config.toml に自動更新されます",
|
||||
"modelName": "モデル名",
|
||||
"modelNamePlaceholder": "例: gpt-5-codex"
|
||||
"modelNamePlaceholder": "例: gpt-5-codex",
|
||||
"contextWindow1M": "1M コンテキストウィンドウ",
|
||||
"autoCompactLimit": "自動圧縮しきい値",
|
||||
"autoCompactLimitHint": "コンテキストトークン数がこのしきい値に達すると履歴を自動圧縮"
|
||||
},
|
||||
"geminiConfig": {
|
||||
"envFile": "環境変数 (.env)",
|
||||
@@ -1017,6 +1051,10 @@
|
||||
"templateCustom": "カスタム",
|
||||
"templateGeneral": "General",
|
||||
"templateNewAPI": "NewAPI",
|
||||
"templateCopilot": "GitHub Copilot",
|
||||
"copilotAutoAuth": "OAuth 認証を自動使用、手動設定不要",
|
||||
"resetDate": "リセット日",
|
||||
"premiumRequests": "Premium リクエスト",
|
||||
"credentialsConfig": "認証情報",
|
||||
"credentialsHint": "空欄の場合はプロバイダー設定を使用",
|
||||
"optional": "オプション",
|
||||
|
||||
@@ -63,8 +63,9 @@
|
||||
"extractFailed": "提取失败: {{error}}",
|
||||
"saveFailed": "保存失败: {{error}}",
|
||||
"hideAttribution": "隐藏 AI 署名",
|
||||
"alwaysThinking": "扩展思考",
|
||||
"enableTeammates": "Teammates 模式"
|
||||
"enableTeammates": "Teammates 模式",
|
||||
"enableToolSearch": "启用 Tool Search",
|
||||
"effortHigh": "高强度思考"
|
||||
},
|
||||
"header": {
|
||||
"viewOnGithub": "在 GitHub 上查看",
|
||||
@@ -166,8 +167,6 @@
|
||||
"syncClaudePluginFailed": "同步 Claude 插件失败",
|
||||
"skipClaudeOnboardingFailed": "跳过 Claude Code 初次安装确认失败",
|
||||
"clearClaudeOnboardingSkipFailed": "恢复 Claude Code 初次安装确认失败",
|
||||
"toolSearchPatchFailed": "Tool Search 补丁操作失败",
|
||||
"toolSearchRestoreFailed": "Tool Search 恢复操作失败",
|
||||
"updateSuccess": "供应商更新成功",
|
||||
"updateFailed": "更新供应商失败:{{error}}",
|
||||
"deleteSuccess": "供应商已删除",
|
||||
@@ -465,8 +464,6 @@
|
||||
"enableClaudePluginIntegrationDescription": "开启后 Vscode Claude Code 插件的供应商将随本软件切换",
|
||||
"skipClaudeOnboarding": "跳过 Claude Code 初次安装确认",
|
||||
"skipClaudeOnboardingDescription": "开启后跳过 Claude Code 初次安装确认",
|
||||
"toolSearchBypass": "解除 Tool Search 域名限制",
|
||||
"toolSearchBypassDescription": "解除当前活跃 Claude Code 安装的 Tool Search 域名白名单限制。该安装更新后会自动重新应用",
|
||||
"appVisibility": {
|
||||
"title": "主页面显示",
|
||||
"description": "选择在主页面显示的应用",
|
||||
@@ -760,11 +757,45 @@
|
||||
"smallModelPlaceholder": "",
|
||||
"haikuModelPlaceholder": "",
|
||||
"modelHelper": "可选:指定默认使用的 Claude 模型,留空则使用系统默认。",
|
||||
"modelMappingLabel": "模型映射",
|
||||
"modelMappingHint": "如果供应商原生提供 Claude 系列模型,通常无需配置。仅在需要将请求映射到不同模型名称时填写。",
|
||||
"advancedOptionsToggle": "高级选项",
|
||||
"advancedOptionsHint": "包含 API 格式、认证字段、模型映射等配置。大多数场景下保持默认即可。",
|
||||
"categoryOfficial": "官方",
|
||||
"categoryCnOfficial": "开源官方",
|
||||
"categoryAggregation": "聚合服务",
|
||||
"categoryThirdParty": "第三方"
|
||||
},
|
||||
"copilot": {
|
||||
"authSection": "GitHub Copilot 认证",
|
||||
"authStatus": "认证状态",
|
||||
"authenticated": "已认证: {{username}}",
|
||||
"notAuthenticated": "未认证",
|
||||
"loginWithGitHub": "使用 GitHub 登录",
|
||||
"loginRequired": "请先登录 GitHub Copilot",
|
||||
"waitingForAuth": "等待授权中...",
|
||||
"enterCode": "请在浏览器中输入验证码:",
|
||||
"logout": "注销",
|
||||
"authSuccess": "GitHub Copilot 认证成功",
|
||||
"authFailed": "认证失败: {{error}}",
|
||||
"authTimeout": "认证超时,请重试",
|
||||
"tokenExpired": "令牌已过期,请重新认证",
|
||||
"accountCount": "{{count}} 个账号",
|
||||
"selectAccount": "选择账号",
|
||||
"selectAccountPlaceholder": "选择一个 GitHub 账号",
|
||||
"useDefaultAccount": "使用默认账号",
|
||||
"loggedInAccounts": "已登录账号",
|
||||
"defaultAccount": "默认",
|
||||
"selected": "已选中",
|
||||
"removeAccount": "移除账号",
|
||||
"setAsDefault": "设为默认",
|
||||
"addAnotherAccount": "添加其他账号",
|
||||
"logoutAll": "注销所有账号",
|
||||
"retry": "重试",
|
||||
"copyCode": "复制代码",
|
||||
"migrationFailed": "旧认证数据迁移失败:{{error}}",
|
||||
"loadModelsFailed": "加载 Copilot 模型列表失败"
|
||||
},
|
||||
"endpointTest": {
|
||||
"title": "请求地址管理",
|
||||
"endpoints": "个端点",
|
||||
@@ -835,7 +866,10 @@
|
||||
"saveFailed": "保存失败: {{error}}",
|
||||
"modelNameHint": "指定使用的模型,将自动更新到 config.toml 中",
|
||||
"modelName": "模型名称",
|
||||
"modelNamePlaceholder": "例如: gpt-5-codex"
|
||||
"modelNamePlaceholder": "例如: gpt-5-codex",
|
||||
"contextWindow1M": "1M 上下文窗口",
|
||||
"autoCompactLimit": "压缩阈值",
|
||||
"autoCompactLimitHint": "上下文 token 数达到此阈值时自动压缩历史"
|
||||
},
|
||||
"geminiConfig": {
|
||||
"envFile": "环境变量 (.env)",
|
||||
@@ -1017,6 +1051,10 @@
|
||||
"templateCustom": "自定义",
|
||||
"templateGeneral": "通用模板",
|
||||
"templateNewAPI": "NewAPI",
|
||||
"templateCopilot": "GitHub Copilot",
|
||||
"copilotAutoAuth": "自动使用 OAuth 认证,无需手动配置凭证",
|
||||
"resetDate": "重置日期",
|
||||
"premiumRequests": "Premium 请求",
|
||||
"credentialsConfig": "凭证配置",
|
||||
"credentialsHint": "留空则自动使用供应商配置",
|
||||
"optional": "可选",
|
||||
|
||||
Reference in New Issue
Block a user