Commit graph

4838 commits

Author SHA1 Message Date
LaZzyMan
31914a451e feat(mcp): show 'Re-authenticate' for servers with existing OAuth tokens
Servers that already have stored OAuth tokens now display 'Re-authenticate'
instead of 'Authenticate' in the server detail actions, making it clearer
that credentials already exist. Added i18n for all 6 languages.
2026-03-12 22:08:17 +08:00
易良
bbcd131f0d
Merge pull request #2326 from QwenLM/fix/error-message-in-cli
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / CodeQL (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
fix: clear retry error messages promptly after auto-retry succeeds
2026-03-12 21:22:19 +08:00
LaZzyMan
ec0db29bef fix(mcp): prevent EADDRINUSE when re-entering OAuth authentication
Track the active OAuth callback server at module level. When a new
authentication is started, close any previously running callback server
first to avoid 'listen EADDRINUSE: address already in use :::7777'
errors that occur when the user navigates back and re-enters auth.
2026-03-12 21:02:09 +08:00
LaZzyMan
dcf986838c feat(mcp): improve OAuth auth UX - post-auth feedback, i18n, clear auth, and bug fixes
- Show tool count and completion message after successful authentication
- Auto-navigate back to server details after auth success (2s delay)
- Add structured i18n messages for OAuth display (core emits key/params, CLI translates)
- Add 'Clear Authentication' option for servers with stored OAuth tokens
- Fix: clearing auth now disconnects server (not just deleting tokens)
- Fix: auth popup infinite loop caused by onSuccess triggering reload/remount cycle
- Add ToolRegistry.disconnectServer() (disconnect without adding to exclusion list)
- Add i18n translations for all 6 languages (en/zh/de/ja/pt/ru)
2026-03-12 20:46:59 +08:00
yiliang114
d951e30cfa fix: clear retry error messages promptly after auto-retry succeeds
Previously, when an auto-retry countdown elapsed and the server sent a
Retry event (without retryInfo) to signal the actual retry attempt, the
error message was not cleared because `pendingRetryCountdownItemRef` was
still set. This caused stale error messages to persist in the UI until
the user manually initiated a new request.

Additionally, when the user pressed Ctrl+Y to retry, the error was
committed to history (without hint) instead of being discarded. This was
inconsistent with the auto-retry behavior where errors are silently
cleared on success.

Changes:
- Always call clearRetryCountdown() when a Retry event without retryInfo
  is received, removing the flawed guard condition
- Remove error-to-history commit in retryLastPrompt for consistent UX
- Add test covering the countdown-elapsed retry scenario

Closes #2310

Made-with: Cursor
2026-03-12 20:43:29 +08:00
顾盼
d77fe134cb
Merge pull request #2324 from QwenLM/feat/ls-tool-truncation
feat(core): add truncation support to LS tool
2026-03-12 20:26:36 +08:00
tanzhenxin
097f1b3da9 feat(core): add truncation support to LS tool
Add output truncation for directory listings when entries exceed
configured line limit. This prevents overwhelming output for large
directories while still informing users of truncated content.

- Add MAX_ENTRY_COUNT constant (100) as upper bound
- Use getTruncateToolOutputLines() config for dynamic limits
- Show truncated item count with proper singular/plural handling
- Update output format with --- separators for clarity
- Add comprehensive tests for truncation behavior

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 19:59:59 +08:00
yiliang114
fc81fb285a Merge branch 'main' of https://github.com/QwenLM/qwen-code into fix/ide-connection-dns-lookup 2026-03-12 19:19:42 +08:00
tanzhenxin
e181cfc097
Merge pull request #2315 from xuewenjie123/fix/remove-qrcode-from-oauth-progress-v2
fix: remove QR code from OAuth authentication UI to prevent screen flickering
2026-03-12 18:53:25 +08:00
Mingholy
1d87675534
Merge pull request #2298 from QwenLM/mingholy/fix/vscode-acp-error
fix: improve ACP file operation error handling
2026-03-12 17:53:23 +08:00
顾盼
2ff9305b19
Merge pull request #2320 from QwenLM/fix/deepseek-array-content
fix(core): convert array content to string for DeepSeek API
2026-03-12 17:50:03 +08:00
tanzhenxin
182422ce2b
Merge pull request #2307 from QwenLM/release/v0.12.2
chore: Release v0.12.2
2026-03-12 17:45:40 +08:00
易良
4e04b0937a
Merge pull request #2308 from ossaidqadri/fix/completion-tab-key-support
fix(webui): add Tab key support to CompletionMenu
2026-03-12 17:39:24 +08:00
tanzhenxin
1da0c2bf30 refactor(ui): remove spinner from OAuth progress component
This simplifies the OAuth progress UI by removing the animated spinner,
resulting in a cleaner, more maintainable component.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 17:34:08 +08:00
tanzhenxin
603beb51e7 fix(core): convert array content to string for DeepSeek API
DeepSeek API requires message content to be a plain string, not an array
of content parts. This fix flattens text-part arrays into joined strings
and replaces non-text parts with placeholder text.

Fixes #2158, Fixes #2318

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 17:18:27 +08:00
tanzhenxin
4ee94715df feat(arena): improve cancellation handling and simplify to in-process mode
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

- Track user-initiated cancellation separately from failures

- Cancel round immediately when user denies a tool call

- Add message queue to handle input during streaming

- Add info messages during Arena operations (apply, stop, cleanup)

- Disable tmux/iTerm2 backends (only in-process mode supported)

- Polish UI: green tool count, updated warning prefix

This improves the Arena UX by providing clearer feedback and

properly handling user cancellations without treating them as failures.
2026-03-12 16:57:44 +08:00
xwj02155382
67089ed532 test: update OAuth progress and header tests for UI changes
- Update Header.test.tsx to expect single border (┌┐) instead of round (╭╯)
- Update QwenOAuthProgress.test.tsx:
  - Change cancel text expectation from '(Press ESC or CTRL+C to cancel)' to 'Esc to cancel'
  - Update loading state test to expect 'Qwen OAuth Authentication' title
  - Simplify animated dots test to avoid timing sensitivity
  - Rename 'gray border' test to 'single border' test

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 16:42:43 +08:00
xwj02155382
928701d688 refactor: simplify OAuth progress UI and use semantic colors
- Replace round border with single border style for consistency
- Use semantic-colors theme instead of Colors enum
- Add i18n translations for error messages and status text
- Simplify dots animation with fixed-width cycling patterns
- Consolidate into single bordered box layout
- Add Esc to cancel hint for better UX

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 16:23:05 +08:00
tanzhenxin
61fac4b15b test(cli): remove flaky tab navigation test
Remove the 'navigates between tabs with left/right arrows' test from
AskUserQuestionDialog.test.tsx due to timing-related flakiness.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 14:09:54 +08:00
xwj02155382
6423e078fc fix: update package-lock.json after removing qrcode-terminal
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 13:42:59 +08:00
xwj02155382
da7a0e8dbd fix: remove qrcode-terminal dependency and update tests
- Remove qrcode-terminal from packages/cli/package.json dependencies
- Remove @types/qrcode-terminal from root package.json devDependencies
- Update QwenOAuthProgress.test.tsx to remove QR code related tests
- Remove qrcode-terminal mock from qwenOAuth2.test.ts

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 13:42:59 +08:00
xuewenjie
74315a1aa4 fix: remove QR code from OAuth authentication UI to prevent screen flickering
Remove the terminal QR code display from the OAuth authentication progress
component. The QR code caused severe screen flickering on Windows PowerShell
due to Ink's full re-render cycle combined with the large character volume
of the QR code and high-frequency state updates (spinner + countdown timer).

The authorization URL link is preserved for users to complete authentication.

Changes:
- Remove qrcode-terminal import and QrCodeDisplay component
- Replace with simplified AuthUrlDisplay component (URL only)
- Remove qrCodeData state and QR code generation useEffect
- Remove unused createDebugLogger import and debugLogger instance
2026-03-12 13:42:58 +08:00
易良
17581c1e8a
Merge pull request #2312 from QwenLM/chore/yiliang-code-ownner
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
chore: add yiliang114 as code owner for vscode-ide-companion and webui
2026-03-12 11:49:32 +08:00
yiliang114
1ebb9bc994 chore: add yiliang114 as code owner for vscode-ide-companion and webui
Add @yiliang114 as the code owner for the following packages:
- packages/vscode-ide-companion/
- packages/webui/
2026-03-12 11:28:20 +08:00
imossaidqadri
d708faa504 fix(webui): add Tab key support to CompletionMenu
Fixes #2293

- Add Tab key handling in CompletionMenu component
- Tab now selects the highlighted completion item (same as Enter)
- Prevents default browser Tab focus behavior when menu is open
- Matches Claude Code UX pattern for slash command completion
2026-03-12 07:13:41 +05:00
tanzhenxin
9890625de7 chore: bump version to 0.12.2
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 10:02:48 +08:00
pomelo
2a8366390d
Merge pull request #2268 from QwenLM/fix/export-current-session
Some checks are pending
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
fix: export command should use current session ID instead of loadLastSession
2026-03-11 22:38:45 +08:00
mingholy.lmh
2cbd092835 fix(core): handle ENOENT from ACP readTextFileWithInfo gracefully
- Add readTextFileWithInfo implementation in AcpFileSystemService
- Convert RESOURCE_NOT_FOUND errors to ENOENT for consistent handling
- Strip UTF-8 BOM from ACP responses
- Treat ENOENT errors in write-file tool as new file creation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 22:37:03 +08:00
mingholy.lmh
bddce08750 refactor(vscode-ide-companion): unify error message handling across the codebase
- Extract getErrorMessage utility for consistent error-to-string conversion
- Replace scattered error handling logic with centralized function
- Simplify authentication error checks using isAuthenticationRequiredError
- Add unit tests for errorMessage utility

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 22:17:02 +08:00
Sakuranda
277b1d02df perf(core): cache Windows PATH normalization snapshot 2026-03-11 20:49:31 +08:00
Sakuranda
8b283a039b fix(core): merge Windows PATH-like env values 2026-03-11 20:48:06 +08:00
LaZzyMan
a525423672 fix windows test 2026-03-11 20:08:38 +08:00
tanzhenxin
150521d88e
Merge pull request #2291 from QwenLM/mingholy/fix/acp-edit-file
Some checks failed
Qwen Code CI / Lint (push) Has been cancelled
Qwen Code CI / CodeQL (push) Has been cancelled
Qwen Code CI / Post Coverage Comment (push) Has been cancelled
Qwen Code CI / Test (push) Has been cancelled
Qwen Code CI / Test-1 (push) Has been cancelled
Qwen Code CI / Test-2 (push) Has been cancelled
Qwen Code CI / Test-3 (push) Has been cancelled
Qwen Code CI / Test-4 (push) Has been cancelled
Qwen Code CI / Test-5 (push) Has been cancelled
Qwen Code CI / Test-6 (push) Has been cancelled
Qwen Code CI / Test-7 (push) Has been cancelled
Qwen Code CI / Test-8 (push) Has been cancelled
fix(vscode-ide-companion): map ENOENT errors to ACP RESOURCE_NOT_FOUND in readTextFile
2026-03-11 19:42:17 +08:00
tanzhenxin
76dde827a8
Merge pull request #2289 from QwenLM/fix/windows-pty-resize-race-condition
fix(cli): suppress Windows pty resize race condition
2026-03-11 19:17:51 +08:00
mingholy.lmh
6c72503636 fix(vscode-ide-companion): map ENOENT errors to ACP RESOURCE_NOT_FOUND in readTextFile
- Add error handling in readTextFile to catch and map file system errors
- Convert ENOENT errors to RequestError with RESOURCE_NOT_FOUND code
- Add unit tests for the error mapping logic

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 19:14:55 +08:00
LaZzyMan
16ca92897e fix test 2026-03-11 19:13:14 +08:00
DennisYu07
da77cf895d
Merge pull request #2290 from QwenLM/fix/start-qwen-after-installation
refactore: Start qwen after installation
2026-03-11 19:05:48 +08:00
DennisYu07
8133c968ed start qwen after installation 2026-03-11 04:01:22 -07:00
tanzhenxin
741aa436e3 fix(cli): suppress Windows pty resize race condition
Add global uncaught exception handler to suppress known race condition
in @lydell/node-pty where a deferred resize fires after the pty process
has already exited on Windows.

Tracking bug: https://github.com/microsoft/node-pty/issues/827

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 18:40:04 +08:00
LaZzyMan
31b43511f2 fix(extension): disable symlinks on Windows during git clone
On Windows, non-administrator users do not have permission to create
symlinks by default. Using core.symlinks=true during git clone causes
checkout to fail with 'Permission denied' errors when the repository
contains symlinks.

This fix dynamically sets core.symlinks based on the current platform:
- win32: core.symlinks=false (avoids permission errors)
- other platforms: core.symlinks=true (preserves existing behavior)

Fixes #2243
2026-03-11 18:07:49 +08:00
LaZzyMan
6047e705e8 Merge branch 'main' into feat/support-permission 2026-03-11 17:41:07 +08:00
LaZzyMan
80452561c7 fix ask user question tool 2026-03-11 17:12:12 +08:00
LaZzyMan
7450067e37 Merge branch 'main' into feat/support-permission 2026-03-11 17:11:28 +08:00
qqqys
e65953de04
fix(core): skip openDiff in YOLO mode to prevent VS Code editor from opening (#2221)
* fix(core): skip openDiff in YOLO mode to prevent VS Code editor from opening

* test: add shouldConfirmExecute tests for AUTO_EDIT and YOLO in edit and write-file

* Update packages/core/src/tools/edit.ts

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>

* Update packages/core/src/tools/write-file.ts

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>

---------

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-03-11 01:48:16 -07:00
LaZzyMan
6fee1ebeb8 fix workspace dirs 2026-03-11 15:24:08 +08:00
xwj02155382
d5eda197c2 refactor: extract HOOK_DEFINITION_ITEMS constant
Extract common hook definition items schema into a reusable constant
to avoid code duplication between UserPromptSubmit and Stop hooks.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 15:23:01 +08:00
xwj02155382
700806ce83 fix: correct hooks JSON schema type definition
The hooks array items were incorrectly typed as 'string' in the JSON
schema, causing VS Code to show type errors when users configure
HookDefinition objects. This fix adds proper schema support for complex
array item types.

- Add SettingItemDefinition interface for array item schema
- Add items schema for UserPromptSubmit and Stop hooks
- Update generate-settings-schema.ts to convert complex item types

Fixes #2246

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 15:09:49 +08:00
易良
ed0d748f27
Merge pull request #2188 from QwenLM/feat/vscode-ide-companion-layout
feat(vscode-ide-companion): add sidebar view and multi-position chat layout
2026-03-11 15:08:45 +08:00
yiliang114
adc1445486 Merge branch 'main' of https://github.com/QwenLM/qwen-code into fix/ide-connection-dns-lookup 2026-03-11 14:49:08 +08:00
DennisYu07
68304c85b8 resolve comment 2026-03-10 22:51:25 -07:00