Commit graph

5543 commits

Author SHA1 Message Date
DennisYu07
a0b3cc3268 add hook detail page 2026-03-24 18:08:15 +08:00
cris
01133e1988 fix git bash 2026-03-24 16:40:15 +08:00
LaZzyMan
8c31775573 fix search tool for multi dirs 2026-03-24 16:32:51 +08:00
DennisYu07
247e8b8742 add test for hooks ui 2026-03-24 15:23:31 +08:00
DennisYu07
7a53185dbf add multi-language for hooks ui 2026-03-24 14:49:16 +08:00
tanzhenxin
a5d2fafa3c fix(channels): fix TypeScript build errors
- Use bracket notation for index signature properties
- Add tsconfig.json for channels/base and channels/telegram packages

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-24 06:45:39 +00:00
顾盼
3776825c2d
Merge pull request #2539 from d191/main
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(extensions): support non-GitHub git URLs for extension installation
2026-03-24 14:43:02 +08:00
tanzhenxin
615ccd08f2 feat(channels): add config validation, instructions, and sessionScope support
- Validate required fields (type, token) with clear error messages
- Prepend channel instructions to first prompt of each session
- SessionRouter respects sessionScope (user/thread/single) for routing keys
2026-03-24 06:33:37 +00:00
tanzhenxin
2985201317 feat(channels/telegram): add slash command support
- Local commands: /start (welcome), /help (dynamic list), /reset (clear session)
- Non-local slash commands forwarded to ACP agent as prompts
- AcpBridge captures available_commands_update to populate /help dynamically
- SessionRouter gains hasSession/removeSession for /reset support
2026-03-24 06:33:37 +00:00
tanzhenxin
be838eea01 feat(channels/telegram): format agent markdown as Telegram HTML
Use telegram-markdown-formatter to convert agent markdown responses
to Telegram HTML (bold, italic, code blocks, links). Falls back to
plain text if HTML parsing fails. Also uses the package's built-in
HTML-aware message splitting for long responses.
2026-03-24 06:33:36 +00:00
tanzhenxin
3eedc43238 feat(channels): add Telegram channel integration with ACP bridge
Implements the channels infrastructure for connecting external messaging
platforms to Qwen Code via ACP. Phase 1 supports plain text round-trip:
Telegram user sends message -> AcpBridge -> qwen-code --acp -> response
back to Telegram.

New packages:
- @qwen-code/channel-base: AcpBridge, SessionRouter, SenderGate, ChannelBase
- @qwen-code/channel-telegram: TelegramAdapter using telegraf

