Commit graph

4838 commits

Author SHA1 Message Date
tanzhenxin
18f9e5ac34 fix: update colorizeCode calls to use new parameter order
The colorizeCode function signature was changed to have tabWidth as the
last parameter with a default value. Update all call sites to match.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 20:12:58 +08:00
LaZzyMan
eeb4d85785 feat(permissions): add permission system and rename folder trust command 2026-03-04 19:24:43 +08:00
胡玮文
fc6d640b0a feat(export-html): implement openTempFile with modal viewer for tool call results 2026-03-04 19:17:12 +08:00
zy6p
05f22247de refactor(cli): reuse normalizeContent for markdown frontmatter parsing 2026-03-04 17:34:26 +08:00
Drew Duncan
0cede7bc5e style: format streamingToolCallParser.test.ts (prettier) 2026-03-04 01:08:52 -08:00
Drew Duncan
d98ffd0b00 feat: check model modalities before processing media files 2026-03-04 01:00:39 -08:00
zy6p
0c155768df fix(cli): keep AGENTS.md in default context file set 2026-03-04 16:22:18 +08:00
LaZzyMan
109b3d41ab fix: reduce redundant file I/O and fix BOM preservation for non-UTF-8 encodings
- Extract isUtf8CompatibleEncoding to iconvHelper.ts, removing duplicate
  definitions in fileUtils.ts and fileSystemService.ts
- Add readFileWithEncodingInfo() returning content + encoding + bom in a
  single I/O pass; update edit.ts and write-file.ts to use it instead of
  separate readTextFile/detectFileEncoding/detectFileBOM calls
- Add readTextFileWithInfo() to FileSystemService interface; implement in
  StandardFileSystemService and AcpFileSystemService (delegates to fallback)
- Fix FileReadResult.bom to be true for all Unicode BOM variants (UTF-8/
  16/32), not just UTF-8; add getBOMBytesForEncoding() and update
  writeTextFile to re-prepend the correct BOM bytes on write-back so
  UTF-16/32 BOM files are no longer silently corrupted
- Add tests for readFileWithEncodingInfo, readTextFileWithInfo, and
  UTF-16LE BOM write-back preservation
2026-03-04 16:03:17 +08:00
zy6p
b3142afaaa fix(cli): parse markdown frontmatter with CRLF and BOM 2026-03-04 16:03:14 +08:00
lgzzzz
2819c7d887 feat: add tabWidth support for code highlighting and replace tabs with spaces in CodeColorizer
(cherry picked from commit 2849f907f68022ed2879216a764668878a0bb282)
2026-03-04 15:45:49 +08:00
DennisYu07
f0cc28f80f implementation SessionStart and SessionEnd hook 2026-03-03 23:39:57 -08:00
LaZzyMan
a5eb1733fa fix: preserve original encoding when reading/writing non-UTF-8 files
Fixes #2069

- Add iconv-lite dependency for non-UTF-8 encoding support
- Add iconvHelper.ts as a CJS/ESM compatibility wrapper
- Update readFileWithEncoding() to detect and handle GBK/Big5/Shift_JIS
  using BOM detection -> UTF-8 validation -> chardet -> iconv-lite fallback
- Add detectFileEncoding() to identify file encoding before writes
- Update writeTextFile() to accept encoding option and encode with iconv-lite
- Update WriteFileTool and EditTool to detect and preserve original encoding
- Add tests for GBK read/write, detectFileEncoding, and encoding option
2026-03-04 14:52:46 +08:00
Drew Duncan
e2ca264874 Merge main to get modalityDefaults support 2026-03-03 20:30:50 -08:00
DennisYu07
3706f37742 add tip for installation scripts 2026-03-03 06:22:01 -08:00
tanzhenxin
0c8251fd7f Merge branch 'main' into feature/arena-agent-collaboration 2026-03-03 21:34:16 +08:00
yiliang114
f774f14c79 fix(ide): correct HTTP connection order and lock file matching logic
- Always try localhost first in HTTP connection, then fallback to
  host.docker.internal when in container environment
