Commit graph

1864 commits

Author SHA1 Message Date
tanzhenxin
2489044e61
Merge pull request #2765 from QwenLM/fix/subagent-token-leak-footer
fix: prevent subagent telemetry from overwriting main agent footer context
2026-04-01 15:37:55 +08:00
tanzhenxin
a29e059d2e
Merge pull request #2781 from QwenLM/feat/hooks-remove-experimental
feat(hooks): remove experimental flag and add disabled state UI
2026-04-01 15:37:34 +08:00
tanzhenxin
32f3339908
Merge pull request #2764 from LaZzyMan/fix/tree-sitter-symlink-wasm
fix(core): robustly resolve tree-sitter WASM path for symlinked CLI installations
2026-04-01 15:37:06 +08:00
tanzhenxin
92132ec8fa
Merge pull request #2659 from QwenLM/fix/compress-split-point-tool-heavy-conversations
fix: make /compress handle tool-heavy conversations correctly
2026-04-01 15:36:56 +08:00
LaZzyMan
38aa1a6aa2 fix lint 2026-04-01 14:33:29 +08:00
DennisYu07
4b05c74b02
Merge pull request #2745 from QwenLM/fix/proxy-url-compability
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: normalize proxy URLs to support addresses without protocol prefix
2026-04-01 14:30:29 +08:00
DennisYu07
b4d2ba2a56 remove test case 2026-04-01 13:39:51 +08:00
DennisYu07
a32ab3a58f fix test 2026-04-01 12:48:15 +08:00
DennisYu07
9c26c7fe85 add more notes 2026-04-01 12:04:37 +08:00
DennisYu07
5221002831 remove hooks experimental and refactor hook Config 2026-04-01 11:50:23 +08:00
pomelo
20e51e3d30
Merge pull request #2769 from QwenLM/fix/qwen-path-replacement-in-md-files
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: add .qwen path replacement in markdown files during extension install
2026-03-31 22:22:26 +08:00
DennisYu07
3c484782ec fix: replace .claude paths with .qwen in markdown files during extension install
Previously, only shell scripts (.sh) had .claude -> .qwen path replacement.
Markdown files (.md) like cancel-ralph.md and help.md were missing this
conversion, causing incorrect paths like .claude/ralph-loop.local.md.

Now performVariableReplacement also replaces .claude directory references
in markdown files using the same regex pattern as shell scripts.
2026-03-31 19:47:03 +08:00
tanzhenxin
3d8f56a207 fix: prevent subagent telemetry from overwriting main agent footer context
Root cause: PR #1835 accidentally overwrote PR #1912's correct telemetry
isolation during a merge conflict resolution. This restores the original
guard logic so subagent GeminiChat instances (which don't receive a
telemetryService param) no longer write to the global uiTelemetryService.

- Remove unused uiTelemetryService import from geminiChat.ts
- Guard telemetry calls with this.telemetryService checks
- Add test verifying subagent isolation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-31 09:15:51 +00:00
LaZzyMan
ce2f1902b9 fix(core): add regex-based fallback when tree-sitter WASM fails to load
When the WASM files cannot be found (e.g. symlinked CLI whose vendor path
probe still fails, or any other I/O error), isShellCommandReadOnlyAST and
initParser previously left the agent in a permanently broken state:
  - initParser() returned a rejected promise stored in initPromise, so every
    subsequent call returned the same rejection immediately
  - isShellCommandReadOnlyAST() propagated the error to its caller, which
    caused the shell tool to throw and left the agent 'thinking forever'

Changes:
- Import isShellCommandReadOnly from shellReadOnlyChecker.js
- Track parserInitFailed: boolean flag on the parser singleton
- initParser(): on any init error, set parserInitFailed=true and reset
  initPromise=null (preventing permanent hang on the rejected promise)
- isShellCommandReadOnlyAST(): check parserInitFailed before attempting
  AST parse; wrap the AST path in try/catch so any unexpected runtime
  error also falls through to the regex checker
