Commit graph

2317 commits

Author SHA1 Message Date
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
tanzhenxin
0c8251fd7f Merge branch 'main' into feature/arena-agent-collaboration 2026-03-03 21:34:16 +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
DennisYu07
7cde98e238 move enable/disable to hooksConfig 2026-03-02 23:57:12 -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
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
e4e21bb6b7 resolve comment 2026-03-02 06:11:11 -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
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
易良
c353fbbfa3
feat(cli): add Ctrl+Y shortcut to retry failed requests (#2011)
* 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>
2026-03-02 17:59:18 +08:00
tanzhenxin
6fdd715458
Merge pull request #2017 from QwenLM/mingholy/fix/acp-config-options
Fix ACP protocol compatibility issues with Zed editor
2026-03-02 17:51:38 +08:00
tanzhenxin
6a617f5248
Merge pull request #1982 from QwenLM/fix/modality-defaults-pdf-error
fix: add modality defaults to prevent API errors when reading PDFs and other media
2026-03-02 17:42:17 +08:00
mingholy.lmh
43d728e8cc fix: revert removed schema fileds 2026-03-02 17:22:20 +08:00
mingholy.lmh
9c426a7961 fix(acp): fix session/list and remove fork capability
- 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>
2026-03-02 17:22:19 +08:00
mingholy.lmh
a08bc1bbf3 fix(acp): add sessionCapabilities to initialize response
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>
2026-03-02 17:22:19 +08:00
mingholy.lmh
c7c2ae217b fix(acp): align session/list response format with Claude Agent
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>
2026-03-02 17:22:18 +08:00
mingholy.lmh
e5bdd5b635 fix(acp): add modes and configOptions to session/new response
Add missing 'modes' and 'configOptions' fields to NewSessionResponse
to enable mode switching (plan/yolo/auto-edit) in Zed ACP client.

- Update schema.ts: add configOptionSchema and extend newSessionResponseSchema
- Update acpAgent.ts: add buildModesData() and buildConfigOptions() helpers

Fixes ACP mode control issue where Zed couldn't switch approval modes.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 17:22:18 +08:00
tanzhenxin
74f5b76754
Merge pull request #1993 from zhangxy-zju/fix/subagent-output-language
fix(subagent): append output-language.md to subagent system prompt and prioritize project-level settings
2026-03-02 17:08:52 +08:00
tanzhenxin
4c70374640 Merge branch 'fix/reduce-streaming-log-output' into feature/arena-agent-collaboration 2026-03-02 15:44:45 +08:00
mingholy.lmh
d38077423d refactor: use pre-defined utils 2026-03-02 12:38:26 +08:00
DennisYu07
4b18cfe3f3 Revert "implementation 10 hooks"
This reverts commit c9126e043f.
2026-03-01 17:58:11 -08:00
DennisYu07
c9126e043f implementation 10 hooks 2026-03-01 17:50:48 -08:00
mingholy.lmh
ae8c0d3d4e refactor(settings): sequential settings migration 2026-03-02 00:12:51 +08:00
tanzhenxin
e04479f6a1 feat(auth): improve Qwen OAuth quota error messaging
Update error handling to display user-friendly quota exceeded messages with links to Alibaba Cloud Coding Plan upgrade options.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 16:31:49 +08:00
tanzhenxin
d3cdad5100 feat(cli): improve auth dialog UX with clearer three-option layout
- Replace nested API-KEY submenu with flat three-option layout
- Add descriptive labels for each authentication method:
  - Qwen OAuth: Free, up to 1,000 requests/day
  - Alibaba Cloud Coding Plan: Paid, multiple model providers
  - API Key: Bring your own API key
- Simplify region selection for Coding Plan (China vs Global)
- Use DescriptiveRadioButtonSelect for better visual hierarchy
- Add itemGap prop to BaseSelectionList for spacing
- Update i18n strings in en.js, zh.js, and ru.js
- Simplify custom API key configuration info view
- Clean up unused region-specific strings

Closes #2016

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 15:22:35 +08:00
tanzhenxin
8d3ab4894a chore: bump version to 0.11.1
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 10:51:30 +08:00
tanzhenxin
74b342623c Merge branch 'main' into feature/arena-agent-collaboration 2026-02-28 22:01:10 +08:00
tanzhenxin
8727c56a30 test(cli): fix ModelDialog test by removing rigid help text assertion
- Removed exact match assertion for help text that changed in UI
- Test now only verifies the dialog title renders correctly

The help text changed from 'Enter to select · Esc to close' to
'Enter to select, ↑↓ to navigate, Esc to close', causing the test
to fail unnecessarily.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 19:36:53 +08:00
tanzhenxin
1b7d153a4c feat(cli): Increase /insight feature exposure via weighted tips
- Add weighted tip system to make certain tips appear more frequently
- Set /insight tip to weight 3 (3x more likely than regular tips)
- Add i18n translations for the new tip across all supported languages
- Add comprehensive unit tests for weighted tip selection

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 18:08:37 +08:00
LaZzyMan
4879ea4a36 fix: 修复 extensionsCommand 测试并简化 listAction
- 更新 extensionsCommand.test.ts 以匹配新的命令结构
- 移除对已删除子命令(update, uninstall, disable, enable, detail)的测试
- 简化 listAction 函数,始终返回 extensions_manage 对话框
- 移除未使用的 showMessageIfNoExtensions 函数
2026-02-28 17:20:18 +08:00
LaZzyMan
0072c47996 fix: 修复扩展管理对话框测试和代码质量问题
- 为 ActionSelectionStep.test.tsx 和 ExtensionListStep.test.tsx 添加 KeypressProvider 包裹
- 修复 KeypressContext 导入路径
- 更新测试快照
- 重构 ExtensionsManagerDialog:提取 enable/disable 公共逻辑到 handleToggleExtensionState
- 添加错误消息状态和用户友好的错误提示
2026-02-28 16:38:10 +08:00
LaZzyMan
4d27950a95 feat: Add interactive TUI for extension management 2026-02-28 16:06:34 +08:00
tanzhenxin
849bdb0dbe fix(i18n): add translations for modality and context window display
- Add i18n keys for modality types and status labels
- Update ModelDialog to use t() for user-facing strings

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 15:33:55 +08:00
tanzhenxin
7e4159569e refactor(cli): simplify auth type display in Header
- Add AuthDisplayType enum and helper for Coding Plan detection
- Remove formatAuthType/titleizeAuthType functions
- Update tests for new auth types

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 14:59:56 +08:00
tanzhenxin
00f9c56660 Merge branch 'main' into fix/modality-defaults-pdf-error
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 14:20:40 +08:00
沐目
5f06bf8910 feat(i18n): strengthen output-language.md template to enforce language compliance
Replace soft "Prefer responding" wording with mandatory "MUST always respond"
rule to improve LLM adherence to configured output language. Add exception
clause allowing users to explicitly override for the remainder of a conversation.
2026-02-28 13:59:20 +08:00
沐目
0788003990 test: add unit tests for subagent userMemory injection and output-language path priority
- Add 3 tests for SubAgentScope.buildChatSystemPrompt appending userMemory
- Add 3 tests for project-level output-language.md path resolution priority

Made-with: Cursor
2026-02-28 13:25:41 +08:00
DennisYu07
1ce5bfb629 resole conflict and remove hook extension definition 2026-02-27 17:58:07 -08:00
tanzhenxin
e93b287329
Merge pull request #1796 from QwenLM/feat/support-cancel-execute-pr
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: unblock input after ESC cancel
2026-02-27 21:32:13 +08:00