Commit graph

2229 commits

Author SHA1 Message Date
沐目
a6e8aec7f4 fix: destroy both stdin and stdout on shutdown, guard against duplicate signals
- Close stdout in addition to stdin to prevent hanging writes during shutdown
- Add shuttingDown guard to ensure cleanup runs only once

Made-with: Cursor
2026-03-19 11:53:13 +08:00
沐目
2e6ab6562b fix: handle SIGTERM/SIGINT in ACP mode for graceful shutdown (#1884)
The ACP process was ignoring SIGTERM because signal handlers registered
elsewhere in the CLI startup path (e.g., stdin raw mode restoration)
override Node.js's default exit behavior. This caused the process to
remain alive after the IDE sends SIGTERM, leading to zombie connections
and exit code 143 errors in JetBrains IntelliJ IDEA.

Add explicit SIGTERM/SIGINT handlers in runAcpAgent() that destroy
stdin, which closes the ndjson stream and resolves connection.closed,
allowing the process to exit gracefully.

Made-with: Cursor
2026-03-19 11:46:57 +08:00
tanzhenxin
fe304a0c32 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-18 19:20:22 +08:00
mingholy.lmh
79083ffd50 Fix SDK message event pairing and improve content block handling
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-18 18:10:23 +08:00
mingholy.lmh
eea92fc8db fix: ensure message_start and message_stop are always paired in SDK stream events
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-18 18:10:23 +08:00
DennisYu07
4c0e4a9611
Merge pull request #2352 from QwenLM/feat/hooks-plugin
feat(hooks): implement hooks extension mechanism
2026-03-18 17:29:10 +08:00
tanzhenxin
d1b761adf2
Merge pull request #2425 from kkhomej33-netizen/fix/ctrl-r-command-search-order
Some checks failed
Qwen Code CI / Test-3 (push) Has been skipped
Qwen Code CI / Test-4 (push) Has been skipped
Qwen Code CI / Lint (push) Failing after 24s
Qwen Code CI / CodeQL (push) Failing after 24s
Qwen Code CI / Test (push) Has been skipped
Qwen Code CI / Test-1 (push) Has been skipped
Qwen Code CI / Test-2 (push) Has been skipped
Qwen Code CI / Test-5 (push) Has been skipped
Qwen Code CI / Test-6 (push) Has been skipped
Qwen Code CI / Test-7 (push) Has been skipped
Qwen Code CI / Test-8 (push) Has been skipped
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Failing after 5s
E2E Tests / E2E Test (Linux) - sandbox:none (push) Failing after 6s
Qwen Code CI / Post Coverage Comment (push) Has been skipped
E2E Tests / E2E Test - macOS (push) Has been cancelled
fix(cli): show newest-first history for Ctrl+R command search
2026-03-18 13:51:28 +08:00
tanzhenxin
080271031d
Merge pull request #2400 from QwenLM/feat/system-prompt-sdk
feat: add system prompt customization options in SDK and CLI
2026-03-18 11:29:21 +08:00
tanzhenxin
22f0437369 chore: bump version to 0.13.0
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-18 10:41:32 +08:00
qwen-code-ci-bot
ac30c98a26
chore: bump version to 0.12.6 (#2442)
Some checks failed
Qwen Code CI / Lint (push) Failing after 5s
Qwen Code CI / CodeQL (push) Failing after 5s
Qwen Code CI / Test (push) Has been skipped
Qwen Code CI / Test-1 (push) Has been skipped
Qwen Code CI / Test-2 (push) Has been skipped
Qwen Code CI / Test-3 (push) Has been skipped
Qwen Code CI / Test-4 (push) Has been skipped
Qwen Code CI / Test-5 (push) Has been skipped
Qwen Code CI / Test-6 (push) Has been skipped
Qwen Code CI / Test-7 (push) Has been skipped
Qwen Code CI / Test-8 (push) Has been skipped
E2E Tests / E2E Test (Linux) - sandbox:none (push) Failing after 3s
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Failing after 4s
Qwen Code CI / Post Coverage Comment (push) Has been skipped
E2E Tests / E2E Test - macOS (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-17 19:00:26 +08:00
tanzhenxin
12293033b4 refactor(agents): remove outputFile from tool result events
Remove unused outputFile property from AgentToolResultEvent and its
associated test case. This property is not needed for agent tool
result handling.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-17 14:29:02 +08:00
DragonnZhang
7886ec6c8d fix(keypress): handle unsupported Kitty CSI-u keys and recover plain text
- Add helper functions for better code organization (createPrintableKey,
  getCompleteCsiSequenceLength, parsePlainTextPrefix)
- Drop unsupported Kitty CSI-u keys without blocking subsequent input
- Recover plain text that arrives in same chunk after unsupported CSI-u keys
- Add comprehensive tests for edge cases (CAPS_LOCK, event metadata variants)

Improves robustness of Kitty keyboard protocol parsing by gracefully
handling unsupported key codes and ensuring plain text input is not lost.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-17 14:02:41 +08:00
tanzhenxin
edd8388b27 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-17 14:00:47 +08:00
tanzhenxin
dbfa5b3e8e
Merge pull request #2423 from QwenLM/test/shell-and-encoding-utilities
Some checks failed
Qwen Code CI / Lint (push) Failing after 3s
Qwen Code CI / CodeQL (push) Failing after 3s
Qwen Code CI / Test (push) Has been skipped
Qwen Code CI / Test-1 (push) Has been skipped
Qwen Code CI / Test-2 (push) Has been skipped
Qwen Code CI / Test-3 (push) Has been skipped
Qwen Code CI / Test-4 (push) Has been skipped
Qwen Code CI / Test-5 (push) Has been skipped
Qwen Code CI / Test-6 (push) Has been skipped
Qwen Code CI / Test-7 (push) Has been skipped
Qwen Code CI / Test-8 (push) Has been skipped
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Failing after 4s
E2E Tests / E2E Test (Linux) - sandbox:none (push) Failing after 3s
Qwen Code CI / Post Coverage Comment (push) Has been skipped
E2E Tests / E2E Test - macOS (push) Has been cancelled
fix(shell): resolve Windows encoding issues for non-ASCII output
2026-03-16 23:07:40 +08:00
tanzhenxin
17939baa66 feat(core): auto-detect UTF-8 BOM for PowerShell scripts on Windows
- Add needsUtf8Bom() to detect when UTF-8 BOM is needed based on file
  extension and system code page
- PowerShell 5.1 on non-UTF-8 Windows systems (e.g. GBK) requires BOM
  to read scripts correctly
- Remove default UTF8 encoding; undefined now triggers auto-detection
- Add tests for needsUtf8Bom() covering Windows/non-Windows scenarios

This ensures PowerShell scripts are written with UTF-8 BOM on systems
that need it, fixing character encoding issues for non-ASCII content.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-16 22:44:53 +08:00
zach
46b9c75f83 fix(cli): show newest-first history for Ctrl+R command search 2026-03-16 14:16:03 +00:00
qwen-code-ci-bot
bcbd82d2d4
chore: bump version to 0.12.5 (#2422)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-16 19:05:05 +08:00
tanzhenxin
58bee3dec9
Merge pull request #2388 from QwenLM/fix/remove-enableToolOutputTruncation-setting
fix(core): improve shell tool truncation, simplify tool output handling, and remove summarization
2026-03-16 09:51:37 +08:00
tanzhenxin
d0a4dcc89c
Merge pull request #2374 from QwenLM/fix/vscode-session-race-conditions
fix(vscode): prevent race conditions in prompt cancellation and streaming
2026-03-16 09:51:20 +08:00
pomelo
15424f263b
Merge pull request #2367 from QwenLM/refactor/send-message-type
fix(core): strip orphaned user entries before retry to prevent API errors
2026-03-16 09:43:59 +08:00
DragonnZhang
ee33a3c35e feat: add system prompt customization options in SDK and CLI 2026-03-16 02:57:31 +08:00
tanzhenxin
110fcd7b7b
Merge pull request #2280 from xuewenjie123/fix/hooks-json-schema-type
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: correct hooks JSON schema type definition
2026-03-15 22:44:01 +08:00
tanzhenxin
06d8a01532
Merge pull request #2391 from kkhomej33-netizen/fix/macos-pty-sandbox-rules
fix(cli): allow /dev/ptmx and /dev/ttys* in macOS permissive sandbox
2026-03-15 22:33:40 +08:00
tanzhenxin
fb44b76abd
Merge pull request #2157 from QwenLM/zth/keep-rejected-plan-content-visible
Some checks are pending
Qwen Code CI / CodeQL (push) Waiting to run
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
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
Keep rejected plan content visible in plan mode
2026-03-15 22:11:57 +08:00
tanzhenxin
5c31341205 Merge remote main into fix/pdf-session-corruption
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-15 21:24:57 +08:00
tanzhenxin
59c1765ec5
Merge pull request #2001 from hs-ye/docs/subagent-limits
Docs/subagent system prompt limits
2026-03-15 21:15:53 +08:00
tanzhenxin
1852a73a3f fix(subagents): change limits from hard errors to soft warnings
- Increase description warning threshold from 500 to 1,000 characters
- Change system prompt 10,000 char limit from error to warning
- Remove intermediate 5,000 char warning threshold for system prompts
- Update documentation to reflect soft warning behavior

This provides more flexibility for users while still guiding them
toward better practices.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-15 20:56:25 +08:00
tanzhenxin
8161ac4523 fix(hooks): correct JSON schema type for hooks configuration
- Add 'array' type support to SettingItemDefinition
- Change hooks field from object to array type
- Add additionalProperties constraint for env fields
- Fix additionalProperties generation to only apply for object types

This ensures the hooks configuration schema correctly represents hooks as an array
and properly validates environment variable objects.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-15 20:32:56 +08:00
tanzhenxin
b83e9ea393
Merge pull request #2333 from chen893/fix/slash-command-i18n
fix(i18n): localize slash command descriptions
2026-03-15 20:12:15 +08:00
tanzhenxin
a165599b32 chore(release): bump version to 0.12.4
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-15 18:45:14 +08:00
zach
487a8390b0 fix(cli): allow macOS PTY device paths in permissive sandbox 2026-03-15 08:09:35 +00:00
tanzhenxin
e484dfbbad refactor: remove summarizeToolOutput feature
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Remove the summarizeToolOutput setting and related functionality.

This feature allowed LLM-based summarization of shell tool output but is no longer needed.

This simplifies the codebase by removing unused summarization logic and configuration options.
2026-03-15 13:51:32 +08:00
tanzhenxin
04b94d5720 refactor(core): move truncation logic from scheduler to shell tool
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

- Extract truncateAndSaveToFile to utils/truncation.ts with tests

- Move truncation handling from CoreToolScheduler to ShellTool

- Remove outputFile field from ToolCallResponseInfo and display types

- Add line limit constraint alongside character threshold for truncation

This improves separation of concerns by handling output truncation at the tool level where the output is generated, rather than centrally in the scheduler.
2026-03-15 13:37:12 +08:00
tanzhenxin
fed08cb1dd fix(config): remove enableToolOutputTruncation setting
Remove the enableToolOutputTruncation boolean setting. Users can now
disable truncation by setting truncateToolOutputThreshold to 0 or a
negative value instead of using a separate toggle.

This simplifies the configuration and prevents users from accidentally
disabling truncation which could cause memory issues with large tool
outputs.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-15 11:30:02 +08:00
tanzhenxin
545f466442 feat(telemetry): add user retry event tracking
This enables tracking of user retry actions for analytics purposes.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-14 21:14:42 +08:00
tanzhenxin
ba1680564e fix(session): handle cancellation during prompt queue wait
- Install AbortController before awaiting previous prompt so session/cancel
  during the wait targets the correct prompt
- Check if cancelled after waiting for previous prompt to complete
- Drop untagged streamEnd events when a tagged stream is active

This prevents race conditions where a new prompt could be incorrectly
cancelled or have its state cleared by stale events from a previous prompt.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-14 17:47:12 +08:00
tanzhenxin
b3560e47a7 fix(vscode): prevent race conditions in prompt cancellation and streaming
- Add pendingPromptCompletion tracking to ensure new prompts wait for
  previous prompt's tool results before reading chat history
- Add requestId correlation between streamStart/streamEnd to detect and
  discard stale events from cancelled requests
- Guard against duplicate streamEnd messages
- Preserve isWaitingForResponse during cancel to prevent auto-submit

This fixes malformed history issues in VS Code extension where rapid
prompt cancellation and resubmission caused tool_call → user_query →
tool_result ordering instead of the correct sequence.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-14 16:13:19 +08:00
palanisd
9665760f43
fix(insight): handle individual LLM failures in qualitative insights (#2341) (#2361)
Previously, `generateQualitativeInsights` used `Promise.all` with a
`generate` helper that re-threw errors. A single LLM call failure
(timeout, rate limit, JSON parse error) caused the entire `qualitative`
object to become `undefined`, hiding all detailed report sections.

Now individual `generate` calls catch errors and return `undefined`
instead of throwing. The `QualitativeInsights` interface fields are
made optional so partial results render correctly — each React section
component already guards against missing data with `if (!field) return
null`.

Made-with: Cursor
2026-03-14 15:39:46 +08:00
Shaojin Wen
1359563f45
feat(skills): add bundled /review skill for out-of-the-box code review (#2348)
feat(skills): add bundled /review skill for out-of-the-box code review
2026-03-14 15:15:08 +08:00
tanzhenxin
88685e55f6 fix(core): strip orphaned user entries before retry to prevent API errors
Replace isContinuation boolean with SendMessageType enum for clearer
message type semantics. Add stripOrphanedUserEntriesFromHistory() to
clean up orphaned user entries in chat history before retry operations,
preventing 'messages with role tool must be a response to preceding
message with tool_calls' API errors.

Fixes #2360

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-14 12:51:34 +08:00
DennisYu07
368c45d7bf adapt claude to qwen code 2026-03-13 07:28:23 -07:00
tanzhenxin
eff6543d05 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-13 21:16:49 +08:00
tanzhenxin
fe9819836c fix(cli): remove unused debug log session setup in loadSettings
The temporary debug log session setup at the start of loadSettings() was
removed along with unused imports (setDebugLogSession, sanitizeCwd). The
resolvedWorkspaceDir variable is now defined where it's actually used.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 20:05:23 +08:00
顾盼
d950ad0f7d
Merge pull request #2344 from QwenLM/fix-vscode-encoding
Refactors `FileSystemService` interface to use ACP-aligned request/response objects
2026-03-13 18:05:33 +08:00
tanzhenxin
f3cd92946c
Merge pull request #2351 from QwenLM/release/v0.12.3
chore(release): bump version to 0.12.3
2026-03-13 17:47:02 +08:00
tanzhenxin
cb1f8d7691
Merge pull request #2350 from QwenLM/fix/ctrl-f-pty-artifact
fix(cli): prevent Ctrl+F from leaking to PTY as ^F artifact
2026-03-13 17:32:18 +08:00
tanzhenxin
d195c95b9c
Merge pull request #2245 from yshngg/bugfix/mcp-add-option
fix: improve qwen mcp add option handling for arrays
2026-03-13 17:30:49 +08:00
tanzhenxin
f2b7d9aaac chore(release): bump version to 0.12.3
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 16:42:12 +08:00
tanzhenxin
f831586d96 fix(cli): prevent Ctrl+F from leaking to PTY as ^F artifact
When toggling shell focus mode with Ctrl+F, the raw control character
was being forwarded to the PTY, causing a ^F artifact to appear in the
shell. This fix intercepts the Ctrl+F keypress before it reaches the
PTY when it's used for focus mode toggling.

Fixes #2236

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 16:34:55 +08:00
tanzhenxin
4e5fccf82e test(cli): remove flaky keyboard interaction tests on Windows
Remove tests that rely on arrow key and keyboard input timing which are
unreliable on Windows CI due to terminal emulation differences.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 16:13:31 +08:00