- _resetParser(): also resets parserInitFailed so tests can re-initialise
- Export _setParserFailedForTesting() to allow unit tests to exercise the
  fallback path without breaking actual WASM loading

Tests added:
- Fallback suite: verifies that when the parser is marked as failed, all
  isShellCommandReadOnlyAST calls delegate to isShellCommandReadOnly and
  that _resetParser() restores normal AST operation
- Consistency suite: 40+ commands from shellReadOnlyChecker.test.ts run
  through BOTH implementations; every case must agree. Known intentional
  divergences (pure assignment, process substitution, control flow,
  function definitions) are documented explicitly - all happen to agree
  on the same boolean result, confirming the two implementations are
  behaviourally consistent across the tested corpus

Fixes #2758
2026-03-31 15:23:51 +08:00
LaZzyMan
9f4bd9be5e fix(core): probe vendor directory existence to resolve WASM path robustly
The previous fix used fs.realpathSync(fileURLToPath(import.meta.url)) to
resolve symlinks before computing the WASM path.  This works in the common
case (/usr/bin/qwen → /usr/lib/node_modules/.../cli.js), but silently falls
back to the unresolved symlink path when:

  - realpathSync throws (ENOENT, EACCES, ELOOP, or other OS-level errors)
  - Node.js has already resolved import.meta.url to the real path on some
    platforms (making realpathSync a no-op and the first candidate correct),
    but the vendor files are still not found at that location

The new approach for the bundle case (inSrcUtils = false) collects up to four
candidate directories:

  1. path.dirname(fileURLToPath(import.meta.url))  — already resolved on
     Node.js 18+ on most platforms
  2. path.dirname(realpathSync(import.meta.url))   — symlink-resolved fallback
  3. path.dirname(process.argv[1])                 — entry point as invoked
  4. path.dirname(realpathSync(process.argv[1]))   — resolved entry point

It then calls fs.existsSync on each candidate path for the requested .wasm
file and returns the first one that actually exists, rather than trusting
that a single path computation is correct.  If none exist we fall back to
the first candidate so the caller still gets a deterministic ENOENT (instead
of silently using a wrong path).

Fixes #2758
2026-03-31 15:00:37 +08:00
LaZzyMan
501f80a514 fix: handle orphaned funcCall and improve compression logic for tool-heavy conversations
- Strip trailing orphaned funcCall (force=true) before split point calculation,
  so normal compression logic runs cleanly on the remaining history instead of
  requiring ad-hoc special-casing
- Remove redundant lastToolCompletionSplitPoint machinery: after fixing the
  i+2 index bug, lastSplitPoint already subsumes it, making Math.max redundant
- Add MIN_COMPRESSION_FRACTION constant (0.05) to guard against futile API
  calls when historyToCompress is too small relative to total history
- Add tests for orphaned funcCall handling (force=true compresses, force=false NOOP)
- Add test for MIN_COMPRESSION_FRACTION guard

