Commit graph

150 commits

Author SHA1 Message Date
DennisYu07
5221002831 remove hooks experimental and refactor hook Config 2026-04-01 11:50:23 +08:00
DennisYu07
12eb0f8f8d correct hooks JSON schema 2026-03-26 14:07:36 +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
LaZzyMan
b59864f554 Merge branch 'main' into feat/support-permission 2026-03-19 19:08:55 +08:00
DennisYu07
6f914e4f4e merge main 2026-03-19 17:12:19 +08:00
LaZzyMan
f9d9a985ce Merge branch 'main' into feat/support-permission 2026-03-19 11:24:30 +08:00
DennisYu07
b236e4152f Merge branch 'main' into feat/hook_sessionstart_sessionend 2026-03-17 20:34:13 -07:00
tanzhenxin
edd8388b27 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-17 14:00:47 +08:00
LaZzyMan
d129ddc489 Merge branch 'main' into feat/support-permission 2026-03-16 11:42:37 +08:00
LaZzyMan
02ea2ed70c fix settings 2026-03-16 11:28: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
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
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
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
eff6543d05 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-13 21:16:49 +08:00
tanzhenxin
4ee94715df feat(arena): improve cancellation handling and simplify to in-process mode
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

- Track user-initiated cancellation separately from failures

- Cancel round immediately when user denies a tool call

- Add message queue to handle input during streaming

- Add info messages during Arena operations (apply, stop, cleanup)

- Disable tmux/iTerm2 backends (only in-process mode supported)

- Polish UI: green tool count, updated warning prefix

This improves the Arena UX by providing clearer feedback and

properly handling user cancellations without treating them as failures.
2026-03-12 16:57:44 +08:00
LaZzyMan
7450067e37 Merge branch 'main' into feat/support-permission 2026-03-11 17:11:28 +08:00
xwj02155382
d5eda197c2 refactor: extract HOOK_DEFINITION_ITEMS constant
Extract common hook definition items schema into a reusable constant
to avoid code duplication between UserPromptSubmit and Stop hooks.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 15:23:01 +08:00
xwj02155382
700806ce83 fix: correct hooks JSON schema type definition
The hooks array items were incorrectly typed as 'string' in the JSON
schema, causing VS Code to show type errors when users configure
HookDefinition objects. This fix adds proper schema support for complex
array item types.

- Add SettingItemDefinition interface for array item schema
- Add items schema for UserPromptSubmit and Stop hooks
- Update generate-settings-schema.ts to convert complex item types

Fixes #2246

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 15:09:49 +08:00
LaZzyMan
e793e82729 feat(permissions): add workspace directory management tab
- Add Workspace tab to PermissionsDialog with full directory management UI
  - Directory list view: initial (non-removable) dirs shown inline,
    runtime-added dirs selectable; "Add directory…" always first
  - Add directory input view: filesystem autocomplete with ↑/↓ navigation
    and Tab-to-complete; path validation (existence, type, duplicate,
    subdirectory checks)
  - Remove directory confirmation view
  - Save directly to project settings (SettingScope.Workspace), no scope
    selection step
- Add onTab/onUp/onDown props to TextInput to intercept keys before buffer
- Add removeDirectory() and isInitialDirectory() to WorkspaceContext
- Add --add-dir CLI alias for --include-directories
- Add /add-dir slash command (alias for /directory add)
- Add permissions.additionalDirectories settings field
- Add i18n keys for all workspace directory UI strings (en/zh/de/ja/pt/ru)"
2026-03-11 10:54:59 +08:00
DennisYu07
98fb607ad1 merge main 2026-03-10 00:29:08 -07:00
LaZzyMan
d32dcab5db fix: remove redundant scope field from MCP server display and add CONCAT merge strategy for mcp allowed/excluded lists 2026-03-09 21:38:42 +08:00
tanzhenxin
f9d4fa0a39 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-09 11:13:31 +08:00
DennisYu07
3458c1d68b merge main de resolve conflict 2026-03-06 16:00:51 -08:00
tanzhenxin
ca3a2be2ec Merge branch 'main' into feat/shell-pty-default-and-enhancements 2026-03-06 14:36:18 +08:00
tanzhenxin
fcebd14a90
Merge pull request #2092 from QwenLM/fix/disable-llm-loop-detection
fix(core): remove LLM-based loop detection and enable skipLoopDetection by default
2026-03-06 14:13:36 +08:00
DennisYu07
263bbaa633 Implementation Notification hook with three scenario and add test 2026-03-04 21:54:25 -08:00
tanzhenxin
b48e3caa75 feat(shell): enable PTY by default and various enhancements
### Shell & Interactive Terminal Improvements
- PTY shell is now enabled by default instead of disabled
- Improved shell output rendering, process termination, and added fallback warning
- Background commands now properly capture subprocess PIDs on non-Windows

### Coding Plan Improvements
- Simplified auth message, added /model tip, improved system info display
- Reordered model list to prioritize glm-5, kimi-k2.5, MiniMax-M2.5
- Model selection is now preserved when updating if the model still exists

