Commit graph

351 commits

Author SHA1 Message Date
wenshao
e038ce9958 fix(core): only suppress ENOENT in loadPlan, rethrow other errors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 18:05:36 +08:00
wenshao
7a2f5887b9 fix(core): use optional field syntax for prePlanMode declaration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:52:27 +08:00
wenshao
b8e81c02b4 feat(core): add plan file persistence to disk
Save approved plans to ~/.qwen/plans/{sessionId}.md so they can be
referenced later in the session or reviewed outside the CLI.

Changes:
- Storage: add getPlansDir() and getPlanFilePath()
- Config: add savePlan(), loadPlan(), getPlanFilePath() methods
- ExitPlanModeTool: persist plan to disk when user approves
- Tests: 4 new Config tests, 2 new ExitPlanModeTool assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:50:01 +08:00
wenshao
c597847bc3 feat(core): add prePlanMode tracking to restore previous approval mode
When entering plan mode, Config now saves the previous approval mode
(e.g. AUTO_EDIT, YOLO) so it can be restored when exiting. Previously,
/plan execute and ExitPlanModeTool both hardcoded a return to DEFAULT,
losing the user's prior mode.

Changes:
- Config: add prePlanMode field, getPrePlanMode(), auto-track in
  setApprovalMode()
- planCommand: /plan execute restores prePlanMode instead of DEFAULT
- ExitPlanModeTool: ProceedOnce restores prePlanMode instead of DEFAULT
- Tests: 4 new Config tests, 1 new planCommand test, 1 new
  ExitPlanModeTool test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:39:13 +08:00
tanzhenxin
76d64c9464
Merge pull request #2731 from QwenLM/feat/in-session-cron-loops
feat(cron): add in-session loop scheduling with cron tools
2026-04-01 16:18:46 +08:00
tanzhenxin
2eb2f4e319
Merge pull request #2719 from QwenLM/feat/npm-extension-installation
feat(extension): Add npm registry support for extension installation
2026-04-01 16:18:17 +08:00
DennisYu07
06a0f4797d
Merge pull request #2696 from QwenLM/feat/hooks-refactor-ui-event
refactor(ui): improve hook event handling with dedicated history items
2026-04-01 15:56:17 +08:00
tanzhenxin
a29e059d2e
Merge pull request #2781 from QwenLM/feat/hooks-remove-experimental
feat(hooks): remove experimental flag and add disabled state UI
2026-04-01 15:37:34 +08:00
DennisYu07
4b05c74b02
Merge pull request #2745 from QwenLM/fix/proxy-url-compability
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: normalize proxy URLs to support addresses without protocol prefix
2026-04-01 14:30:29 +08:00
DennisYu07
9c26c7fe85 add more notes 2026-04-01 12:04:37 +08:00
DennisYu07
5221002831 remove hooks experimental and refactor hook Config 2026-04-01 11:50:23 +08:00
tanzhenxin
2c1432a23a Merge remote-tracking branch 'origin/main' into feat/npm-extension-installation 2026-03-30 19:16:08 +08:00
tanzhenxin
9a8829c5a5 merge: resolve conflict in client.ts hook condition
Keep both changes: SendMessageType.Cron skip from our branch
and hasHooksForEvent check from main.
2026-03-30 18:06:59 +08:00
DennisYu07
56492be757 fix normalize in different place 2026-03-30 16:06:31 +08:00
顾盼
cd935a5896
Merge pull request #2656 from QwenLM/fix-issue-qwen-code
fix: resolve /clear command and ESC key lag caused by hooks system
2026-03-30 15:32:42 +08:00
DennisYu07
bba3ab93b1 fix proxy normalization 2026-03-30 14:37:18 +08:00
tanzhenxin
439a1a46e2 feat(cron): make cron tools opt-in via experimental settings
Change cron/loop tools from opt-out to opt-in. Cron tools are now
disabled by default and can be enabled via:
- settings.json: { "experimental": { "cron": true } }
- Environment variable: QWEN_CODE_ENABLE_CRON=1

This ensures experimental features are explicitly enabled by users
who want to try them.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-29 02:25:28 +00:00
tanzhenxin
aa4939111c feat(cron): add in-session loop scheduling with cron tools
Add session-scoped recurring jobs that fire while you work. Jobs live
inside the current Qwen Code process and are gone when you exit.

New tools:
- cron_create: schedule a prompt to run on a cron expression
- cron_list: list active cron jobs
- cron_delete: cancel a scheduled job

Components:
- CronScheduler service for in-process job management
- cronParser utility for 5-field cron expressions
- /loop skill for natural language scheduling
- Non-interactive mode integration to keep process alive

Constraints:
- Max 50 jobs per session
- 3-day expiry for recurring jobs
- Jitter to prevent thundering herd
- No catch-up for missed fire times

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-28 14:37:29 +00:00
tanzhenxin
3a157d1fec feat(extension): add npm registry support for extension installation
- Add new npm extension installation channel via scoped packages (@scope/name)
- Implement npm.ts module with registry resolution, authentication, and download logic
- Support version pinning, dist-tags (latest, beta), and custom registries
- Handle private registry auth via NPM_TOKEN env var and .npmrc _authToken entries
- Update CLI install command with --registry flag for npm extensions
- Add comprehensive tests for npm package parsing and registry operations
- Update documentation for releasing and installing from npm registries
- Integrate npm updates into extension manager and update checking flow

