- 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>
* feat: add Ctrl+Y shortcut to retry failed requests
- Add Ctrl+Y keyboard shortcut for retrying the last failed request
- Add isNetworkError() to detect transient network failures (ECONNREFUSED, ETIMEDOUT, etc.)
- Add DashScope 1305 error code to rate limit detection
- Add error hint \"Press Ctrl+Y to retry\" in error messages
- Support user-defined error codes for retry via config
- Add retryLastPrompt() hook in useGeminiStream
- Update keyboard shortcuts documentation
* feat: improve Ctrl+Y retry feature with tests, docs, and rate limit config
- Add comprehensive tests for Ctrl+Y retry shortcut in InputPrompt
- Add unit tests for retryLastPrompt in useGeminiStream hook
- Add detailed JSDoc comments for retryLastPrompt function and Ctrl+Y shortcut
- Extend isRateLimitError to support custom error codes via retryErrorCodes config
- Fix rate limit retry log variable reference (RATE_LIMIT_RETRY_OPTIONS → maxRateLimitRetries)
- Add Eclipse IDE files to .gitignore
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* refactor(ui): consolidate retry countdown as inline hint in error messages
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* feat(cli): enhance error handling with improved retry mechanism
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Modify ErrorMessage component to remove dim color from hint text
- Update useGeminiStream hook to improve retry countdown behavior with option to preserve or clear hints
- Adjust tests to match new error handling implementation
* feat: add Ctrl+Y shortcut to retry the last failed request
When a request errors out, the error message shows an inline hint
"(Press Ctrl+Y to retry.)" in secondary color. Pressing Ctrl+Y
re-submits the same prompt, commits the error text to history
(without the hint), and clears the hint from the UI.
- Add retryLastPrompt action wired to Ctrl+Y via keyBindings and InputPrompt
- Track last submitted prompt and error state in useGeminiStream refs
- Show retry hint inline with error text in ErrorMessage component,
wrapping naturally on narrow terminals while preserving hint color
- Expose retryLastPrompt through UIActionsContext
- Add keyboard shortcut entry in KeyboardShortcuts display
- Add i18n strings for hint and no-retry-available message
- Document Ctrl+Y in keyboard-shortcuts.md
* docs(configuration): Update model provider configuration document
* chore: remove YOLO mode code from core
* fix: prevent Ctrl+Y hint from overriding auto-retry countdown
When an auto-retry countdown is active (retryCountdownTimerRef is set),
handleErrorEvent should not overwrite it with the Ctrl+Y hint. The auto-retry
hint ("retrying in Xs...") and manual retry hint ("Press Ctrl+Y to retry.")
are mutually exclusive:
- Auto-retry errors (e.g., rate limits): show countdown hint
- Other errors: show Ctrl+Y hint
Also removed retryErrorCodes from ContentGeneratorConfig as it's not part
of the minimal Ctrl+Y feature scope.
* simplify: remove complex options from clearRetryCountdown
Revert clearRetryCountdown to simplest form without options parameter.
The function now just clears the timer and pending item without any
automatic history commit logic.
* fix: restore pendingRetryCountdownItem as separate state from pendingRetryErrorItem
Auto-retry countdown and manual retry hint are now independent:
- pendingRetryErrorItem: displays error message with optional hint
- pendingRetryCountdownItem: displays separate countdown line for auto-retry
This ensures both can be shown simultaneously without overriding each other.
* fix: restore RetryCountdownMessage rendering in HistoryItemDisplay
The retry_countdown type should be rendered as a separate message,
not inline in ErrorMessage. This allows auto-retry countdown and
manual retry hint to coexist properly.
* fix(cli): properly commit retry error item to history before clearing
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix(cli): remove trailing period from retry hint translations
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Remove unnecessary period from 'Press Ctrl+Y to retry' translation strings in both en.js and zh.js locales. Also update the corresponding usage in useGeminiStream hook.
* chore(sdk-java): add Eclipse project configuration files
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Add .project configuration files for client and qwencode modules to support Eclipse IDE development environment.
* feat(cli): add retry countdown hint to error message
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* Revert "chore(sdk-java): add Eclipse project configuration files"
This reverts commit da83b5e571.
---------
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Make cwd optional in listSessionsRequestSchema (defaults to process.cwd())
- Remove fork from sessionCapabilities (not supported)
Fixes -32602 error when Zed calls session/list without cwd param.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Add sessionCapabilities with fork, list, and resume capabilities
to initialize response to match Claude Agent's format.
This enables Zed ACP client to discover session management features.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Update session/list response to match Claude Agent's format:
- Change 'items' to 'sessions' array
- Add 'title' field (mapped from prompt)
- Add 'updatedAt' field (ISO format from mtime)
- Remove 'hasMore' and 'nextCursor' fields
This fixes session list display in Zed ACP client.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>