Commit graph

3801 commits

Author SHA1 Message Date
DennisYu07
8bd7cf2cda add singal abort for hooks 2026-03-23 16:02:54 +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
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
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
LaZzyMan
c0df754418 Merge branch 'main' into fix/test-artifacts-and-shell-permissions 2026-03-20 18:04:44 +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
tanzhenxin
71a59fbbb0 test(vscode): add mock child to AcpConnection test setup
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>
2026-03-20 16:50:36 +08:00
tanzhenxin
3a686d5ad1 Merge remote-tracking branch 'origin/main' into refactor/task-to-agent-tool 2026-03-20 16:32:37 +08:00
DennisYu07
5a4a58c31b add hooks.json path in plugin config 2026-03-20 16:06:21 +08:00
tanzhenxin
19ed08098b refactor(core): rename task tool to agent
- 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>
2026-03-20 15:50:06 +08:00
易良
fbf5ed57d6
feat(storage): support configurable runtime output directory (#2127)
Some checks failed
Qwen Code CI / Lint (push) Failing after 12s
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
Qwen Code CI / CodeQL (push) Failing after 6s
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Failing after 5s
Qwen Code CI / Post Coverage Comment (push) Has been skipped
E2E Tests / E2E Test (Linux) - sandbox:none (push) Failing after 10m36s
E2E Tests / E2E Test - macOS (push) Has been cancelled
* 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>
2026-03-20 13:53:05 +08:00
易良
87f03cf2e9
feat(vscode-ide-companion): add image paste support (#1978)
* 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>
2026-03-20 13:47:09 +08:00
yiliang114
130d6888b4 perf(cli): memoize btw message component 2026-03-20 13:21:25 +08:00
tanzhenxin
f9b5bc5317
Merge pull request #2501 from qqqys/fix/vscode_proxy
fix(vscode-ide-companion): pass proxy configuration to CLI
2026-03-20 11:52:24 +08:00
tanzhenxin
572fa81f38
Merge pull request #2472 from QwenLM/fix/acp-connection-state-cleanup-1780
fix: clean up ACP connection state when child process exits
2026-03-20 11:51:14 +08:00
tanzhenxin
9824e395a8 refactor(core): rename read_file parameter from absolute_path to file_path
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>
2026-03-20 11:05:47 +08:00
tanzhenxin
9d6aca8efe Merge branch 'main' into refactor/task-to-agent-tool 2026-03-20 10:23:25 +08:00
tanzhenxin
602a5db119
Merge pull request #2476 from Br1an67/feat/agents-skills-path
feat: add .agents/skills as a skill provider directory
2026-03-20 09:57:21 +08:00
yiliang114
bd77eef46f Merge remote-tracking branch 'origin/main' into fix/pr2371-btw-complete
# Conflicts:
#	packages/cli/src/ui/AppContainer.tsx
#	packages/cli/src/ui/hooks/useGeminiStream.ts
#	packages/cli/src/ui/layouts/DefaultAppLayout.tsx
#	packages/cli/src/ui/types.ts
#	packages/core/src/core/client.test.ts
2026-03-20 00:55:29 +08:00
yiliang114
0a1ffd98eb feat(cli): make /btw command non-blocking with parallel execution
- 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>
2026-03-20 00:25:51 +08:00
yiliang114
d885ef710a chore(core): remove unused anthropicSseParser utility
- Delete anthropicSseParser.ts as it's no longer needed

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-20 00:25:46 +08:00
yiliang114
0a43f0ed6d feat(core): support promptId context and override in generateContent
- 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>
2026-03-20 00:25:36 +08:00
Br1an67
5aa5041dfd
feat: replace .agent with .agents as skill provider directory
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).
2026-03-19 21:51:02 +08:00
顾盼
b8dda154df
Merge pull request #2283 from QwenLM/feat/support-permission
Some checks failed
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 / Lint (push) Failing after 8s
E2E Tests / E2E Test (Linux) - sandbox:none (push) Failing after 3s
Qwen Code CI / Post Coverage Comment (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
Qwen Code CI / CodeQL (push) Failing after 4s
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Failing after 10s
E2E Tests / E2E Test - macOS (push) Has been cancelled
Feat: support permission
2026-03-19 21:07:13 +08:00
qqqys
a7dec25a50 refactor(tests): improve proxy configuration handling in QwenConnectionHandler tests 2026-03-19 20:48:18 +08:00
qqqys
3ba30a8576 fix(vsocde-ide-companion): fix proxy error 2026-03-19 20:31:26 +08:00
DennisYu07
f2c89bc3d5 add more judge for extension hooks 2026-03-19 20:27:36 +08:00
DennisYu07
4ae214d9ab add try catch 2026-03-19 20:17:56 +08:00
DennisYu07
74bb0617b7 resolve Polynomial regular expression used on uncontrolled data 2026-03-19 20:08:46 +08:00
tanzhenxin
0864b481ce
Merge pull request #2473 from kkhomej33-netizen/fix/openai-logging-modalities
fix: preserve modalities during OpenAI logging request conversion
2026-03-19 20:05:22 +08:00
DennisYu07
0a83a8ed70 merge main 2026-03-19 20:00:29 +08:00
DennisYu07
fe14e1db85 reslove comment 2026-03-19 19:54:28 +08:00
tanzhenxin
e14d08357a
Merge pull request #2495 from Br1an67/fix/tos-link
fix: update TOS link in VS Code extension README
2026-03-19 19:50:21 +08:00
LaZzyMan
b59864f554 Merge branch 'main' into feat/support-permission 2026-03-19 19:08:55 +08:00
Br1an67
c825d573ee
fix: update TOS link in VS Code extension README
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
2026-03-19 17:36:32 +08:00
DennisYu07
cdffbd9078 adapt subagent type 2026-03-19 17:27:27 +08:00
DennisYu07
6f914e4f4e merge main 2026-03-19 17:12:19 +08:00
Mingholy
7492af725b
Merge pull request #2470 from QwenLM/fix-minimax-context
fix: correct token limits for MiniMax-M2.5 and GLM models
2026-03-19 16:57:42 +08:00
DennisYu07
305d35e680 fix parse error 2026-03-19 16:26:55 +08:00
mingholy.lmh
7d52c74a33 fix: correct GLM output token limit from 128k to 16k per ref.json
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 15:03:55 +08:00
mingholy.lmh
699bf4a0a5 fix: correct MiniMax-M2.5 contextWindowSize from 1000000 to 196608
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 15:03:55 +08:00
tanzhenxin
8891f4219d refactor(core): rename TaskTool to AgentTool
Rename the Task tool to Agent tool for clearer semantics and better
alignment with industry terminology. This change includes:

- Rename TaskTool -> AgentTool, TaskParams -> AgentParams
- Rename TaskResultDisplay -> AgentResultDisplay
- Add 'Explore' built-in agent for read-only codebase exploration
- Add backward compatibility mappings for legacy tool names
- Improve Agent tool description with clearer usage guidelines
- Add case-insensitive agent name matching
- Fallback to built-in agents when subagent loading fails

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 14:55:14 +08:00
mingholy.lmh
9060663f60 refactor(export): clean up unnecessary fields and simplify data structure
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 14:33:33 +08:00
mingholy.lmh
8e221a3606 feat: optimize export data structure and UI display
- 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>
2026-03-19 14:10:41 +08:00
mingholy.lmh
a24400ccfc fix(export): correct export metadata accuracy issues
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>
2026-03-19 14:10:40 +08:00
mingholy.lmh
186103fe4e feat(export): enhance JSONL and Markdown formatters with comprehensive metadata
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 14:10:40 +08:00