- Return undefined when scanned lock files do not match current workspace
  instead of returning the first config

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 21:14:47 +08:00
tanzhenxin
9d8921db5f
Merge pull request #2060 from QwenLM/fix/dashscope-subdomain-url-pattern
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(dashscope): support subdomain URL patterns for DashScope provider detection
2026-03-03 20:47:20 +08:00
tanzhenxin
dd45fa7c9c fix(logging): pass responseId to _logApiError instead of undefined
Updated _logApiError calls to pass the actual responseId from the response
object rather than undefined. This improves error logging by including the
response identifier for better traceability.

Also updated other _logApiError calls to use empty string as fallback for
type consistency.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 18:37:21 +08:00
tanzhenxin
fc793d6545 fix(dashscope): support subdomain URL patterns for DashScope provider detection
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 18:23:29 +08:00
Mingholy
aec082d9ca
Merge pull request #2059 from QwenLM/mingholy/fix/acp-config-options-followup
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(acp): add session/set_config_option method to enable config option updates from Zed UI
2026-03-03 17:45:07 +08:00
mingholy.lmh
b8eccc4a4f Fix failing tests in @packages/cli/src/gemini.test.tsx
- Add missing config methods: getUsageStatisticsEnabled, getSessionId, getOutputFormat
- Fix stdin TTY setting for stream-json mode to ensure correct code path execution
- Fix duplicate key definition issue

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 17:37:16 +08:00
mingholy.lmh
33d65af79b fix(acp): add session/set_config_option method for mode and model configuration
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 17:16:01 +08:00
yiliang114
755f3264c8 fix(test): correct FileHandle type in mock implementation
Add FileHandle type import and fix the mock function parameter type
to match fs.promises.readFile signature (PathLike | FileHandle).
2026-03-03 17:00:12 +08:00
yiliang114
748f235e2c fix(ide): add fallback host and lock directory scan for Docker environments
- Retry HTTP connection with 127.0.0.1 when host.docker.internal fails
- Scan IDE lock directory when env var and legacy config are unavailable
- Handle code-server scenario where extension runs inside container

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 16:26:06 +08:00
DennisYu07
7cde98e238 move enable/disable to hooksConfig 2026-03-02 23:57:12 -08:00
DennisYu07
4a44eb7a17 add more integration test for hooks 2026-03-02 23:32:10 -08:00
yiliang114
da059c804e refactor(ide): remove cloud IDE environment detection and simplify connection logic
- Remove isCloudIdeRuntime, getCloudIdeEnvironmentLabels functions
- Remove DEVCONTAINER detection in detect-ide
- Simplify ideCommand by removing cloud IDE special handling
- Refactor getIdeServerHost to use dns.promises.lookup
- Use single promise cache for IDE server host resolution

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 14:50:50 +08:00
LaZzyMan
b7ba1b9336 fix ci test 2026-03-03 14:32:22 +08:00
LaZzyMan
8c62435a9a fix: handle symlinks during extension installation
When installing extensions from GitHub repos containing symlinks (e.g.
symlinks pointing to directories), the copy operation fails with
ENOTSUP: operation not supported on socket, copyfile.

Root cause: git clone without core.symlinks=true creates text files
instead of real symlinks on some platforms, and fs.promises.cp cannot
copy these entries properly.

Fix applied at two layers:
1. git clone: add -c core.symlinks=true to preserve symlinks
2. copyExtension: add dereference:true to follow symlinks and copy
   actual content, with a filter to skip non-regular files
3. gemini-converter copyDirectory: resolve symlinks via realpathSync
   and copy target content
4. claude-converter collectResources: skip non-regular files

