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