qwen-code/packages/cli/src/ui
pomelo 7fe853a782
Feat/openrouter auth (#3576)
* feat(cli): add OpenRouter auth flow

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* feat(cli): add OpenRouter model management UI

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(cli): align OpenRouter OAuth fallback session

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* refactor(cli): unify OpenRouter model setup flow

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* feat(auth): update OAuth description with provider examples and i18n support

- Updated OAuth option description to include provider examples (OpenRouter, ModelScope)
- Added internationalization support for new description text
- Updated all language files (en, zh, de, fr, ja, pt, ru) with translations

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* docs: simplify OpenRouter design docs

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(auth): fix OpenRouter OAuth mock typing

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(auth): sync AuthDialog tests with new three-option main menu layout

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Update assertions that referenced removed 'Qwen OAuth' and 'OpenRouter' options in the main/API-key views to match the refactored OAUTH / CODING_PLAN / API_KEY structure.

* fix(i18n): add missing zh-TW translation for browser-based auth key

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

zh-TW.js was generated from main's en.js which had already removed this key, but the PR re-adds it in en.js. Sync zh-TW with the new translation.

* feat(cli): Improve custom auth wizard with step indicators and cleaner advanced config (#3607)

* feat(cli): Add custom API key auth wizard with 6-step setup flow

Replace the documentation-only

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>"Custom API Key" screen with an
in-terminal wizard: Protocol select → Base URL input → API Key input →
Model ID input → JSON review → Save.

- Add 5 new ViewLevels and render functions in AuthDialog
- Implement utility functions: generateCustomApiKeyEnvKey (normalization),
  normalizeCustomModelIds (split/trim/dedupe), maskApiKey (display)
- Implement handleCustomApiKeySubmit in useAuth with backup, env key
  generation, modelProviders merge, auth refresh, and user feedback
- Wire handler through UIActionsContext and AppContainer
- Add 18 unit tests for utilities, 4 wizard flow integration tests

* feat(cli): Improve custom auth wizard with step indicators and cleaner advanced config

- Add step indicators (Step 1/6 · Protocol) to each wizard screen
- Remove redundant Protocol/Endpoint context from each step for focus
- Redesign advanced config: add descriptions to thinking/modality toggles
- Remove max tokens option; keep only thinking and modality settings
- Add ↑↓ arrow navigation with Space toggle and Enter to continue
- Generation config flows through review JSON and final submit

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test: Fix Windows CI failures in fileUtils and AuthDialog tests

- fileUtils.test.ts: Mock node:child_process execFile to prevent
  pdftotext spawn that times out on Windows (ENOENT, 5s timeout)
- AuthDialog.test.tsx: Add char-by-char typeText() helper to work
  around Node 24.x + ink TextInput compatibility issue on Windows

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(cli): Reset advanced wizard state and use JSON.stringify for settings preview

- Reset advancedThinkingEnabled, advancedModalityEnabled, and
  focusedConfigIndex when re-entering custom wizard to prevent
  state leakage between configurations
- Replace hand-rolled JSON string concatenation with
  JSON.stringify for settings.json preview to properly escape
  special characters in model IDs and base URLs

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(cli): harden OpenRouter OAuth callback handling

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(cli): stabilize OpenRouter state mismatch test

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(cli): stabilize custom auth wizard navigation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-27 14:47:44 +08:00
..
auth Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
commands Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
components Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
contexts Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
editors feat: add support for Trae editor (#1037) 2025-11-17 10:58:33 +08:00
hooks Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
layouts feat(cli): add sticky todo panel to app layouts (#3507) 2026-04-26 12:21:30 +08:00
manageModels Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
models fix: 修复模型常量更新导致的单测失败 2026-02-26 15:45:06 +08:00
noninteractive feat(session): add rename, delete, and auto-title generation for session (#3093) 2026-04-22 11:48:01 +08:00
state feat: move extension to core package 2026-01-14 15:30:27 +08:00
themes feat(cli): auto-detect terminal theme ('auto' or unset) (#3460) 2026-04-22 16:58:45 +08:00
utils fix(cli): guard gradient rendering without colors (#3640) 2026-04-27 00:52:56 +08:00
App.test.tsx feat(cli): add sticky todo panel to app layouts (#3507) 2026-04-26 12:21:30 +08:00
App.tsx feat: Redesign CLI welcome screen and improve visual consistency 2026-01-16 11:48:31 +08:00
AppContainer.test.tsx Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
AppContainer.tsx Feat/openrouter auth (#3576) 2026-04-27 14:47:44 +08:00
colors.ts Use dim colors for YOLO/auto-accept mode borders 2026-01-17 14:23:42 +01:00
CommandFormatMigrationNudge.tsx feat: add i18n 2026-01-19 10:08:21 +08:00
constants.ts Sync upstream Gemini-CLI v0.8.2 (#838) 2025-10-23 09:27:04 +08:00
FeedbackDialog.tsx refactor: reorder feedback options and improve dialog feedback timestamp handling 2026-01-23 18:55:43 +08:00
IdeIntegrationNudge.tsx update user messages 2026-01-07 17:25:27 +08:00
keyMatchers.test.ts refactor: rename verboseMode to compactMode for better UX clarity (#3075) 2026-04-10 11:55:50 +08:00
keyMatchers.ts fix test on windows 2026-02-03 15:11:20 +08:00
semantic-colors.ts Explict imports & exports with type modifier (#3774) 2025-08-25 22:04:53 +00:00
textConstants.ts Patch 0.3.0 preview.4 (#7713) 2025-09-04 17:00:46 +00:00
types.ts feat(arena): add comparison summary for agent results (#3394) 2026-04-22 05:31:19 +08:00