Fixes #2647
2026-03-30 18:00:27 +08:00
DennisYu07
082d7981b2
Merge pull request #2750 from QwenLM/release/v0.13.2
chore: release v0.13.2
2026-03-30 16:43:37 +08:00
顾盼
9b9045f8f2
Merge pull request #2747 from LaZzyMan/fix/remove-command-substitution-deny
fix(shell): remove command substitution deny check from getDefaultPermission
2026-03-30 16:35:33 +08:00
DennisYu07
3fac7f6334 chore: bump version to 0.13.2
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-30 16:21:33 +08:00
DennisYu07
c975812d89 add @license 2026-03-30 16:11:26 +08:00
DennisYu07
56492be757 fix normalize in different place 2026-03-30 16:06:31 +08:00
顾盼
fcaa1729d6
Merge pull request #2744 from LaZzyMan/fix/tree-sitter-symlink-wasm
fix(core): resolve tree-sitter wasm path for symlinked CLI
2026-03-30 15:52:02 +08:00
顾盼
76d40210f1
Merge pull request #2707 from QwenLM/fix/line-ending-preservation
fix: preserve original line endings (CRLF/LF) when editing files
2026-03-30 15:51:35 +08:00
LaZzyMan
fb7e30ad3e fix(shell): remove command substitution deny check from getDefaultPermission 2026-03-30 15:50:15 +08:00
DennisYu07
4767e6d267
Merge pull request #2623 from QwenLM/feat/qwen-code-helper
feat: add bundled qc-helper skill, qwen-code-claw reference, and README claw guide
2026-03-30 15:35:19 +08:00
顾盼
cd935a5896
Merge pull request #2656 from QwenLM/fix-issue-qwen-code
fix: resolve /clear command and ESC key lag caused by hooks system
2026-03-30 15:32:42 +08:00
LaZzyMan
775ebc8470 fix(core): guard against mocked fs.realpathSync returning undefined in tests 2026-03-30 15:03:38 +08:00
DennisYu07
588ef60411 fix comment 2026-03-30 14:54:17 +08:00
DennisYu07
bba3ab93b1 fix proxy normalization 2026-03-30 14:37:18 +08:00
LaZzyMan
a288f91869 fix(core): resolve tree-sitter wasm path for symlinked CLI 2026-03-30 14:17:55 +08:00
DennisYu07
01fa348c17 add cache for path 2026-03-29 12:10:50 +08:00
DennisYu07
c2fe554e34 fix bash path for node-pty 2026-03-29 11:55:32 +08:00
qwen-code-ci-bot
070ec5b43e
chore: bump version to v0.13.1 (#2716)
Some checks failed
Qwen Code CI / Lint (push) Has been cancelled
Qwen Code CI / CodeQL (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:none (push) Has been cancelled
E2E Tests / E2E Test - macOS (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
Qwen Code CI / Post Coverage Comment (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 18:32:26 +08:00
Mingholy
f6c273d0a0
Merge pull request #2690 from LaZzyMan/fix/acp-permission-flow
fix(acp): align permission flow across clients
2026-03-27 17:19:46 +08:00
Mingholy
4f8c98576a
Merge pull request #2675 from LaZzyMan/fix-issue-2671
fix: use config working directory for OpenAI logger path resolution in ACP mode
2026-03-27 16:54:59 +08:00
LaZzyMan
f5349d80b9 fix: preserve original line endings (CRLF/LF) when editing files
- Add LineEnding type and detectLineEnding() function to fileSystemService
- Detect and record line ending format in readTextFile _meta
- Honor lineEnding from _meta in writeTextFile to restore original format
- Update edit.ts and write-file.ts to pass lineEnding through _meta
- Add comprehensive unit tests for line ending detection and preservation

Fixes: #2704
2026-03-27 16:28:41 +08:00
LaZzyMan
7a6b725b0c feat: replace qwen-settings-config with bundled qc-helper skill
- Remove project-level qwen-settings-config skill and its references/
- Create bundled qc-helper skill at packages/core/src/skills/bundled/
  that references docs/users/ for answering usage/config questions
- Update copy_bundle_assets.js to copy docs/users/ into dist/bundled/qc-helper/docs/
- Update dev.js to create symlink for dev mode docs access
- Add bundled docs directory verification in prepare-package.js
- Revert doc-update skills (docs-audit-and-refresh, docs-update-from-diff)
  to main branch versions
2026-03-27 12:03:00 +08:00
LaZzyMan
0fd6f3a78b Merge branch 'main' into fix/acp-permission-flow 2026-03-27 10:54:25 +08:00
LaZzyMan
585bce06d2 Merge branch 'fix-permission-issues' into fix/acp-permission-flow 2026-03-27 10:05:01 +08:00
LaZzyMan
dd518de5b0 fix(acp): align permission flow across clients 2026-03-26 23:25:04 +08:00
Mingholy
26e0128dc6
Merge pull request #2631 from QwenLM/fix/issue-1203-subagent-diff-tab-stuck
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(acp-integration/agent): clear stale subagent diff confirmation after IDE accept
2026-03-26 21:44:16 +08:00
Mingholy
d6502dd352
Merge pull request #2637 from LaZzyMan/fix-permission-issues
feat: human-readable permission labels, deny rule feedback, and multi-dir search improvements
2026-03-26 21:44:00 +08:00
Mingholy
be32213973
Merge pull request #2611 from QwenLM/mingholy/fix/node-pty-errors
fix(shell): handle PTY race condition errors gracefully
2026-03-26 21:43:33 +08:00
Mingholy
00447356ad
Merge pull request #2602 from QwenLM/feat/hooks-refactor-hooks-ui
feat(hooks ui): refactor ui for Qwen Code hooks
2026-03-26 20:11:50 +08:00
LaZzyMan
460c81a7b6 fix(tools): fix glob ignore base path and add dedup for grep/ripgrep
- glob: compute relativePaths relative to projectRoot (config.getTargetDir())
  instead of searchDir so that FileDiscoveryService evaluates .gitignore /
  .qwenignore rules against the correct paths when path option is used or
  when searching across multiple workspace directories

- grep: deduplicate rawMatches by filePath:lineNumber key when searching
  multiple workspace directories to prevent duplicate results from
  overlapping search roots (e.g. parent dir + child dir in workspace)

- ripGrep: deduplicate output lines by filepath:linenum prefix when
  searching multiple workspace paths to handle the same edge case

- tests: add regression tests covering
  - glob ignores files matching .gitignore/.qwenignore when path option
    points to a subdirectory
  - grep deduplication with parent+child overlapping workspace dirs
  - ripgrep deduplication when raw output contains duplicate lines
2026-03-26 17:54:38 +08:00
DennisYu07
db7ec117c2
Merge pull request #2645 from QwenLM/fix/git_bash_change_windows
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(windows): support git bash/MSYS2 shell detection on Windows
2026-03-26 13:04:38 +08:00
LaZzyMan
64b83a102c fix: use config working directory for OpenAI logger path resolution in ACP mode
In ACP mode (e.g., Zed editor), process.cwd() may return '/' (filesystem root),
causing OpenAILogger to attempt creating '/logs/openai' which fails with ENOENT.

Add an optional 'cwd' parameter to OpenAILogger constructor and pass
config.getWorkingDir() from LoggingContentGenerator so that log directories
are resolved relative to the project working directory instead of process.cwd().

Fixes #2671
2026-03-26 11:51:22 +08:00
Mingholy
9cd4434fe2
Merge pull request #2547 from QwenLM/fix/lsp-cpp-java-support-v2
fix(lsp): improve C++/Java/Python language server support
2026-03-26 10:22:41 +08:00
Mingholy
51123ca024
Merge pull request #2421 from QwenLM/feat/hooks-telemetry
feat(hooks): Add comprehensive hook execution telemetry
2026-03-26 10:10:11 +08:00
LaZzyMan
ea3a2d6f5b fix: improve /compress split point selection for tool-heavy conversations
When conversation history is near the context window limit and dominated by
tool call/response cycles, findCompressSplitPoint would return a near-zero
split point because it only considered non-functionResponse user messages as
valid split points. This caused /compress to send almost no history to the
compression API (e.g. 29 tokens), producing a useless summary that inflated
token count instead of reducing it.

Changes:
- Track tool completion boundaries (positions after functionResponse) as
  fallback split points in findCompressSplitPoint
- Add user-with-functionResponse to the compress-everything safety check
- Use Math.max of primary and fallback split points for better coverage
- Add minimum content guard (5% threshold) to prevent futile API calls
- Add 4 new test cases covering tool-heavy conversation scenarios

Fixes #2647
2026-03-25 15:13:10 +08:00