Commit Graph
202 Commits
Author SHA1 Message Date
cadda23782 chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22 (#3860)
* chore(deps): upgrade ink 6.2.3 -> 7.0.2 + bump Node engine to 22

ink 7 requires Node >=22 and react-reconciler 0.33 with React >=19.2,
so this PR also bumps:

- Node engines (root + cli + core) 20 -> 22
- React/react-dom 19.1 -> 19.2.4 (pinned exact via overrides to keep
  the transitive React graph deduped to a single instance)
- @types/node pinned to 20.19.1 via overrides to avoid an unrelated
  Dirent NonSharedBuffer regression in sessionService tests
- @vitest/eslint-plugin pinned to 1.3.4 to avoid an unrelated lint
  regression introduced by the 1.6.x rule additions
- react-devtools-core 4.28 -> 6.1 (ink 7 peerOptional requires >=6.1.2)
- ink hoisted to root devDeps so workspace-private peer-dep contention
  doesn't push ink-link/spinner/gradient into nested workspace
  installs (which would skip transitive resolution for terminal-link)

Workflow + image + installer alignment:

- .nvmrc 20 -> 22
- Dockerfile node:20-slim -> node:22-slim
- CI test matrix drops 20.x (keeps 22.x + 24.x)
- terminal-bench workflow Node 20 -> 22
- Linux/Windows install scripts upgrade their Node version targets

Documentation alignment:

- README.md badge + prerequisites
- AGENTS.md, CONTRIBUTING.md, docs/users/quickstart.md,
  docs/users/configuration/settings.md, docs/developers/contributing.md,
  docs/developers/sdk-typescript.md, docs/users/extension/extension-releasing.md,
  packages/sdk-typescript/README.md, packages/zed-extension/README.md,
  scripts/installation/INSTALLATION_GUIDE.md

Test gating:

- Two AuthDialog/AskUserQuestionDialog tests that drive <SelectInput>
  through ink-testing-library now race ink 7's frame-throttled input
  delivery and land on the wrong option. The maintainers had already
  marked one of them unreliable (skip on Win32 + CI+Node20). Extend
  that gate to cover all environments until upstream
  ink-testing-library ships an ink-7-compatible release that flushes
  input deterministically. The other test now uses it.skip with the
  same comment. No business code changes.

Verified locally:

- npm run typecheck across all workspaces: clean
- npm run lint (root): clean
- npm run test --workspaces:
    cli  312/312 files, 4918 passed, 9 skipped
    core 266/266 files, 6836 passed, 3 skipped
    webui 6/6, 201 passed
    sdk  40/40, 283 passed, 1 skipped
- npm ls ink: single [email protected] instance across all peer deps
- single [email protected] instance

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* chore: align Node 22 floor across all shipping artifacts

Reviewer (tanzhenxin) flagged five surfaces where the >=22 engine bump
leaked: SDK package metadata, web-templates engines, /doctor runtime
check, main bundler target, and SDK bundler target. Each was a separate
escape hatch letting Node 18/20 consumers install or run the artifact
on an unsupported runtime.

- packages/sdk-typescript/package.json: engines.node >=18.0.0 -> >=22.0.0
- packages/web-templates/package.json: engines.node >=20 -> >=22
- packages/cli/src/utils/doctorChecks.ts: MIN_NODE_MAJOR 20 -> 22
- esbuild.config.js: target node20 -> node22 (main CLI bundle)
- packages/sdk-typescript/scripts/build.js: target node18 -> node22 (esm + cjs)
- packages/cli/src/utils/doctorChecks.test.ts: rename test label to v22+

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* ci(e2e): bump E2E workflow Node matrix to 22.x

Reviewer (tanzhenxin) flagged that e2e.yml still pinned node-version
20.x while root engines is now >=22, so every E2E run on push would
either fail at npm ci with engine error or silently exercise the bundle
on a runtime that's no longer in ci.yml's test matrix.

The macOS job in the same workflow already reads .nvmrc (which is 22)
so this only updates the Linux matrix.

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* fix(deps): drop root wrap-ansi override so ink 7 gets its declared dep

Reviewer (tanzhenxin) flagged that the root overrides.wrap-ansi: 9.0.2
predates this upgrade and forces every consumer (including ink) to v9,
while ink 7 declares wrap-ansi: ^10.0.0. The lockfile had no nested
install under node_modules/ink/, so ink 7 was running with a transitive
dep one major below its declared minimum.

Dropping the global override lets ink resolve its own wrap-ansi 10
nested install (now visible in the lockfile under
node_modules/ink/node_modules/wrap-ansi), while the cli package's own
direct `wrap-ansi: 9.0.2` dependency keeps the cli code path
(TableRenderer.tsx) on the version it has been tested against. The
nested cliui override is preserved for yargs which still needs v7.

Verified via `npm ls wrap-ansi`:
- [email protected] -> [email protected] (newly nested)
- @qwen-code/qwen-code -> [email protected] (unchanged)
- yargs/cliui -> [email protected] (unchanged)

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* test(InputPrompt): un-skip placeholder ID reuse after deletion

Reviewer (tanzhenxin) flagged that the new it.skip on the
'should reuse placeholder ID after deletion' test was undisclosed in
the PR description and removed coverage of real product behavior
(freePlaceholderId / bracketed-paste backspace path) without a
TODO(#NNNN) link.

Their argument was sound: the skip rationale pointed at ink 7's input
throttle, but this same file just bumped the wait helper from 50ms to
150ms specifically to give ink 7 frame time. Re-running the test under
the bumped wait shows it passes reliably (5/5 runs in the full-file
context, 9/10 alone), so the skip was masking the throttle-flake that
the wait bump already addresses, not a real product bug.

Drop the it.skip and the now-stale comment so coverage of the
freePlaceholderId reuse logic is restored.

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* test(InputPrompt): bump first prompt-suggestion test wait to 350ms

The "accepts and submits the prompt suggestion on Enter when the buffer
is empty" test is the first in its describe block, so it pays the
renderer cold-start cost. On macOS-22.x CI runners that pushes the
Enter → onSubmit microtask past the default 150ms post-Enter wait. Match
the 350ms initial render wait used immediately above to absorb the cold
start.

* Revert "test(InputPrompt): bump first prompt-suggestion test wait to 350ms"

This reverts commit 6add83b62ea80c551c81f54af1fda3e6e7478f55.

* test(InputPrompt): wait for followup suggestion debounce before pressing Enter

Root cause of the failing prompt-suggestion tests on macOS and Windows
CI is not flaky timing of the test post-Enter wait — it's the 300ms
debounce inside createFollowupController.setSuggestion (shared core).
The Enter handler reads followup.state.isVisible synchronously, so if
the debounce timer has not fired before stdin.write('\\r'), the
suggestion path is skipped and onSubmit never runs. No amount of
post-Enter wait can recover from that — the keypress was already
processed against stale state.

The original wait(350) only left ~50ms margin over the 300ms debounce,
which ink 7 / React 19.2 mount overhead consumed on slow Windows
runners. Bump the initial wait to 700ms (named SUGGESTION_VISIBLE_WAIT_MS)
to give the debounce timer + cold-start render a generous buffer.

Apply to the two sibling tests too — without the wait their "does not
accept" assertions pass trivially when suggestion is never visible,
which is a false green that hides regressions in the actual reject path.

* fix(deps): align cli wrap-ansi with ink 7 (9.0.2 -> ^10.0.0)

Ink 7 ships its own wrap-ansi@10. CLI's direct dep was pinned to 9.0.2,
causing two copies of wrap-ansi in node_modules and a potential drift in
CJK width / ANSI handling between ink's internal text wrapping and our
TableRenderer.

Upgrading the CLI's direct dep to ^10.0.0 lets npm dedupe to a single
wrap-ansi@10 used by both ink and TableRenderer. API surface is
identical; the only documented behaviour change is that tabs are
expanded to 8-column tab stops before wrapping, which TableRenderer
doesn't feed in.

TableRenderer test suite (43 tests) passes against wrap-ansi@10.

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* chore(deps): document @types/node 20.x pin in overrides

The override pinning @types/node to 20.19.1 (while engines require
Node >=22) is intentional: bumping to @types/[email protected] re-introduces
a Dirent<NonSharedBuffer> type regression that breaks
@qwen-code/qwen-code-core/sessionService tests.

Add a sibling "//@types/node" note inside `overrides` so future
maintainers see the rationale and know when to revisit the pin
without having to dig through PR #3860 history.

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* test(AskUserQuestionDialog): link skipped Submit-tab test to tracking issue

The 'shows unanswered questions as (not answered) in Submit tab' test
was switched to `it.skip` in the ink 7 upgrade because
`[email protected]` doesn't flush input deterministically
through ink 7's 30fps throttle.

Add a `// TODO(#4036):` marker so the skip is greppable and can be
re-enabled once upstream ships an ink-7-compatible release.

Refs #4036

Generated with AI

Co-authored-by: Qwen-Coder <[email protected]>

* fix(deps): move @types/node pin comment out of overrides block

npm's `overrides` field requires every key to be a real package name —
the `"//@types/node"` comment-key added in 205855875 trips Arborist with
"Override without name" and breaks `npm ci` across all CI jobs.

Move the explanation to a sibling top-level `"//overrides"` key, which
npm ignores at the document root. Same documentation value, no
override-parser collateral damage.

---------

Co-authored-by: 秦奇 <[email protected]>
Co-authored-by: Qwen-Coder <[email protected]>
2026-05-11 17:29:50 +08:00
qwen-code-ci-botandgithub-actions[bot] f261229ad5 chore(release): v0.15.10 [skip ci]
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-10 16:38:09 +08:00
qwen-code-ci-botandgithub-actions[bot] d1a600acc4 chore(release): v0.15.9 [skip ci]
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-08 22:46:11 +08:00
qwen-code-ci-botandgithub-actions[bot] 0491252b27 chore(release): v0.15.8 (#3928) [skip ci]
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-08 00:46:00 +08:00
qwen-code-ci-botandgithub-actions[bot] 76765b5aa2 chore(release): v0.15.7 (#3907)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-07 18:50:01 +08:00
qwen-code-ci-botandgithub-actions[bot] 3f0b47172a chore(release): v0.15.6 (#3766)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-30 15:59:35 +08:00
易良andQwen-Coder 8de1bcb279 chore(release): bump version to 0.15.3 (#3708)
Update all package versions from 0.15.2 to 0.15.3 across the monorepo
including root package.json, package-lock.json, and all sub-packages
(channels, cli, core, vscode-ide-companion, web-templates, webui).

Co-authored-by: Qwen-Coder <[email protected]>
2026-04-28 21:04:52 +08:00
易良andQwen-Coder 44b482928b chore(release): bump version to 0.15.2 (#3596)
Co-authored-by: Qwen-Coder <[email protected]>

Update version from 0.15.1 to 0.15.2 across all packages and lockfile
2026-04-24 19:55:12 +08:00
顾盼andQwen-Coder 9010c09123 chore: bump version to 0.15.1 (#3541)
Co-authored-by: Qwen-Coder <[email protected]>
2026-04-23 11:06:07 +08:00
易良andQwen-Coder f2fac208ff chore(release): bump version to 0.15.0 (#3526)
Co-authored-by: Qwen-Coder <[email protected]>

Upgrade all package versions from 0.14.5 to 0.15.0 across the monorepo, including package-lock.json and sandbox image references.
2026-04-22 19:26:13 +08:00
tanzhenxinandQwen-Coder 17269fa0e6 chore(release): bump version to 0.14.5 (#3298)
Co-authored-by: Qwen-Coder <[email protected]>
2026-04-15 22:43:29 +08:00
tanzhenxinandQwen-Coder 8d34d33246 chore: bump version to 0.14.4 (#3209)
Co-authored-by: Qwen-Coder <[email protected]>
2026-04-13 18:15:54 +08:00
pomeloandQwen-Coder 338c0b1e9e refactor: merge test-utils package into core (#3200)
* refactor: merge test-utils package into core

Consolidate the standalone @qwen-code/qwen-code-test-utils package
into packages/core/src/test-utils/, eliminating the need for a
separate package that only provided createTmpDir, cleanupTmpDir,
and FileSystemStructure type.

Changes:
- Move file-system-test-helpers.ts into core/src/test-utils/
- Re-export from core's test-utils index
- Update 3 core test files to use relative imports
- Update cli useAtCompletion test to import from @qwen-code/qwen-code-core
- Remove test-utils devDependency from core and cli package.json
- Delete packages/test-utils/ directory

All affected tests pass (fileSearch, crawler, ignore, useAtCompletion).

Co-authored-by: Qwen-Coder <[email protected]>

* fix: remove deleted test-utils from build order

The test-utils package was merged into core but the build script still
tried to build it separately, causing CI failures.

Co-authored-by: Qwen-Coder <[email protected]>

---------

Co-authored-by: Qwen-Coder <[email protected]>
2026-04-13 17:11:03 +08:00
易良 55bcec70d0 chore: bump version to 0.14.3 (#3112) 2026-04-10 21:08:34 +08:00
易良 f296eb1a6d fix(release): run release:version 0.14.2 to sync all package versions (#3026)
The previous version bump commit (bb4376c) only updated the root
package.json but did not run `npm run release:version` to propagate
the version and sandboxImageUri to all workspace packages.

This caused Docker sandbox integration tests to fail in CI with
"manifest unknown" because build_sandbox.js built image 0.14.1
(from packages/cli/package.json) while sandboxConfig.ts expected
image 0.14.2 (from root package.json).

Fixes: https://github.com/QwenLM/qwen-code/actions/runs/24135197272/job/70424966323
2026-04-08 21:33:40 +08:00
tanzhenxinandQwen-Coder 47fac88695 chore: bump version to 0.14.1
Bump version across all packages from 0.14.0 to 0.14.1.

Co-authored-by: Qwen-Coder <[email protected]>
2026-04-03 16:17:10 +08:00
tanzhenxinandQwen-Coder 555f92ff21 chore(release): bump version to 0.14.0
- Update all packages from 0.13.x to 0.14.0
- Update sandbox image URI to 0.14.0

This prepares the 0.14.0 release with updated version numbers
across all workspace packages.

Co-authored-by: Qwen-Coder <[email protected]>
2026-04-01 19:23:49 +08:00
tanzhenxinandQwen-Coder 89b79544d1 fix: upgrade @lydell/node-pty to 1.2.0-beta.10 to fix PTY FD leak
The previous version (1.1.0) has a native-level bug on macOS where each
PTY spawn leaks one /dev/ptmx file descriptor that is never closed. Over
a long session with hundreds of shell commands, this exhausts the
system-wide PTY pool (kern.tty.ptmx_max = 511), breaking other programs
like tmux and new terminal windows.

Root cause: microsoft/node-pty#882

Co-authored-by: Qwen-Coder <[email protected]>
2026-04-01 07:55:56 +08:00
DennisYu07andQwen-Coder 3fac7f6334 chore: bump version to 0.13.2
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-30 16:21:33 +08:00
qwen-code-ci-botandQwen-Coder 070ec5b43e chore: bump version to v0.13.1 (#2716)
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-27 18:32:26 +08:00
LaZzyMan f9d9a985ce Merge branch 'main' into feat/support-permission 2026-03-19 11:24:30 +08:00
tanzhenxinandQwen-Coder 22f0437369 chore: bump version to 0.13.0
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-18 10:41:32 +08:00
qwen-code-ci-botandQwen-Coder ac30c98a26 chore: bump version to 0.12.6 (#2442)
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-17 19:00:26 +08:00
qwen-code-ci-botandQwen-Coder bcbd82d2d4 chore: bump version to 0.12.5 (#2422)
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-16 19:05:05 +08:00
LaZzyMan d129ddc489 Merge branch 'main' into feat/support-permission 2026-03-16 11:42:37 +08:00
tanzhenxinandQwen-Coder a165599b32 chore(release): bump version to 0.12.4
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-15 18:45:14 +08:00
tanzhenxinandQwen-Coder f2b7d9aaac chore(release): bump version to 0.12.3
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-13 16:42:12 +08:00
tanzhenxinandQwen-Coder 9890625de7 chore: bump version to 0.12.2
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-12 10:02:48 +08:00
LaZzyMan 7450067e37 Merge branch 'main' into feat/support-permission 2026-03-11 17:11:28 +08:00
LaZzyMan db0e373ad7 feat test tool permissions 2026-03-10 16:30:22 +08:00
tanzhenxinandQwen-Coder 1376a621b8 chore(release): bump version to 0.12.1
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-10 09:22:03 +08:00
tanzhenxin 38e49c1d39 Merge pull request #2073 from QwenLM/fix-issue-qwen-code
fix: preserve original encoding when reading/writing non-UTF-8 files
2026-03-06 11:38:35 +08:00
tanzhenxinandQwen-Coder 8052324578 chore: bump version to 0.12.0
Update version across all packages and sandbox image URI.

Co-authored-by: Qwen-Coder <[email protected]>
2026-03-04 20:25:56 +08:00
LaZzyMan a5eb1733fa fix: preserve original encoding when reading/writing non-UTF-8 files
Fixes #2069

- Add iconv-lite dependency for non-UTF-8 encoding support
- Add iconvHelper.ts as a CJS/ESM compatibility wrapper
- Update readFileWithEncoding() to detect and handle GBK/Big5/Shift_JIS
  using BOM detection -> UTF-8 validation -> chardet -> iconv-lite fallback
- Add detectFileEncoding() to identify file encoding before writes
- Update writeTextFile() to accept encoding option and encode with iconv-lite
- Update WriteFileTool and EditTool to detect and preserve original encoding
- Add tests for GBK read/write, detectFileEncoding, and encoding option
2026-03-04 14:52:46 +08:00
tanzhenxinandQwen-Coder 8d3ab4894a chore: bump version to 0.11.1
Co-authored-by: Qwen-Coder <[email protected]>
2026-03-01 10:51:30 +08:00
tanzhenxinandQwen-Coder a0d80ee4fa chore: bump version to 0.11.0
Co-authored-by: Qwen-Coder <[email protected]>
2026-02-26 21:08:40 +08:00
qwen-code-ci-botandQwen-Coder fc04ba1ece chore: bump version to 0.10.5 (#1886)
Co-authored-by: Qwen-Coder <[email protected]>
2026-02-20 22:04:14 +08:00
qwen-code-ci-botandQwen-Coder 4cd42187b8 chore: bump version to 0.10.4 (#1864)
Co-authored-by: Qwen-Coder <[email protected]>
2026-02-18 12:46:25 +08:00
qwen-code-ci-botandQwen-Coder fca4d739c7 chore: bump version to 0.10.3 (#1863)
Co-authored-by: Qwen-Coder <[email protected]>
2026-02-18 12:28:48 +08:00
mingholy.lmhandQwen-Coder 07b97282aa chore: bump version to 0.10.2
Co-authored-by: Qwen-Coder <[email protected]>
2026-02-15 11:51:04 +08:00
mingholy.lmhandQwen-Coder cc4ad12e06 chore: bump version to 0.10.1
Co-authored-by: Qwen-Coder <[email protected]>
2026-02-11 19:22:31 +08:00
tanzhenxinandQwen-Coder 50059d6f32 chore(release): Bump version to 0.10.0 across all packages
Co-authored-by: Qwen-Coder <[email protected]>
2026-02-05 11:30:45 +08:00
tanzhenxinandQwen-Coder 201356a6c8 chore: bump version to 0.9.0
Co-authored-by: Qwen-Coder <[email protected]>
2026-01-29 18:03:52 +08:00
mingholy.lmhandQwen-Coder 37fdee3245 chore: bump version to 0.8.2
Co-authored-by: Qwen-Coder <[email protected]>
2026-01-27 21:52:20 +08:00
mingholy.lmhandQwen-Coder 93b81f5d55 chore: bump version to 0.8.1
Co-authored-by: Qwen-Coder <[email protected]>
2026-01-27 21:13:38 +08:00
tanzhenxin e5b800a79d fix(vscode-ide-companion): prune ripgrep binaries and remove generic node-pty
- Re-enable macOS x64 CI builds using macos-15-intel runner
- Remove generic node-pty dependency in favor of platform-specific @lydell/node-pty-* packages
- Add ripgrep binary pruning for platform-specific builds to reduce VSIX size
- Add Windows workaround to remove npm junction self-references during packaging
2026-01-24 13:18:57 +08:00
LaZzyMan 3b6849be94 fix prompts denpendence 2026-01-22 15:48:54 +08:00
LaZzyMan c0d78a8f3c fix github pkg dependence 2026-01-22 15:14:55 +08:00
LaZzyMan aa80e738fb fix dependences of core pkg 2026-01-22 14:09:08 +08:00
tanzhenxin 1f5206cd54 Merge pull request #1526 from QwenLM/chore/no-tiktoken
chore: remove tiktoken dependency and use API-reported token counts
2026-01-21 19:37:42 +08:00