- 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>
- 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
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.
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.
- 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>
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>
- 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>
- 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
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>
- 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>
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
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
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
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#2432Closes#2416
Made-with: Cursor
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