qwen-code/packages/cli
Ziqiang Li e250d6e314
Some checks are pending
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
E2E Tests / web-shell Browser Regression (push) Waiting to run
feat: add qwen update and /update commands with auto-update support (#5780)
* fix: align standalone-update RC markers with install script, add version to update output

## Changes

### Compatibility fixes (standalone-update.ts)
- ensurePathInShellRc: use install script's begin/end block markers (# Qwen Code PATH block begin/end) instead of single-line marker, preventing duplicate PATH entries
- ensurePathInShellRc: fish shell uses set -gx PATH (matching install script)
- ensurePathInShellRc: use single-quoted paths with shell_quote-style escaping
- ensureBinWrapper: use #!/usr/bin/env sh shebang (matching install script)

### Version output
- qwen update: show current version in 'up to date' message (Qwen Code X.Y.Z is up to date!)
- /update slash command: same version display

### Build fix
- esbuild.config.js: add ink/dom and ink/components/CursorContext aliases for ink 7.x compatibility

### i18n
- en.js: add 9 update-related translation keys

Co-Authored-By: Claude <noreply@anthropic.com>

* i18n: add update command translations for all 8 non-English locales

- zh: Simplified Chinese
- zh-TW: Traditional Chinese
- ja: Japanese
- ru: Russian
- de: German
- pt: Portuguese (Brazil)
- fr: French
- ca: Catalan

Co-Authored-By: Claude <noreply@anthropic.com>

* fix update command review feedback

* address update command review followups

* fix update command test args type

* address update review hardlink and fallback feedback

* fix update tar filter typing and sdk bundle guard

* fix(cli): address update review feedback

* address update review followups

* restore windows archive traversal scan

* address update review observations

* address latest update review findings

* fix latest update review regressions

* fix(cli): localize update command output

* fix(cli): localize update install guidance

* fix(cli): harden update review follow-ups

* fix(cli): address latest update review comments

* fix(cli): honor explicit update requests

* fix(cli): address update command review feedback

* fix(cli): address update slash command review feedback

* fix(cli): address latest update review feedback

* fix(cli): address update review follow-ups

* add code

* fix(cli): add .deferred marker to prevent Windows deferred update race

On Windows, when atomicReplace returns 'deferred', a bat script runs
detached to complete the swap after the Node process exits. The lock
file alone was insufficient because acquireLock falls through when the
Node PID is dead (process.kill check), allowing a second `qwen update`
to steal the lock and interfere with the in-flight bat script.

Add a .deferred marker file containing the bat script's PID. acquireLock
now checks this marker via isProcessAlive(batPid) before allowing lock
theft, blocking concurrent updates while the swap is still in progress.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(cli): harden update review edge cases

* fix(cli): address PR #5780 review feedback on update engine

* test(cli): fix update check test import

* fix(cli): avoid duplicate startup update checks

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: 易良 <1204183885@qq.com>
Co-authored-by: liziwl <23000702+liziwl@users.noreply.github.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: yiliang114 <effortyiliang@gmail.com>
2026-07-09 15:11:45 +00:00
..
src feat: add qwen update and /update commands with auto-update support (#5780) 2026-07-09 15:11:45 +00:00
index.ts fix(cli): add bootstrap fast paths (#6188) 2026-07-02 22:28:11 +00:00
package.json chore(release): v0.19.8 (#6549) 2026-07-08 15:51:03 +00:00
test-setup.ts perf(cli): code-split lowlight to cut startup V8 parse cost (#4070) 2026-05-15 17:26:18 +08:00
tsconfig.json feat(channels): add WeCom intelligent robot channel (#6436) 2026-07-07 15:24:19 +00:00
vitest.config.ts feat(serve): Bound replay snapshot history (#6482) 2026-07-08 06:53:58 +00:00