Fixes #2050
2026-03-03 14:09:45 +08:00
yiliang114
bed4419cb5 Merge branch 'main' into fix/docker-ide-host-check 2026-03-03 13:19:29 +08:00
yiliang114
5222ebc96c chore(deps):update the peer dependency configuration in the package-lock.json 2026-03-03 13:19:23 +08:00
DennisYu07
423cc85265 remove useless type 2026-03-02 19:30:24 -08:00
易良
f027fdf621
Merge branch 'main' into feat/add-vscode-settings-json-schema 2026-03-03 11:21:57 +08:00
DennisYu07
7b0929d00c add integration test and --experimental-hooks 2026-03-02 19:05:28 -08:00
tanzhenxin
b749e80325 chore: fix build errors 2026-03-02 23:30:19 +08:00
tanzhenxin
1a718b7cf5 fix(core): Handle Windows EPERM errors and cross-platform paths in arena
Add retry logic with exponential backoff for file renames that fail with
EPERM/EACCES on Windows during concurrent operations. Fix test to use
path.join() for cross-platform compatibility.

This improves reliability of arena agent collaboration on Windows.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 23:20:18 +08:00
tanzhenxin
0c5deee263 feat(arena): Add comprehensive telemetry for arena sessions
- Add arena_session_started, arena_agent_completed, arena_session_ended events
- Implement ArenaManager telemetry hooks with lifecycle tracking and metrics
- Update AgentStatistics to support API-provided totalTokenCount and remove estimatedCost
- Pass agent session IDs for telemetry correlation in PTY mode

This enables detailed observability into arena performance, agent
completion rates, and model comparison outcomes.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 23:12:33 +08:00
tanzhenxin
407a66c959
Merge pull request #2005 from zhangxy-zju/feat/strengthen-output-language-template
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
feat(i18n): strengthen output-language.md template to enforce language compliance
2026-03-02 23:07:18 +08:00
tanzhenxin
a119adb6bd Merge branch 'main' into feature/arena-agent-collaboration 2026-03-02 22:24:38 +08:00
DennisYu07
981d1aed3e resolve comment 2026-03-02 06:12:19 -08:00
DennisYu07
e4e21bb6b7 resolve comment 2026-03-02 06:11:11 -08:00
DennisYu07
3bf30d9684 add ut 2026-03-02 06:08:21 -08:00
tanzhenxin
1a6bd0b573
Merge pull request #2030 from QwenLM/feat/improve-auth-dialog-ux
feat(cli): improve auth dialog UX with clearer three-option layout
2026-03-02 22:07:58 +08:00
tanzhenxin
2a7a74c9d4 feat(auth): update coding plan description to reflect all available models
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 21:51:47 +08:00
Mingholy
7679910f26 fix(cli): ignore stream-json input format in TTY mode to prevent hanging
- Force TEXT input format in TTY mode instead of allowing stream-json
  which would cause the process to hang when runNonInteractiveStreamJson
  is called without proper stdin data.
- Always initialize app regardless of input format to ensure proper setup.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 21:23:59 +08:00
tanzhenxin
fa5bd26b68 fix(auth): validate Coding Plan API key prefix for China region
- Add validation to check API key starts with "sk-sp-" for China region
- Add Chinese translation for the validation error message
- Only apply prefix validation when region is aliyun.com (China)

This prevents users from submitting invalid API keys for the China region, providing immediate feedback with a localized error message.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 21:19:41 +08:00
tanzhenxin
f770be495f
Merge pull request #2021 from sundapeng/fix/truncated-tool-call-protection
fix: detect and protect against truncated tool call output
2026-03-02 20:59:36 +08:00
xieyonn
6867b43be3
feat(cli): change temporary filename prefix to qwen-edit- 2026-03-02 20:01:07 +08:00
DennisYu07
74e1bf17d6 remove conflict experimental 2026-03-02 03:50:37 -08:00
tanzhenxin
112318d092 Merge branch 'main' into feat/improve-auth-dialog-ux 2026-03-02 19:16:45 +08:00