Commit graph

116 commits

Author SHA1 Message Date
mingholy.lmh
ae8c0d3d4e refactor(settings): sequential settings migration 2026-03-02 00:12:51 +08:00
mingholy.lmh
0b9164b649 fix: rename GEMINI_CLI_INTEGRATION_TEST to QWEN_CODE_INTEGRATION_TEST
- Update integration test environment variable name
- Ensure sandbox container naming works correctly with new variable

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-27 11:38:50 +08:00
tanzhenxin
179ce68e63 fix(test): keep plan mode active during ACP integration test
The test 'blocks write tools in plan mode' was failing because the model
would attempt to exit plan mode via exit_plan_mode tool. By cancelling
switch_mode tool calls in the permission handler, we ensure plan mode
stays active throughout the test.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-26 23:10:28 +08:00
tanzhenxin
a172696b86 Merge branch 'main' into feat/support-insight-command
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-26 21:05:41 +08:00
pomelo
bec8cbc575
Merge branch 'main' into feat/terminal-capture 2026-02-25 15:26:57 +08:00
pomelo
51fc0bf3fb
Merge pull request #1812 from QwenLM/fix/issue-1806-plan-mode-enforcement
fix: enforce plan mode restrictions in ACP sessions
2026-02-25 15:20:08 +08:00
pomelo-nwu
b2b30c4c5d feat(runner): support auth_type for model configuration
- Add ModelSpec dataclass to hold model name and optional auth_type
- Update RunConfig.models to use List[ModelSpec]
- Add auth_type field to RunRecord with serialization support
- Parse models from config as string or {name, auth_type} dict
- Pass --auth-type flag to qwen command when specified

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-19 11:55:42 +08:00
mingholy.lmh
ee5e47bb5f fix: sandbox user permission in integration tests
- Allow SANDBOX_SET_UID_GID to control user identity in integration tests
- Fix project naming from gemini-cli to qwen-code
- Use random UUID in tests to avoid conflicts

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-15 11:02:32 +08:00
pomelo-nwu
997fcbfaed feat: add terminal-capture for CLI screenshot automation
- Add terminal-capture engine using node-pty + xterm.js + Playwright
- Add scenario runner with TypeScript configuration
- Add pre-built scenarios (/about, /context, /export, /auth)
- Add Cursor skills for terminal-capture and pr-review workflow
- Add motivation documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-14 21:34:42 +08:00
mingholy.lmh
82dc79629c feat: enhance session ID handling and error propagation 2026-02-13 21:41:38 +08:00
mingholy.lmh
5d939fdb83 feat: add --session-id support for CLI and SDK
- Add --session-id flag to CLI for specifying custom session ID
- Add sessionId option to SDK QueryOptions
- Implement UUID validation for session IDs
- Pass session ID from SDK to CLI via --session-id argument
- Add integration tests for session-id functionality
- Update unit tests for ProcessTransport

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-13 21:40:57 +08:00
LaZzyMan
785d0ef5b7 fix: enforce plan mode restrictions in ACP sessions (issue #1806)
- Add plan mode enforcement in Session.runTool to block write tools
- Align ACP behavior with CoreToolScheduler plan mode logic
- Add test case to verify write tools are blocked in plan mode
- Fixes #1806
2026-02-12 11:29:02 +08:00
mingholy.lmh
7311a01874 fix: sdk mcp tests 2026-02-09 11:54:20 +08:00
tanzhenxin
c71cc9ce0d fix(integration-tests): correct MCP tool name in simple-mcp-server test
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-09 10:07:00 +08:00
tanzhenxin
21e711469d fix(mcp): update OAuth client names and improve MCP commands
- Rename MCP OAuth client names from 'Gemini CLI' to 'Qwen Code'
- Update MCP add/remove/list commands with improved error handling
- Add comprehensive tests for OAuth provider
- Fix token storage test assertions
- Clean up unused i18n translation keys
- Update gemini-converter and window title references

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-08 10:46:48 +08:00
Mingholy
5c582e98c6
Merge pull request #1732 from QwenLM/mingholy/fix/sdk-release-workflow
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
Add CLI source selection for SDK releases and fix subagent output handler
2026-02-06 13:01:05 +08:00
Mingholy
d90b642564
Merge pull request #1733 from QwenLM/mingholy/test/fix-acp-tests
Some checks are pending
Qwen Code CI / CodeQL (push) Waiting to run
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
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: use openai model instead of index=0 in acp integration test
2026-02-05 22:04:51 +08:00
mingholy.lmh
972103e795 fix: use openai model instead of index=0 in acp integration test
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-05 21:17:07 +08:00
mingholy.lmh
1e05359881 ci(sdk-release): add CLI source selection for SDK releases
- Replace cli_ref input with cli_source choice (build_from_source or npm_latest)
- Add support for bundling latest stable CLI from npm
- Add bundle-cli-from-npm.js script for npm-based CLI bundling
- Fix property naming in nonInteractiveCli.ts (outputUpdateHandler)
- Improve integration tests for subagents
- Skip creating issue on failure during dry-run mode

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-05 20:57:01 +08:00
tanzhenxin
8434b89711
Merge pull request #1682 from QwenLM/fix/vscode-ide-compaion-ui-show-bugs
fix(vscode-ide-companion): Fix UI display issues with server-side timestamp and file path extraction
2026-02-05 20:17:30 +08:00
tanzhenxin
a31699ed73
Merge branch 'main' into mingholy/fix/acp-model-list 2026-02-05 19:01:17 +08:00
mingholy.lmh
06b37bd6bf fix(acp): add authMethods in set_model response errors 2026-02-01 21:20:20 +08:00
tanzhenxin
831d74dbfe feat: Preserve UTF-8 BOM when editing files (Fix #1672)
- Add FileEncoding constants (UTF8, UTF8_BOM)
- Add detectFileBOM() to detect existing file encoding
- Modify writeTextFile() to support BOM option
- Add defaultFileEncoding configuration option
- Preserve BOM when editing existing files
- Use configured encoding for new files
- Add comprehensive tests (unit, integration, e2e)
- Update documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-01 10:32:20 +08:00
yiliang114
9830c70061 feat(vscode-ide-companion): 支持使用 server-side timestamp 进行消息排序
- 在 SessionUpdateMeta 中添加 timestamp 字段
- 为 UserMessageChunkUpdate 和 ToolCallUpdate 添加 _meta 字段
- 在 QwenAgentManager 中使用 server timestamp 而非客户端时间
- 在 QwenSessionUpdateHandler 中解析并传递 tool call timestamp
- 在 useToolCalls 中改进 timestamp 解析逻辑
- 修正 App.tsx 中 timestamp 处理,使用 nullish-coalescing operator
- 为 ToolCallUpdateData 和 ToolCallUpdate 类型添加 timestamp 和 _meta

feat(integration-tests): add file location extraction for tool calls

feat(webui): enhance ReadToolCall component with content preview and expand/collapse

refactor(webui): simplify SaveMemoryToolCall component UI

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-01 00:22:29 +08:00
pomelo-nwu
2259943f85 feat: update export html 2026-01-29 13:27:18 +08:00
pomelo-nwu
021680cd70 feat: add html template 2026-01-28 19:56:20 +08:00
tanzhenxin
acf5824a65 fix: resolve worktree paths and load keep_worktree from config
- Resolve worktree_dir to absolute path before using as cwd and QWEN_CODE_ROOT
- Load keep_worktree option from JSON config in load_config()

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 17:25:29 +08:00
tanzhenxin
3f16948225 feat: remove npm install/build and add keep_worktree option
- Remove npm install and npm run build from worktree initialization
- Remove INITIALIZING status enum and related code
- Add keep_worktree config option (default: false)
- When keep_worktree is true, worktree is preserved for debugging
- Renumber execution steps after removing initialize step

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 16:43:50 +08:00
tanzhenxin
0c1848896a Revert: use text output format instead of JSON
- Remove --output-format json from CLI commands
- Change output filenames from output-{N}.json back to stdout-{N}.txt
- Keep outputs in outputs/ subdirectory for clean structure

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 15:47:14 +08:00
tanzhenxin
09d4627a3d feat: move output files to outputs/ subdirectory for cleaner structure
- Move output-{N}.json and stderr-{N}.txt to outputs/ subdirectory
- Fix typo in toy-config.json results_file path (rest-run -> test-run)
- Add --output-format json to CLI commands
- Update file extensions from .txt to .json for stdout captures

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 15:29:11 +08:00
tanzhenxin
f48eec9a02 feat: add git diff capture and session log collection to concurrent runner
- Add git diff capture after each run, saved as diff.patch
- Add session log collection from ~/.qwen/projects/{id}/chats/
- Store session logs in outputs/{run_id}/chats/ with original filename
- Add session_id field to track chat recording UUID
- Modify cwd in session logs to actual runner working directory
- Remove stdout_file/stderr_file from top-level, keep only in prompt_results
- Rename logs folder to openai-logs
- Add File Writer task example for testing file creation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 14:57:15 +08:00
tanzhenxin
66259aca29 feat: add git branch support for worktree creation
Add optional branch configuration to specify which git branch to use
for worktree creation.

Features:
- New branch config option to specify base branch (e.g., main, develop)
- Each worktree creates a unique branch based on the specified branch
  (format: branch-run-id)
- If branch is not specified, uses the repository default branch
- Falls back gracefully when branch already exists

Changes:
- Add branch field to RunConfig dataclass
- Update GitWorktreeManager.create() to accept branch parameter
- Create unique branches for each worktree to avoid conflicts
- Update load_config() to parse branch from config
- Update config.example.json with branch option
- Update README.md documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 12:36:23 +08:00
tanzhenxin
47a733362e feat: add sequential prompt execution and auto git initialization
Enhance the concurrent runner with two key features:

1. Sequential Prompt Execution:
   - Run multiple prompts sequentially instead of joining them
   - Use --continue flag for prompts 2+ to pick up chat history
   - Generate separate output files per prompt (stdout-1.txt, stdout-2.txt, etc.)
   - Stop execution if any prompt fails
   - Track per-prompt results in results.json

2. Auto Git Initialization:
   - Automatically initialize git repo if source is not a git repository
   - Run git init → git add . → git commit automatically
   - Improves UX - users can point runner at any directory

Changes:
- Add PromptResult dataclass for per-prompt tracking
- Modify RunRecord to include prompt_results list
- Update QwenRunner.run() to execute prompts sequentially
- Add GitWorktreeManager.ensure_git_repo() method
- Update _build_command() to support --continue flag

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 12:27:10 +08:00
tanzhenxin
4ac3df1b63 feat: add concurrent runner for batch CLI execution
Add a Python-based concurrent runner that executes multiple Qwen CLI tasks
across different models in parallel using isolated git worktrees.

Features:
- Execute N tasks × M models concurrently with configurable concurrency
- Create isolated git worktrees for each run under ~/.qwen/worktrees
- Real-time progress display with Rich library
- Capture stdout, stderr, and OpenAI API logs per run
- Atomic JSON tracking of all runs with status and metadata
- Automatic cleanup of worktrees after each run

Structure:
- runner.py: Main implementation with asyncio
- requirements.txt: Python dependencies
- README.md: Documentation and usage
- config.example.json: Configuration template
- examples/: Toy example with sample config and project

Usage:
  python runner.py config.json

Each run creates an isolated output directory:
  outputs/{run_id}/
    ├── stdout.txt
    ├── stderr.txt
    └── logs/openai-*.json

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 12:08:56 +08:00
mingholy.lmh
b05de7a187 test: improve sdk integration tests 2026-01-27 17:10:36 +08:00
mingholy.lmh
f578ff07a2 fix: cli input stream handling and error management, improve e2e and unit tests 2026-01-23 13:56:38 +08:00
tanzhenxin
cf140b1b9d update acp-integration.test.ts to add session/set_model command 2026-01-17 10:59:46 +08:00
mingholy.lmh
50bf65b10b test: skip flaky & ambigous sdk e2e test case 2026-01-13 20:04:19 +08:00
顾盼
6f39ae120c
Merge pull request #1355 from QwenLM/feat/stable-acp-flag
feat: graduate `--experimental-acp` to stable `--acp` flag
2026-01-06 17:51:43 +08:00
mingholy.lmh
8c109be48c refactor: unified allow list of supported commands in ACP or non-interactive mode 2025-12-26 17:55:03 +08:00
LaZzyMan
fe7ff5b148 feat: stable-acp-flag 2025-12-26 17:09:16 +08:00
tanzhenxin
7233d37bd1 fix one flaky integration test 2025-12-26 09:20:24 +08:00
tanzhenxin
27e7438b75 fix one flaky integration test 2025-12-25 16:08:06 +08:00
tanzhenxin
b64d636280 anthropic provider support follow-up 2025-12-25 15:24:42 +08:00
tanzhenxin
8fd7490d8f remove one flaky integration test 2025-12-17 09:27:25 +08:00
tanzhenxin
b9a2cc7bdf Add chat recording toggle (CLI + settings) and disable recording in tests 2025-12-15 13:48:38 +08:00
tanzhenxin
efbf50554d Merge branch 'main' into feat/acp-usage-metadata 2025-12-08 10:27:38 +08:00
mingholy.lmh
8b5b8d2b90 test: skip unstable e2e test 2025-12-06 18:41:19 +08:00
mingholy.lmh
22943b888d test: clean up integration test by removing unnecessary console logs 2025-12-05 22:11:27 +08:00
mingholy.lmh
96d458fa8c chore: rename @qwen-code/sdk-typescript to @qwen-code/sdk 2025-12-05 21:47:26 +08:00