- 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>
This ensures the test has a properly initialized mock child process,
fixing potential test failures during the task-to-agent-tool refactor.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Update tool name aliases to map 'task' to 'agent' as legacy alias
- Add proper 'agent' tool name aliases (Agent, AgentTool)
- Update canonical-to-rule display mapping from 'task' to 'Agent'
- Update tests to expect 'agent' instead of 'task'
- Fix debug log message from [TaskTool] to [Agent]
This completes the tool renaming from "task" to "agent" for clarity,
as "agent" better describes the tool's purpose of delegating to
subagents.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* feat(storage): support configurable runtime output directory (#2014)
Add `advanced.runtimeOutputDir` setting and `QWEN_RUNTIME_DIR` env var
to redirect runtime output (temp files, debug logs, session data, todos,
insights) to a custom directory while keeping config files at ~/.qwen.
- Introduce `Storage.setRuntimeBaseDir()` / `getRuntimeBaseDir()` with
tilde expansion and relative path resolution
- Add `AsyncLocalStorage`-based `runWithRuntimeBaseDir()` for concurrent
session isolation in ACP integration
- Update all runtime path methods to use `getRuntimeBaseDir()` instead
of `getGlobalQwenDir()` (temp, debug, ide, projects, history dirs)
- Config paths (settings, oauth, installation_id, etc.) remain pinned
to `~/.qwen` regardless of runtime dir configuration
- Add comprehensive tests covering path resolution, env var priority,
async context isolation, and config path stability
* fix(core/storage): 支持 Windows 风格波浪号路径
扩展 setRuntimeBaseDir 以支持 Windows 风格的波浪号路径 (~\),
使用统一的路径分割逻辑处理 Unix 和 Windows 风格的路径分隔符
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix(core/debugLogger): runtime base dir 变更时创建新 debug 目录
添加 ensuredDebugDirPath 追踪变量,当 runtime base dir 发生变更时,
确保在新的目录下创建 debug 子目录
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* feat(cli/acp): 支持 ACP runtime output dir 配置
新增 runWithAcpRuntimeOutputDir 辅助函数,在 ACP Agent 的
loadSession 和 listSessions 操作中应用配置的 runtimeOutputDir
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* docs(vscode-ide-companion/acpConnection): 补充 this 别名的使用说明
为 self = this 的用法添加解释性注释,说明在嵌套回调中需要使用 this
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* feat(cli): add runtime output directory configuration support
* fix(core): update test to use getUserSkillsDirs method
Update storage.test.ts to call getUserSkillsDirs() instead of the
non-existent getUserSkillsDir() method. The method was renamed to
return an array of skill directories.
* fix(core/todoWrite): use path.join for cross-platform path assertion in test
Replace hardcoded forward-slash path `.qwen/todos/` with `path.join('.qwen', 'todos')` to fix Windows CI failure where paths use backslashes.
Made-with: Cursor
---------
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* feat(vscode-ide-companion): add image paste support
- Add clipboard image paste functionality with drag-and-drop support
- Implement image preview component with removal capability
- Support multimodal content in ACP session manager for text and images
- Save pasted images to temporary .gemini-clipboard directory
- Add image attachment display in user messages
- Update CSP to allow data: URIs for inline image display
- Add comprehensive image utilities with size validation (max 10MB)
- Include tests for image processing utilities
* refactor: simplify VS Code paste image implementation
- Remove dead code and redundant error handling
- Extract common isAuthError() helper function
- Simplify SessionMessageHandler methods (80% reduction)
- Change temp directory from .gemini-clipboard to clipboard (aligned with CLI)
- Keep multimodal image sending format (type: image + base64)
Stats:
- 6 files changed
- 367 insertions (+)
- 1176 deletions (-)
* refactor: align paste image handling
* chore: trim paste image diff
* refactor(vscode-ide-companion): remove unused attachments logic
- Remove unused ImageAttachment type imports
- Remove attachments field from TextMessage interface
- Remove attachments from message data sent to WebView
- Clean up debug console.log statements
- Simplify SessionMessageHandler handleSendMessage method
This removes dead code from the previous image paste implementation
that was no longer needed after switching to @path reference approach.
* refactor(vscode-ide-companion/webview): extract image handling into dedicated hooks and utils
- extract ImagePreview and ImageMessageRenderer components from App.tsx
- create useImageAttachments hook for managing image attachments
- create useImageResolution hook for image path resolution
- add imageAttachmentHandler for saving images to temp files
- add imageMessageUtils for message expansion and resolution
- add imagePathResolver for resolving image paths in webview
- integrate image resolution in useWebViewMessages
- extract shouldSendMessage utility from useMessageSubmit
- add getLocalResourceRoots in PanelManager for resource access
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix: harden vscode image handling and webview hosts
* fix: remove this alias in acp connection
* feat: add path escaping utility functions and tests
* feat: add support for image attachments and improve prompt handling
* refactor(webview): Optimize editing mode switching function
* refactor(vscode-ide-companion): move path escaping utilities to local module
- Move escapePath and unescapePath functions from qwen-code-core to local utils
- Add pathEscaping.ts with shell special characters handling
- Update imports in imageFormats.ts, imageAttachmentHandler.ts, and imageMessageUtils.ts
- Add unit tests for path escaping round-trip and browser bundle verification
- Fix browser bundling issue by avoiding node-only module dependencies in webview
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* refactor: consolidate image handling logic across vscode-ide-companion and webui
- Merge分散的 image hooks (useImageAttachments, useImageResolution, usePasteHandler) into unified useImage hook
- Replace image utils (imageMessageUtils, imagePathResolver, imageUtils) with imageHandler and imageSupport
- Remove clipboard image storage from core package
- Consolidate webui image components into ImageComponents.tsx
- Update imports and tests to reflect new structure
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* chore: drop unrelated core tool changes
* test: fix webview provider mocks and drop unrelated core diffs
* fix(cli): resolve original prompt through standard path in no_command case
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
---------
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This unifies the parameter naming convention across file-related tools
(edit, write_file, read_file) to consistently use file_path.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add btwItem state management independent from pendingItem
- Add cancelBtw functionality to abort in-flight BTW API calls
- Allow /btw commands to execute concurrently with main responses
- Add isBtwCommand utility function
- Update BtwMessage UI with cleaner styling (remove spinner)
- Add tests for concurrent /btw execution scenarios
- Update layouts to render BTW messages in fixed bottom area
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Use promptIdContext for stateless requests
- Add promptIdOverride parameter to generateContent method
- Prefer explicit override over context, context over lastPromptId
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Replace `.agent` with `.agents` (plural) as the standard skill provider
directory, following the cross-tool convention (agentskills/agentskills#15).
SKILL_PROVIDER_CONFIG_DIRS is now [".qwen", ".agents"]. Precedence order:
.qwen > .agents (first match wins in deduplication).
The link pointed to a non-existent path (docs/tos-privacy.md) resulting
in a 404. Updated to the correct docs site URL matching the one already
used in AuthDialog.tsx.
Closes#1066
- Simplify export data by removing filesRead stat, keep only written files count and paths
- Restore lines-related statistics (linesAdded and linesRemoved)
- Update HTML display to show only file operation stats instead of total files count
- Change 'Written' label to 'Files modified'
- Remove distinction between requestId and sessionId, always display sessionId
- Remove Session ID and Export Time from Header (already shown in MetadataSidebar)
- Display Project field with raw value and support multiline display
- Fix filesWritten calculation to count unique files instead of operations
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Fix four accuracy bugs in export metadata/sidebar feature:
1. File read counting: Now properly counts read_file operations by checking
functionResponse.name and args.absolute_path, instead of relying on
resultDisplay which returns string for reads.
2. Unique file tracking: Uses full file path from args.file_path or
args.absolute_path instead of basename-only fileName, preventing
collision between same-named files in different directories.
3. TaskTool token aggregation: Includes tokens from TaskTool executionSummary
in total token count, fixing under-reporting when subagents are used.
4. Context window display: Removes hardcoded '128k' fallback in HTML sidebar,
now only displays context usage when contextWindowSize is actually defined.
Also fixes lint errors (Array<T> type annotations) and applies formatting.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>