feat(providers): expand OAuth account management

Add Claude Code manual and cookie authorization, including redacted batch tasks. Harden OAuth imports, duplicate replacement, provider dialogs, and related account-management tests.
This commit is contained in:
elky
2026-07-27 15:53:28 +08:00
parent 531cf11025
commit 550cc36760
55 changed files with 4957 additions and 403 deletions
+12 -2
View File
@@ -1401,7 +1401,7 @@ const legacyExactEnglishMessages: Record<string, string> = {
'例如: OpenAI 主账号': 'Example: OpenAI primary account',
'提供商类型': 'Provider type',
'请选择': 'Select',
'ClaudeCode(暂不可用)': 'ClaudeCode (temporarily unavailable)',
'Claude Code(实验性功能)': 'Claude Code (experimental feature)',
'反代使用固定端点且不可修改': 'Reverse proxy providers use fixed endpoints that cannot be modified.',
'主站链接': 'Website URL',
'https://example.com(可选)': 'https://example.com (optional)',
@@ -1427,7 +1427,6 @@ const legacyExactEnglishMessages: Record<string, string> = {
'启用后仅对 Kiro 请求模拟 prompt cache 读写计量。': 'When enabled, only Kiro requests simulate prompt cache read/write accounting.',
'请前往模块管理-敏感信息保护中配置详细规则。': 'Configure detailed rules in Modules - Sensitive information protection.',
'验证失败': 'Validation failed',
'ClaudeCode 提供商类型暂时禁用': 'ClaudeCode provider type is temporarily disabled',
'月卡类型必须设置周期开始时间': 'Monthly quota billing requires a cycle start time',
'周期开始时间必须是合法时间': 'Cycle start time must be a valid time',
'过期时间必须是合法时间': 'Expiration time must be a valid time',
@@ -1585,6 +1584,14 @@ const legacyExactEnglishMessages: Record<string, string> = {
'添加账号': 'Add account',
'授权': 'Authorization',
'获取授权': 'Authorize',
'Cookie授权': 'Cookie authorization',
'Claude sessionKey Cookie': 'Claude sessionKey cookie',
'粘贴 sessionKey Cookie 值或完整 Cookie 请求头': 'Paste a sessionKey cookie value or a complete Cookie header',
'每行粘贴一个 sessionKey Cookie 值或完整 Cookie 请求头,最多 20 个': 'Paste one sessionKey cookie value or complete Cookie header per line, up to 20',
'每行一个,最多 20 个': 'One per line, up to 20',
'批量授权': 'Batch authorize',
'Cookie 授权失败': 'Cookie authorization failed',
'授权中...': 'Authorizing...',
'浏览器登录': 'Browser sign-in',
'设备授权': 'Device authorization',
'导入授权': 'Import authorization',
@@ -1612,6 +1619,8 @@ const legacyExactEnglishMessages: Record<string, string> = {
'打开': 'Open',
'开始': 'Start',
'粘贴回调 URL': 'Paste callback URL',
'粘贴回调 URL 或授权码': 'Paste callback URL or authorization code',
'粘贴完整回调 URL 或授权码(code#state)': 'Paste the full callback URL or authorization code (code#state)',
'粘贴回调 URL 或 token': 'Paste callback URL or token',
'粘贴包含 token=...&state=... 的回调 URL;session token/apiKey 也可直接粘贴,普通 token 请用导入授权': 'Paste a callback URL containing token=...&state=...; session token/apiKey can also be pasted directly. Use import authorization for regular tokens.',
'在浏览器中完成授权': 'Complete authorization in the browser',
@@ -1633,6 +1642,7 @@ const legacyExactEnglishMessages: Record<string, string> = {
'支持 .json / .txt,可多选': 'Supports .json / .txt and multiple selection',
'粘贴 Grok sso/session token,支持每行一个;或粘贴包含 token、sso_token、access_token、plan_type、pool_tier 的 JSON': 'Paste Grok sso/session tokens, one per line, or paste JSON containing token, sso_token, access_token, plan_type, and pool_tier.',
'粘贴 show-auth-token Token、API key 或 JSON 内容': 'Paste a show-auth-token token, API key, or JSON content',
'粘贴 Claude Refresh Token 或 Claude Code .credentials.json 内容': 'Paste a Claude refresh token or Claude Code .credentials.json',
'粘贴 Refresh Token / Access Token / Agent Identity JSON 内容': 'Paste a Refresh Token, Access Token, or Agent Identity JSON',
'plan_type / pool_tier 会作为账号套餐与能力特征保存,不是路由池选择。': 'plan_type / pool_tier are saved as account plan and capability traits, not as routing pool selection.',
'或手动粘贴 Grok Token': 'Or manually paste a Grok token',