CLI: `qwen channel start <name>` reads from settings.json channels config,
spawns ACP agent, connects to Telegram via polling.
2026-03-24 06:33:36 +00:00
LaZzyMan
8f7f57f5a8 Merge branch 'main' into feat/qwen-code-helper 2026-03-24 11:06:20 +08:00
qqqys
7b1d294324 fix(cli): add kitty sequence timeout management and buffer handling improvements in KeypressProvider 2026-03-24 10:57:11 +08:00
yiliang114
ee1f98f4ff fix(acp-integration/agent): clear pendingConfirmation when tool result arrives for pending tool
- Track pendingConfirmationCallId in AgentToolInvocation to properly clear stale prompts
- Clear pendingConfirmation when TOOL_RESULT arrives for the pending tool (IDE diff-tab path)
- Clear pendingConfirmation via onConfirm callback (terminal UI path)
- Ensure pendingConfirmation is NOT cleared when TOOL_RESULT is for a different tool
- Prefer filePath over fileName for diff content path in Session and SubAgentTracker
- Add comprehensive tests for IDE diff-tab and terminal UI confirmation flows

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 23:49:22 +08:00
mingholy.lmh
e950d1e8c5 fix(cli): sync PTY race condition error handling to global uncaughtException
- Handle EIO read race errors on macOS/Linux (node-pty#178)
- Handle EBADF/ioctl resize race errors
- Handle 'Cannot resize a pty that has already exited' on Windows
- Require PTY-specific message context to avoid false positives

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 21:23:27 +08:00
DennisYu07
aebe889b31
Merge pull request #2607 from QwenLM/fix/hook_runner-process_kill
Some checks are pending
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
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
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(hooks): terminate hook child processes when user exits CLI
2026-03-23 20:57:38 +08:00
qqqys
61fb9425a2 fix(cli): enhance KeypressProvider with kitty sequence timeout management 2026-03-23 20:41:36 +08:00
DennisYu07
7573e1b0bd add systemMessage for jook 2026-03-23 19:48:08 +08:00
顾盼
0731ce81b8
Merge pull request #2610 from QwenLM/fix/web-fetch-system-instruction
fix(web-fetch): add simplified system instruction to prevent AI greeting responses
2026-03-23 19:34:08 +08:00
mingholy.lmh
0da574d800 test: simplify tool control test by removing redundant tool restrictions
Remove excludeTools and allowedTools configurations from the test
as coreTools is sufficient for limiting available tools. Update
canUseTool expectation to verify write_file is properly called.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 19:30:03 +08:00
mingholy.lmh
aaa0091d02 fix(shell): handle expected PTY race condition errors gracefully
- Ignore EIO errors on PTY process exit (expected due to read/write race)
- Handle EBADF errors during resize operations (PTX fd already closed)
- Handle 'Cannot resize a pty that has already exited' message
- Add comprehensive tests for all error scenarios

These changes prevent app crashes from benign PTY race conditions
that occur on macOS/Linux when the process exits while I/O is pending.

Refs: https://github.com/microsoft/node-pty/issues/178

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-23 18:04:21 +08:00
Qwen Code Bot
ca3086c62c fix(web-fetch): add simplified system instruction to prevent AI greeting responses
- Add concise system instruction for web content processing
- Prevents glm-5 and other models from using main session's complex prompt
- Fixes issue where web_fetch returns AI greetings instead of web content

Resolves #2609
2026-03-23 17:39:52 +08:00
DennisYu07
b87c731487 fix test 2026-03-23 16:42:46 +08:00
DennisYu07
8bd7cf2cda add singal abort for hooks 2026-03-23 16:02:54 +08:00
顾盼
a0041191a7
Merge pull request #2536 from LaZzyMan/fix/test-artifacts-and-shell-permissions
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 shell permission parsing and test-created debug artifacts
2026-03-23 11:34:16 +08:00
DennisYu07
b08154dbee refactor ui for qwen code hooks 2026-03-23 11:24:59 +08:00
LaZzyMan
6653edeb0c Merge branch 'main' into fix/test-artifacts-and-shell-permissions 2026-03-23 11:10:05 +08:00
LaZzyMan
8769ba9e82 recover changes 2026-03-23 11:09:55 +08:00
易良
d709869aae
Merge pull request #2371 from QwenLM/feat/btw-command
feat(cli): add /btw slash command for ephemeral side questions
2026-03-23 11:01:16 +08:00
yiliang114
2490a03fe4 feat(webui): unify remaining tool display labels
Refs #1367
2026-03-23 00:47:19 +08:00
yiliang114
da1cc50c0c fix(vscode-ide-companion): preserve model metadata on switch
Refs #2515
2026-03-22 14:08:40 +08:00
Nuno Salvação
d3171a3874 fix(tools): exit_plan_mode now exits correctly in YOLO mode
In YOLO mode, coreToolScheduler auto-approves tools without calling
onConfirm(), leaving wasApproved=false in ExitPlanModeToolInvocation.
execute() would then always return the rejection message.

Fix: check config.getApprovalMode() === YOLO as a fallback in execute().
When YOLO, treat as approved without downgrading to AUTO_EDIT (preserving
the user's --yolo intent for the rest of the session).

Non-interactive auto-deny (shouldAutoDeny path) is unchanged — that
behavior is intentional and correct.

Fixes #2522

Generated by Nuno Salvação <nuno.salvacao@gmail.com> & Co-Authored with: Nexo <nexo.modeling@gmail.com>
2026-03-21 17:27:58 +00:00
wenshao
13423f0676 fix(cli): harden /btw command error handling and type safety
- Add null/undefined guard in formatBtwError to avoid "null"/"undefined" strings
- Add type guard for btw property in HistoryItemDisplay to prevent crash
- Extract isBtwCommand regex to module-level constant and simplify with [/?]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:21:07 +08:00
yiliang114
b15cb05703 fix(test): use correct Dirent<Buffer> generic type in sessionService tests
The CI was failing because fs.readdirSync returns Dirent<Buffer>[], not
Dirent<string>[]. Updated all 8 type assertions to use the correct generic.

Made-with: Cursor
2026-03-21 01:32:36 +08:00
yiliang114
c1004d0e99 fix(lsp): improve C++/Java/Python language server support
Key changes:

1. Remove LspLanguageDetector — LSP is now fully config-driven via
   .lsp.json or extensions. No more auto-detected built-in presets
   that fail when the server binary is missing.

2. Add ensureDocumentOpen — send textDocument/didOpen before every
   document-level LSP request (definitions, references, hover,
   documentSymbol, implementations, prepareCallHierarchy, diagnostics,
   codeActions). This fixes the root cause of most methods returning
   empty results (Issue #2106, #1873).

3. Add retry mechanism for slow servers — when a freshly opened
   document yields empty results on non-TypeScript servers (jdtls,
   clangd, pylsp), wait 2s and retry once. This mirrors the existing
   retry logic in workspaceSymbols.

4. Handle LSP 3.17 WorkspaceSymbol format — location.range is now
   optional in normalizeSymbolResult, fixing jdtls workspace symbol
   responses that omit the range field.

5. Improve workspace symbol warmup — for non-TypeScript servers, open
   a workspace file before the first workspace/symbol request and
   retry on empty results after a warmup delay.

6. Track warmup-opened URIs — warmupTypescriptServer now returns the
   opened URI, which is registered with ensureDocumentOpen to prevent
   duplicate didOpen notifications.

Closes #2106, closes #1873

Made-with: Cursor
2026-03-21 01:27:00 +08:00
yiliang114
905f2c3f36 Merge branch 'main' into fix/pr2371-btw-complete 2026-03-21 01:10:48 +08:00
yiliang114
dff9822f9b fix(cli): improve /btw overlay UX — layout, dismiss hints, and history cleanup
- Make /btw overlay mutually exclusive with Composer (replaces input area)
- Add dismiss hints: "Press Escape to cancel" (pending) / "Press Space,
  Enter, or Escape to dismiss" (completed)
- Skip adding /btw to conversation history to avoid duplicate display
- Prioritize dialog shortcuts over btw dismiss via dialogsVisibleRef
- Add `sleep` property to terminal-capture FlowStep for async wait scenarios

Made-with: Cursor
2026-03-21 01:07:02 +08:00
yiliang114
f2db301776 fix(vscode-ide-companion): improve ACP error handling to prevent silent loading hangs
When the CLI process crashes during initialization (e.g. due to a malformed
settings.json), the extension now surfaces the error instead of hanging
indefinitely on "Preparing Qwen Code...":

- Collect stderr output from the child process for inclusion in error messages
- Race SDK initialize() against a process-exit promise so a crash rejects
  immediately rather than leaving a dangling await
- Add a 30-second safety-net timeout in App.tsx to clear the loading spinner
  when initialization stalls for any reason

Closes #2382

Made-with: Cursor
2026-03-21 00:18:36 +08:00
yiliang114
e54bc88e46 fix(vscode-ide-companion): silence secondary sidebar warning on older VS Code versions
Flip the context key logic from negative (`doesNotSupportSecondarySidebar`) to
positive (`supportsSecondarySidebar`) so that the secondary sidebar container is
only declared when the VS Code version is known to support it. This prevents the
"container 'qwen-code-secondary' does not exist" warning on older versions and
avoids accidentally relocating other extensions' views to the Explorer container.

Closes #2432
Closes #2416

Made-with: Cursor
2026-03-21 00:16:35 +08:00
DennisYu07
fe8850fe55 change hook error telemetry to log if needed 2026-03-20 20:27:45 +08:00
DennisYu07
6bbb5fc2fe remove open telemetry 2026-03-20 20:13:08 +08:00
DennisYu07
f1204268ff remove fail telemetry 2026-03-20 19:56:48 +08:00
DennisYu07
58be2b7202 add QwenLogger Telemetry 2026-03-20 19:47:13 +08:00
Dmitry Glizhinskiy
6f71819f83 fix(extensions): support non-GitHub git URLs for extension installation
Fixes extension installation from local domain git servers (GitLab, Bitbucket, etc.)
by catching errors from parseGitHubRepoForReleases and falling back to use the source URL directly.

- Add unit test for non-GitHub git URLs
2026-03-20 13:26:38 +03:00
LaZzyMan
c0df754418 Merge branch 'main' into fix/test-artifacts-and-shell-permissions 2026-03-20 18:04:44 +08:00
DennisYu07
38caa0b218
Merge pull request #2478 from QwenLM/feat/hooks-plugin
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
feat(hooks): use extension dir files instead of tmp dir files
2026-03-20 18:01:50 +08:00
LaZzyMan
dae107d60b Merge branch 'main' into fix/test-artifacts-and-shell-permissions 2026-03-20 17:58:50 +08:00
LaZzyMan
fcd31e2adf fix: prevent bogus shell permission rules in tests 2026-03-20 17:55:33 +08:00
DennisYu07
857c7fb99b Merge branch 'main' into feat/hooks-plugin 2026-03-20 17:43:30 +08:00
Mingholy
b15850b68c
Merge pull request #2535 from QwenLM/docs-update-by-joeytoday
fix: update Discord invite link to permanent URL
2026-03-20 17:41:38 +08:00