### Other Changes
- Added shared symlink utility; debug logs now have latest alias
- Unknown settings warnings go to debug log instead of user-facing warnings
- Fixed subagent confirmation state detection
- Removed debug UI from AgentCreationWizard

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-05 11:28:13 +08:00
tanzhenxin
396248e296 fix(core): remove LLM-based loop detection and enable skipLoopDetection by default
The LLM-based loop detection was causing issues where the process would
stop unexpectedly. This change removes the LLM-based loop detection
feature entirely and sets skipLoopDetection to true by default to
prevent false positives from interrupting user sessions.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 23:21:04 +08:00
LaZzyMan
eeb4d85785 feat(permissions): add permission system and rename folder trust command 2026-03-04 19:24:43 +08:00
DennisYu07
7cde98e238 move enable/disable to hooksConfig 2026-03-02 23:57:12 -08:00
DennisYu07
7b0929d00c add integration test and --experimental-hooks 2026-03-02 19:05:28 -08:00
DennisYu07
74e1bf17d6 remove conflict experimental 2026-03-02 03:50:37 -08:00
DennisYu07
4b18cfe3f3 Revert "implementation 10 hooks"
This reverts commit c9126e043f.
2026-03-01 17:58:11 -08:00
DennisYu07
c9126e043f implementation 10 hooks 2026-03-01 17:50:48 -08:00
tanzhenxin
74b342623c Merge branch 'main' into feature/arena-agent-collaboration 2026-02-28 22:01:10 +08:00
DennisYu07
1ce5bfb629 resole conflict and remove hook extension definition 2026-02-27 17:58:07 -08:00
tanzhenxin
1979e2121b
Merge pull request #1952 from QwenLM/coding-plan-ui-fix
feat(auth): add automatic backup of settings.json before auth modification
2026-02-27 21:29:45 +08:00
mingholy.lmh
0c53b19a74 feat(auth): backup settings file before auth modification
- Add backupSettingsFile() utility to create .orig backup before modifying settings
- Update success message to indicate backup was created
- Sync i18n translations for all supported languages
- Update documentation to reflect the change

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-26 20:38:38 +08:00
mingholy.lmh
740f4e0949 fix: remove test code and switch-mode 2026-02-26 14:43:07 +08:00
qwen-code-ci-bot
ae6716c651 refactor: merge coder-model and qwen3.5-plus, remove vision model switching
- Merge coder-model and qwen3.5-plus into a single coder-model with vision capability
- Remove vlmSwitchMode CLI argument and experimental.vlmSwitchMode setting
- Remove useVisionAutoSwitch hook and inline image format checking into useGeminiStream
- Remove ModelSwitchDialog and related vision switch UI components
- Update all related tests to reflect the simplified model structure
- Set DEFAULT_QWEN_MODEL to coder-model

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-26 14:43:07 +08:00
DennisYu07
fdc47c4597 rename event 2026-02-22 05:30:03 -08:00
DennisYu07
43d64e26ca refactor stop hook 2026-02-22 02:20:45 -08:00
tanzhenxin
d4cfb18f79 feat(core,cli)!: Implement in-process agent backend for arenas
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Add InProcessBackend to run subagents in-process rather than via subprocess,

enabling faster initialization and better resource management for agent

collaboration arenas.

Key changes:

- Add InProcessBackend with sandboxed in-process agent execution

- Refactor agent runtime into headless vs interactive modes

- Add AsyncMessageQueue utility for agent message passing

- Update ArenaManager with backend selection (in-process vs subprocess)

- Refactor subagent types/exports; consolidate in subagents/types

- Remove deprecated agent-hooks.ts (functionality merged into runtime)

- Update task tool to support new agent lifecycle

Breaking: Subagent type exports restructured; import from subagents/types
2026-02-21 21:08:20 +08:00
tanzhenxin
6b55c8161f feat(arena): Add agent collaboration arena feature
Introduces a new Arena system for running multiple AI agents in parallel
terminal sessions with support for iTerm and Tmux backends.

Core:
- Add ArenaManager and ArenaAgentClient for orchestrating multi-agent sessions
- Add terminal backends (ITermBackend, TmuxBackend) with feature detection
- Add git worktree service for isolated agent workspaces
- Add arena event system for real-time status updates

CLI:
- Add /arena command with start, stop, status, and select subcommands
- Add Arena dialogs (Select, Start, Status, Stop)
- Add ArenaCards component for displaying parallel agent outputs
- Consolidate message components into StatusMessages and ConversationMessages
- Add MultiSelect component for agent selection

Config:
- Add arena-related settings to schema and config

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-18 10:51:35 +08:00
LaZzyMan
428901f136 fix: correct showLineNumbers default value to true
- Changed default value from false to true in settingsSchema.ts
- This aligns the schema with the actual code behavior (?? true fallback)
- Matches documentation and test expectations
- Resolves inconsistency reported in issue #1764

Fixes #1764
2026-02-12 11:42:58 +08:00
mingholy.lmh
a8a05188cb feat(coding-plan): implement Coding Plan configuration management and update prompts 2026-02-11 16:18:23 +08:00
tanzhenxin
5f8884b60c feat(settings): add settings.env field for environment variable configuration
Add support for defining environment variables in settings.json files.
These variables are loaded with the lowest priority:
1. System/process environment variables (highest)
2. .env files
3. settings.env (lowest/fallback)

This allows users to configure default environment variables in their
user or workspace settings without conflicting with existing env vars
or .env file values.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-08 09:33:31 +08:00
tanzhenxin
a4ffc6eb24 feat: promote Agent Skills from experimental to stable
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-06 13:04:08 +08:00
tanzhenxin
6324863008 Merge remote-tracking branch 'origin/main' into feat/remove-smart-edit-tool
# Conflicts:
#	packages/core/index.ts
#	packages/core/src/index.ts
2026-02-05 18:08:22 +08:00