Commit graph

93 commits

Author SHA1 Message Date
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
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
mingholy.lmh
c218048551 fix: prevent sending control request when query is closed 2025-12-05 18:46:51 +08:00
tanzhenxin
3a7b1159ae feat: add usage metadata in acp session/update event 2025-12-05 15:40:49 +08:00
mingholy.lmh
322ce80e2c feat: implement SDK MCP server support and enhance control request handling
- Added new `SdkMcpController` to manage communication between CLI MCP clients and SDK MCP servers.
- Introduced `createSdkMcpServer` function for creating SDK-embedded MCP servers.
- Updated configuration options to support both external and SDK MCP servers.
- Enhanced timeout settings for various SDK operations, including MCP requests.
- Refactored existing control request handling to accommodate new SDK MCP server functionality.
- Updated tests to cover new SDK MCP server features and ensure proper integration.
2025-12-05 13:14:54 +08:00
mingholy.lmh
57b519db9a test: skip qwen-oauth e2 case in sandbox 2025-12-04 20:39:51 +08:00
mingholy.lmh
50e3a6ee0a fix: enhance 429 error handling and fix failed cases 2025-12-04 17:10:23 +08:00
mingholy.lmh
3056f8a63d feat(tests): move SDK integration tests to integration-tests to share globalSetup 2025-12-04 17:10:23 +08:00
tanzhenxin
6729980b47
skip acp integration test in sandbox env (#1141)
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 (Linux) - sandbox:docker-1 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none-1 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker-2 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none-2 (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
2025-12-04 10:28:21 +08:00
tanzhenxin
2ca36d7508
skip one flaky integration test (#1137)
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-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
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker-1 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none-1 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker-2 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none-2 (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
2025-12-03 19:40:14 +08:00
tanzhenxin
0a75d85ac9
Session-Level Conversation History Management (#1113) 2025-12-03 18:04:48 +08:00
Mingholy
c9af74816a
fix: reset authType settings (#1091)
Some checks failed
Qwen Code CI / Lint (push) Has been cancelled
Qwen Code CI / CodeQL (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:none (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:docker-1 (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:none-1 (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:docker-2 (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:none-2 (push) Has been cancelled
E2E Tests / E2E Test - macOS (push) Has been cancelled
Qwen Code CI / Test (push) Has been cancelled
Qwen Code CI / Test-1 (push) Has been cancelled
Qwen Code CI / Test-2 (push) Has been cancelled
Qwen Code CI / Test-3 (push) Has been cancelled
Qwen Code CI / Test-4 (push) Has been cancelled
Qwen Code CI / Test-5 (push) Has been cancelled
Qwen Code CI / Test-6 (push) Has been cancelled
Qwen Code CI / Test-7 (push) Has been cancelled
Qwen Code CI / Test-8 (push) Has been cancelled
Qwen Code CI / Post Coverage Comment (push) Has been cancelled
* fix: reset authType settings

* fix: failed json-output tests

* fix: sandbox exception log to stderr
2025-11-23 17:59:35 +08:00
Kdump
9e5387f159
Headless enhancement: add stream-json as input-format/output-format to support programmatically use (#926) 2025-11-21 09:26:05 +08:00
tanzhenxin
97bf48b14c
fix: skip problematic integration test (#1065)
Some checks are pending
Qwen Code CI / CodeQL (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker-2 (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 (Linux) - sandbox:docker-1 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none-1 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none-2 (push) Waiting to run
E2E Tests / E2E Test - macOS (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
2025-11-19 11:55:19 +08:00
Mingholy
d0e76c76a8
refactor(auth): save authType after successfully authenticated (#1036) 2025-11-19 11:21:46 +08:00
tanzhenxin
3ed93d5b5d
fix: integration tests (#1062) 2025-11-19 10:23:16 +08:00
pomelo-nwu
7ff07fd88c fix(web-search): handle unconfigured state and improve tests 2025-11-05 11:37:56 +08:00
tanzhenxin
4f35f7431a fix: e2e test on cloud build 2025-10-29 14:25:15 +08:00
tanzhenxin
c1164bdd7e
fix: e2e test (#905) 2025-10-29 13:58:41 +08:00
tanzhenxin
be633a80cc
📦 Release qwen-code CLI as a Standalone Bundled Package (#866) 2025-10-24 17:08:59 +08:00
tanzhenxin
eb95c131be
Sync upstream Gemini-CLI v0.8.2 (#838) 2025-10-23 09:27:04 +08:00
mingholy.lmh
14ea33063f Merge tag 'v0.3.0' into chore/sync-gemini-cli-v0.3.0 2025-09-11 16:26:56 +08:00
Zagorulko Oleg
60c136ad67
fix: resolve EditTool naming inconsistency causing agent confusion loops (#513)
* fix: resolve EditTool naming inconsistency causing agent confusion loops

* docs: restore original format for edit tool

* fix: apply prettier formatting to docs and tests

* test: update snapshots for edit tool
2025-09-09 11:33:07 +08:00
Yiheng Xu
17fd843af6
Fix E2E caused by Terminal Bench test (#529)
Some checks are pending
Qwen Code CI / Lint (GitHub Actions) (push) Waiting to run
Qwen Code CI / Lint (Javascript) (push) Waiting to run
Qwen Code CI / Lint (Shell) (push) Waiting to run
Qwen Code CI / Lint (YAML) (push) Waiting to run
Qwen Code CI / Lint (push) Blocked by required conditions
Qwen Code CI / Test (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 e2e

* fix lint
2025-09-08 10:51:14 +08:00
Yiheng Xu
010ad5ddc4
Terminal Bench Integration Test (#521)
Some checks failed
Qwen Code CI / Lint (GitHub Actions) (push) Has been cancelled
Qwen Code CI / Lint (Javascript) (push) Has been cancelled
Qwen Code CI / Lint (Shell) (push) Has been cancelled
Qwen Code CI / Lint (YAML) (push) Has been cancelled
Qwen Code CI / CodeQL (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:none (push) Has been cancelled
E2E Tests / E2E Test - macOS (push) Has been cancelled
Qwen Code CI / Lint (push) Has been cancelled
Qwen Code CI / Test (push) Has been cancelled
Qwen Code CI / Post Coverage Comment (push) Has been cancelled
* integrate terminal bench

* fix ci

* add ci

* fix ci

* fix ci

* parallel ci

* handle timeout

* fix lint

* trigger
2025-09-05 17:02:03 +08:00