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>
- 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
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
- 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>
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>
- 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>
- 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>
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
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>
- 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>
- 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>
- 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>