Commit graph

155 commits

Author SHA1 Message Date
易良
fbf5ed57d6
feat(storage): support configurable runtime output directory (#2127)
Some checks failed
Qwen Code CI / Lint (push) Failing after 12s
Qwen Code CI / Test (push) Has been skipped
Qwen Code CI / Test-1 (push) Has been skipped
Qwen Code CI / Test-2 (push) Has been skipped
Qwen Code CI / Test-3 (push) Has been skipped
Qwen Code CI / Test-4 (push) Has been skipped
Qwen Code CI / Test-5 (push) Has been skipped
Qwen Code CI / Test-6 (push) Has been skipped
Qwen Code CI / Test-7 (push) Has been skipped
Qwen Code CI / Test-8 (push) Has been skipped
Qwen Code CI / CodeQL (push) Failing after 6s
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Failing after 5s
Qwen Code CI / Post Coverage Comment (push) Has been skipped
E2E Tests / E2E Test (Linux) - sandbox:none (push) Failing after 10m36s
E2E Tests / E2E Test - macOS (push) Has been cancelled
* feat(storage): support configurable runtime output directory (#2014)

Add `advanced.runtimeOutputDir` setting and `QWEN_RUNTIME_DIR` env var
to redirect runtime output (temp files, debug logs, session data, todos,
insights) to a custom directory while keeping config files at ~/.qwen.

- Introduce `Storage.setRuntimeBaseDir()` / `getRuntimeBaseDir()` with
  tilde expansion and relative path resolution
- Add `AsyncLocalStorage`-based `runWithRuntimeBaseDir()` for concurrent
  session isolation in ACP integration
- Update all runtime path methods to use `getRuntimeBaseDir()` instead
  of `getGlobalQwenDir()` (temp, debug, ide, projects, history dirs)
- Config paths (settings, oauth, installation_id, etc.) remain pinned
  to `~/.qwen` regardless of runtime dir configuration
- Add comprehensive tests covering path resolution, env var priority,
  async context isolation, and config path stability

* fix(core/storage): 支持 Windows 风格波浪号路径

扩展 setRuntimeBaseDir 以支持 Windows 风格的波浪号路径 (~\),
使用统一的路径分割逻辑处理 Unix 和 Windows 风格的路径分隔符

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core/debugLogger): runtime base dir 变更时创建新 debug 目录

添加 ensuredDebugDirPath 追踪变量,当 runtime base dir 发生变更时,
确保在新的目录下创建 debug 子目录

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* feat(cli/acp): 支持 ACP runtime output dir 配置

新增 runWithAcpRuntimeOutputDir 辅助函数,在 ACP Agent 的
loadSession 和 listSessions 操作中应用配置的 runtimeOutputDir

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* docs(vscode-ide-companion/acpConnection): 补充 this 别名的使用说明

为 self = this 的用法添加解释性注释,说明在嵌套回调中需要使用 this

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* feat(cli): add runtime output directory configuration support

* fix(core): update test to use getUserSkillsDirs method

Update storage.test.ts to call getUserSkillsDirs() instead of the
non-existent getUserSkillsDir() method. The method was renamed to
return an array of skill directories.

* fix(core/todoWrite): use path.join for cross-platform path assertion in test

Replace hardcoded forward-slash path `.qwen/todos/` with `path.join('.qwen', 'todos')` to fix Windows CI failure where paths use backslashes.

Made-with: Cursor

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-20 13:53:05 +08:00
LaZzyMan
f9d9a985ce Merge branch 'main' into feat/support-permission 2026-03-19 11:24:30 +08:00
LaZzyMan
7450067e37 Merge branch 'main' into feat/support-permission 2026-03-11 17:11:28 +08:00
tanzhenxin
d7aa98a0c0 refactor(arena): move arena-bridge to context and add reactive manager tracking
- Move useArenaInProcess from AppContainer to AgentViewProvider
- Replace polling with config.onArenaManagerChange() callback
- Add success-type progress messages when agents finish tasks
- Add isSuccessStatus helper for IDLE/COMPLETED status checks
- Reset input history position when arena session starts

This improves separation of concerns and eliminates the 500ms polling
interval in favor of immediate reactive updates when the arena manager
changes.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 21:45:30 +08:00
LaZzyMan
db0e373ad7 feat test tool permissions 2026-03-10 16:30:22 +08:00
tanzhenxin
f9d4fa0a39 Merge branch 'main' into feature/arena-agent-collaboration 2026-03-09 11:13:31 +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
74b342623c Merge branch 'main' into feature/arena-agent-collaboration 2026-02-28 22:01:10 +08:00
mingholy.lmh
42a5b4d1e0 fix: add model resolution warnings to start warnings 2026-02-26 14:43:07 +08:00
tanzhenxin
5d07c495f1 feat(cli): Add agent tab navigation and live tool output for in-process arena mode
Add AgentViewContext, AgentTabBar, and AgentChatView components for tab-based
agent switching. Add useArenaInProcess hook bridging ArenaManager events to
React state. Add agentHistoryAdapter converting AgentMessage[] to HistoryItem[].

Core support changes:
- Replace stream buffers with ROUND_TEXT events (complete round text)
- Add TOOL_OUTPUT_UPDATE events for live tool output streaming
- Add pendingApprovals/liveOutputs/shellPids state to AgentInteractive
- Fix missing ROUND_END emission for final text rounds

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-23 13:21:16 +08:00
tanzhenxin
21e711469d fix(mcp): update OAuth client names and improve MCP commands
- Rename MCP OAuth client names from 'Gemini CLI' to 'Qwen Code'
- Update MCP add/remove/list commands with improved error handling
- Add comprehensive tests for OAuth provider
- Fix token storage test assertions
- Clean up unused i18n translation keys
- Update gemini-converter and window title references

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-08 10:46:48 +08:00
tanzhenxin
a4ffc6eb24 feat: promote Agent Skills from experimental to stable
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-06 13:04:08 +08:00
tanzhenxin
4abec5c055 Merge remote-tracking branch 'origin/main' into feat/debug-logging-refactor 2026-02-05 20:23:48 +08:00
tanzhenxin
ff0ba0cc4e Merge branch and resolve conflicts
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-05 13:41:37 +08:00
tanzhenxin
9b524a59c1 Merge branch 'main' into feat/debug-logging-refactor
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-04 17:30:58 +08:00
tanzhenxin
89e3c2cd7a refactor(debug): replace ConsolePatcher with debugLogger and update error reporting
- Replace ConsolePatcher with centralized debugLogger utility
- Refactor errorReporting to use debugLogger instead of file-based reporting
- Remove user-facing console message components:
  - Delete ConsolePatcher.ts, useConsoleMessages.ts/hook
  - Delete ConsoleSummaryDisplay.tsx, DetailedMessagesDisplay.tsx
- Update all tests in packages/core and packages/cli:
  - Mock debugLogger where needed
  - Remove assertions for console output on non-critical errors
  - Keep debugLogger assertions for fatal/network errors
  - Use HOME directory mocking for hermetic file system tests

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-02 17:37:54 +08:00
宇溯
813e2d2b12 FIXME: list extensions after the config initialize 2026-02-01 23:56:21 -08:00
宇溯
3719104d85 Revert "resolve comment"
This reverts commit 61421e65872acebe20d88c2d40c9fea40fa3fefa.
2026-02-01 23:51:04 -08:00
宇溯
91ec945e81 resolve comment 2026-02-01 23:51:04 -08:00
宇溯
635f0fad89 Revert "reslove comment"
This reverts commit d7b003076e8a5f6b387b7313ecab0cd7ebea0997.
2026-02-01 23:51:04 -08:00
tanzhenxin
135df54f27 Merge branch 'main' into feat/debug-logging-refactor
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-01 20:47:38 +08:00
Alexander Farber
561fda297e Rename disable* settings to enable* and consolidated 1 setting 2026-02-01 16:04:49 +08:00
pomelo
33281c8108
Merge pull request #1637 from QwenLM/fix/output-language-init-timing
fix: ensure output-language.md is created before config initialization
2026-01-29 11:14:07 +08:00
tanzhenxin
788a9f9d10 fix: ensure output-language.md is created before config initialization
Move initializeLlmOutputLanguage() to execute before loadCliConfig()
to fix a race condition where the language file wasn't included in
LLM context on first run.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-28 09:42:10 +08:00
mingholy.lmh
2c9399f8e0 fix: use resolved authType to initialize ACP agent 2026-01-27 14:56:22 +08:00
tanzhenxin
7995c65571 feat(cli): migrate console calls to debugLogger and stdioHelpers (M3 Phase 7-9)
Route CLI console.* calls to structured logging:
- Debug/internal diagnostics → debugLogger (logfile)
- User-facing output → writeStdoutLine/writeStderrLine/clearScreen (stdioHelpers)
- Add stdioHelpers.ts with writeStdoutLine, writeStderrLine, clearScreen
- Migrate pre-session files (gemini.tsx, sandbox.ts, config.ts) to stdioHelpers
- Migrate extension/MCP commands to stdioHelpers
- Migrate non-interactive session/control to debugLogger
- Migrate UI hooks and components to debugLogger
2026-01-26 15:02:37 +08:00
tanzhenxin
ba2824b0b0 feat(core,cli): add debug logging infrastructure (M0-M2)
Implement debug logfile foundation for routing internal diagnostics
to a per-session log file instead of polluting the terminal.

Core changes:
- Add DebugLogger interface and createDebugLogger() in debugLogger.ts
- Add Storage.getGlobalDebugDir() and getDebugLogPath() for log paths
- Add Config.getDebugLogger() method with session-scoped logger
- Track write failures via isDebugLoggingDegraded()

CLI changes:
- Add DebugModeNotification component for interactive startup notice
- Add non-interactive debug notice to stderr in gemini.tsx

Log files are written to ~/.qwen/debug/<sessionId>.txt with format:
2026-01-24T10:30:00.000Z [LEVEL] [TAG] message

Debug logging is always-on; debug mode only controls the startup notice.
2026-01-25 09:23:18 +08:00
LaZzyMan
a546e84887 fix: settings in arg 2026-01-19 11:18:01 +08:00
LaZzyMan
4c7605d900 Merge branch 'main' into feat/extension 2026-01-14 17:56:01 +08:00
LaZzyMan
551e546974 feat: move extension to core package 2026-01-14 15:30:27 +08:00
tanzhenxin
f3b7c63cd1
Merge pull request #1436 from QwenLM/feat/skills-enhancement
feat(skills): add experimental /skills command + hot reload
2026-01-13 17:36:21 +08:00
tanzhenxin
5a6e5bb452
Merge pull request #1427 from liqiongyu/fix/1333-legacy-settings-alias
fix(cli): warn on deprecated/unknown settings keys
2026-01-12 14:43:27 +08:00
liqoingyu
8c56b612fb fix(cli): warn on deprecated/unknown settings keys 2026-01-12 10:49:37 +08:00
mingholy.lmh
85bc0833b4 fix: remove authType fallback option for cold start case 2026-01-08 18:08:56 +08:00
tanzhenxin
0e769e100b Added automatic skill hot-reload 2026-01-08 15:43:46 +08:00
LaZzyMan
74013bd8b2 feat: settings extension 2026-01-08 13:49:59 +08:00
mingholy.lmh
81de79c899 fix: best effort to use resolved authType/model across the repo 2026-01-08 12:11:23 +08:00
liqoingyu
473cb7b951 fix(cli): skip update check when disableUpdateNag is true 2026-01-04 14:32:38 +08:00
tanzhenxin
87d8d82be7 special handling for summarized thinking 2025-12-22 14:07:23 +08:00
tanzhenxin
17129024f4 Add Gemini provider, remove legacy Google OAuth, and tune generation defaults 2025-12-19 16:26:54 +08:00
tanzhenxin
9942b2b877 Merge branch 'main' into 1179-add-resume-cmd 2025-12-16 15:29:58 +08:00
Alexander Farber
4504c7a0ac
Rename ResumeSessionPicker to StandaloneSessionPicker and add documentation 2025-12-13 13:33:44 +01:00
Alexander Farber
bf905dcc17
Rename GEMINI_CLI_NO_RELAUNCH to QWEN_CODE_NO_RELAUNCH 2025-12-11 11:14:12 +01:00
mingholy.lmh
46478e5dd3 fix: try fix sandbox integration test failure 2025-12-05 13:14:55 +08:00
mingholy.lmh
57b519db9a test: skip qwen-oauth e2 case in sandbox 2025-12-04 20:39:51 +08:00
mingholy.lmh
769a438fa4 feat: enhance logging capabilities and update query options in sdk-typescript
- Introduced a new logging system with adjustable log levels (debug, info, warn, error).
- Updated query options to include a logLevel parameter for controlling verbosity.
- Refactored existing code to utilize the new logging system for better error handling and debugging.
- Cleaned up unused code and improved the structure of the SDK.
2025-12-04 17:10:20 +08:00
mingholy.lmh
e1ffaec499 feat: create draft framework for cli & sdk 2025-12-04 17:10:16 +08:00
tanzhenxin
0a75d85ac9
Session-Level Conversation History Management (#1113) 2025-12-03 18:04:48 +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
817218f1cf
feat: Refactor and Enhance Ripgrep Tool (#930) 2025-10-31 10:53:13 +08:00