This enables teams using npm for package distribution to publish Qwen Code extensions through their existing infrastructure, with full support for private registries and access control.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 20:38:35 +08:00
DennisYu07
cf0b67ef8e refactor ui for stop hook reason and systemMessage 2026-03-27 10:54:16 +08:00
LaZzyMan
dd518de5b0 fix(acp): align permission flow across clients 2026-03-26 23:25:04 +08:00
LaZzyMan
05062fd689 fix: resolve /clear command and ESC key lag caused by hooks system
- Make hook events fire-and-forget in clearCommand to avoid blocking UI
- Move context.ui.clear() before resetChat for immediate responsiveness
- Add hasHooksForEvent() fast-path check to HookSystem and Config
- Skip MessageBus round-trips in client.ts when no hooks are registered
- Add comprehensive unit tests for all changes

Fixes #2651
2026-03-25 14:01:24 +08:00
DennisYu07
8bd7cf2cda add singal abort for hooks 2026-03-23 16:02:54 +08:00
tanzhenxin
9d6aca8efe Merge branch 'main' into refactor/task-to-agent-tool 2026-03-20 10:23:25 +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
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
LaZzyMan
f9d9a985ce Merge branch 'main' into feat/support-permission 2026-03-19 11:24:30 +08:00
tanzhenxin
fe304a0c32 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-18 19:20:22 +08:00
DennisYu07
1ce8502ebf Merge branch 'main' into feat/hook_sessionstart_sessionend 2026-03-17 20:41:08 -07:00
DennisYu07
b236e4152f Merge branch 'main' into feat/hook_sessionstart_sessionend 2026-03-17 20:34:13 -07:00
tanzhenxin
080271031d
Merge pull request #2400 from QwenLM/feat/system-prompt-sdk
feat: add system prompt customization options in SDK and CLI
2026-03-18 11:29:21 +08:00
LaZzyMan
2506276ae5 fix test ci 2026-03-17 14:16:53 +08:00
tanzhenxin
edd8388b27 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-17 14:00:47 +08:00
tanzhenxin
17939baa66 feat(core): auto-detect UTF-8 BOM for PowerShell scripts on Windows
- Add needsUtf8Bom() to detect when UTF-8 BOM is needed based on file
  extension and system code page
- PowerShell 5.1 on non-UTF-8 Windows systems (e.g. GBK) requires BOM
  to read scripts correctly
- Remove default UTF8 encoding; undefined now triggers auto-detection
- Add tests for needsUtf8Bom() covering Windows/non-Windows scenarios

This ensures PowerShell scripts are written with UTF-8 BOM on systems
that need it, fixing character encoding issues for non-ASCII content.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-16 22:44:53 +08:00
LaZzyMan
d129ddc489 Merge branch 'main' into feat/support-permission 2026-03-16 11:42:37 +08:00
DragonnZhang
ee33a3c35e feat: add system prompt customization options in SDK and CLI 2026-03-16 02:57:31 +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
LaZzyMan
c01a309cda fix core tool config 2026-03-13 17:58:34 +08:00
tanzhenxin
6383b41975 fix(core): disable node-pty on older Windows builds with broken ConPTY
ConPTY on Windows builds <= 19041 has known reliability issues including
missing output and hangs. VS Code uses the same cutoff.

This fixes run_shell_command returning empty output on affected Windows
systems by falling back to spawn-based execution instead of node-pty.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 16:06:27 +08:00
LaZzyMan
7450067e37 Merge branch 'main' into feat/support-permission 2026-03-11 17:11:28 +08:00
LaZzyMan
6fee1ebeb8 fix workspace dirs 2026-03-11 15:24:08 +08:00
DennisYu07
d5d7187479 move move notification auth_success from useAuth to config to support both interactive and non-interactive 2026-03-10 20:50:03 -07:00
tanzhenxin
d7aa98a0c0 refactor(arena): move arena-bridge to context and add reactive manager tracking
- Move useArenaInProcess from AppContainer to AgentViewProvider
- Replace polling with config.onArenaManagerChange() callback
- Add success-type progress messages when agents finish tasks
- Add isSuccessStatus helper for IDLE/COMPLETED status checks
- Reset input history position when arena session starts

This improves separation of concerns and eliminates the 500ms polling
interval in favor of immediate reactive updates when the arena manager
changes.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 21:45:30 +08:00
LaZzyMan
db0e373ad7 feat test tool permissions 2026-03-10 16:30:22 +08:00
DennisYu07
98fb607ad1 merge main 2026-03-10 00:29:08 -07:00
DennisYu07
411cf08396 fix unit test 2026-03-09 01:01:35 -07:00
tanzhenxin
f9d4fa0a39 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-09 11:13:31 +08:00