Commit graph

4838 commits

Author SHA1 Message Date
yiliang114
e1e0eb8631 fix(vscode-ide-companion): improve thinking message ordering and context-aware new chat
- Adjust thinking message timestamp to sort above assistant response
- Add context-aware new chat: sidebar resets in-place, editor tab opens new tab

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 13:44:25 +08:00
DennisYu07
91179fa6db resolve comment 2026-03-10 22:37:48 -07:00
tanzhenxin
3233d16b5c feat(arena): add system reminder and status file support for agent collaboration
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Extract atomic file write utility into reusable module. Add arena system reminder injection so orchestrating agents can discover active arena sessions. Support in-process mode status file writing for external consumers.

This enables agent-to-agent collaboration where a parent agent can monitor and coordinate arena sessions via file-based status files.
2026-03-11 11:56:05 +08:00
DennisYu07
d5d7187479 move move notification auth_success from useAuth to config to support both interactive and non-interactive 2026-03-10 20:50:03 -07:00
LaZzyMan
715fc1a649 feat(permissions): prevent shell bypass of Read/Edit/WebFetch rules
Shell commands that are semantically equivalent to file/network tool
operations are now analyzed and matched against Read/Edit/Write/
WebFetch/ListFiles permission rules, preventing agents from bypassing
configured rules via the run_shell_command tool.

New file: packages/core/src/permissions/shell-semantics.ts
- extractShellOperations(cmd, cwd) => ShellOperation[]
- Covers 50+ commands: cat/head/tail/diff/grep/rg/ls/find/tree,
  touch/mkdir/cp/mv/rm/chmod/chown/sed/awk/dd/curl/wget + redirects
- Handles transparent prefixes: sudo (-u/-g flag values), env, timeout
  (skips DURATION), nohup, nice, time, etc.
- Tokenizer respects single/double quotes and backslash escapes
- Redirect extraction: >, >>, <, 2>, &>

Changes: packages/core/src/permissions/permission-manager.ts
- DECISION_PRIORITY constant for combining decisions
- evaluateSingle(): after base Bash-rule decision, evaluate virtual ops
  from shell semantics and return the most restrictive result
- evaluateShellVirtualOps(): evaluate ShellOperation list via evaluateSingle
- hasRelevantRules(): also check virtual ops so confirmation dialog appears
  when Read/Edit/etc. rules match equivalent shell commands

Changes: packages/core/src/permissions/index.ts
- Export extractShellOperations and ShellOperation

Tests: packages/core/src/permissions/shell-semantics.test.ts
- 52 unit tests: read/list/write/edit/web_fetch ops, redirections,
  prefix commands (sudo -u, timeout DURATION), quotes, variable filtering
2026-03-11 11:45:44 +08:00
yiliang114
40afc13e14 feat(vscode-ide-companion): refactor webview layout to mutual-exclusive sidebar pattern
Adopt Claude Code's approach for webview view registration:
- Use mutual-exclusive sidebar/secondary sidebar with `when` conditions
- Detect secondary sidebar support via VS Code version >= 1.106
- Share single ChatWebviewViewProvider instance across both view IDs
- Only set context key when secondary sidebar is NOT supported
- Pass supportsSecondarySidebar as closure variable to commands

Additional fixes:
- Fix WebViewContent.generate() to accept both Webview and WebviewPanel
- Fix permission handler leak (cancel old promise before new)
- Fix double diff command execution in resolve callback
- Add initializationPromise dedup for auth-restore races
- Add attachToView() for sidebar/secondary sidebar hosting
- Add missing AskUserQuestionResponseMessage import

Co-authored-by: buaoyezz <buaoyezz@users.noreply.github.com>
2026-03-11 11:20:25 +08:00
pomelo-nwu
f13a2fdf17 fix: export command should use current session ID instead of loadLastSession
The /export commands (html, md, json, jsonl) were incorrectly using
loadLastSession() which loads the last modified session from disk,
rather than the currently active session.

This fix uses config.getSessionId() to get the current session ID
and loads the correct session with loadSession(sessionId).

Fixes #2267

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 11:16:29 +08:00
tanzhenxin
cecc960254 feat(arena): improve agent UI with header info and simplify worktree branches
- Add AgentHeader component showing model, path, and git branch
- Separate modelId and modelName in RegisteredAgent for cleaner display
- Simplify worktree branch naming from worktrees/session/name to base-session-name
- Change loading text from "Agent is working…" to "Thinking…"
- Make agent footer always visible (not just when input is active)

This improves the agent collaboration UX by providing context about each
agent's environment and simplifies the git worktree management.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 11:04:46 +08:00
DennisYu07
4b80e4a3b7 reduce some useless case 2026-03-10 19:59:15 -07:00
Shaojin Wen
01be4f6cf8 fix(core): remove duplicate exports in packages/core/src/index.ts
The index.ts barrel file had 30+ modules exported multiple times across
scattered sections. This consolidates all exports into a single
well-organized structure with clear section headers, removing 90 lines
of redundant export statements. No functional changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 10:59:10 +08:00
LaZzyMan
e793e82729 feat(permissions): add workspace directory management tab
- Add Workspace tab to PermissionsDialog with full directory management UI
  - Directory list view: initial (non-removable) dirs shown inline,
    runtime-added dirs selectable; "Add directory…" always first
  - Add directory input view: filesystem autocomplete with ↑/↓ navigation
    and Tab-to-complete; path validation (existence, type, duplicate,
    subdirectory checks)
  - Remove directory confirmation view
  - Save directly to project settings (SettingScope.Workspace), no scope
    selection step
- Add onTab/onUp/onDown props to TextInput to intercept keys before buffer
- Add removeDirectory() and isInitialDirectory() to WorkspaceContext
- Add --add-dir CLI alias for --include-directories
- Add /add-dir slash command (alias for /directory add)
- Add permissions.additionalDirectories settings field
- Add i18n keys for all workspace directory UI strings (en/zh/de/ja/pt/ru)"
2026-03-11 10:54:59 +08:00
DennisYu07
ddf2290ccd add integration test for PreToolUse PostToolUse PostToolUseFailure PreCompact 2026-03-10 19:39:55 -07:00
yiliang114
e9f57e6689 Merge branch 'main' of https://github.com/QwenLM/qwen-code into feat/vscode-ide-companion-layout 2026-03-11 10:08:59 +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
tanzhenxin
addbdcb0ef feat(arena): add info message for forwarded chat history
- Add info message when chatHistory is passed to spawned agents
- Add tests for info message presence and absence

This provides visibility to users when chat history context is included
in spawned agent sessions.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 20:37:08 +08:00
DennisYu07
5bd7488928 fix unit test 2026-03-10 05:10:18 -07:00
tanzhenxin
9f7e3e054f feat(arena): forward chat history to spawned agents
Add stripStartupContext to remove env-info from parent history and pass
chatHistory through ArenaManager → InProcessBackend → AgentInteractive →
AgentCore. This allows arena agents to start with conversational context
from the main session.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 19:45:14 +08:00
DennisYu07
f547785da7 add integration test for notification 2026-03-10 04:26:15 -07:00
LaZzyMan
217d59c892 feat enable other dirs with core tools 2026-03-10 17:51:29 +08:00
Yusheng
66c625a555 fix: improve qwen mcp add option handling for arrays 2026-03-10 17:37:51 +08:00
tanzhenxin
89f8751233 feat(cli): add agent composer UI and refactor text input handling
- Extract shared BaseTextInput component with readline keyboard handling
- Add AgentComposer and AgentFooter components for agent interaction
- Add useAgentStreamingState hook for managing agent streaming state
- Refactor InputPrompt to use BaseTextInput with agent tab bar focus support
- Move calculatePromptWidths to shared layoutUtils
- Disable auto-accept indicator on agent tabs (agents handle their own)

This enables a dedicated input experience for agent tabs with proper
focus management and keyboard navigation between main input and agent tabs.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 16:53:10 +08:00
tanzhenxin
bf99f95602
Merge pull request #2045 from xieyonn/feat/tmp-editor-filename
Some checks failed
Qwen Code CI / Lint (push) Has been cancelled
Qwen Code CI / CodeQL (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:none (push) Has been cancelled
E2E Tests / E2E Test - macOS (push) Has been cancelled
Qwen Code CI / Post Coverage Comment (push) Has been cancelled
Qwen Code CI / Test (push) Has been cancelled
Qwen Code CI / Test-1 (push) Has been cancelled
Qwen Code CI / Test-2 (push) Has been cancelled
Qwen Code CI / Test-3 (push) Has been cancelled
Qwen Code CI / Test-4 (push) Has been cancelled
Qwen Code CI / Test-5 (push) Has been cancelled
Qwen Code CI / Test-6 (push) Has been cancelled
Qwen Code CI / Test-7 (push) Has been cancelled
Qwen Code CI / Test-8 (push) Has been cancelled
feat(cli): change temporary filename prefix to qwen-edit-
2026-03-10 16:51:42 +08:00
DennisYu07
31b40ca653 add integration test for SubagentStart and SubagentEnd 2026-03-10 01:45:31 -07:00
LaZzyMan
db0e373ad7 feat test tool permissions 2026-03-10 16:30:22 +08:00
yiliang114
64b2dfaddc Merge remote-tracking branch 'origin/main' into feat/vscode-ide-companion-layout 2026-03-10 15:52:47 +08:00
DennisYu07
98fb607ad1 merge main 2026-03-10 00:29:08 -07:00
DennisYu07
d30986997f
Merge pull request #2238 from QwenLM/feat/hook-stop-implementation
fix(hooks): Remove useless expect
2026-03-10 14:57:53 +08:00
yiliang114
8c4b3d4fb9 Merge branch 'main' into fix/ide-connection-dns-lookup 2026-03-10 14:56:22 +08:00
yiliang114
c3391fe0db refactor(ide): optimize connection config lookup and remove time-based lock cleanup
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 14:54:37 +08:00
LaZzyMan
06bef3b91f fix dirs in getUserSkillsDirs 2026-03-10 14:33:40 +08:00
DennisYu07
5774fa47af remove useless expect 2026-03-09 23:31:10 -07:00
tanzhenxin
b6dda8c08d
Merge pull request #2224 from Deng-Xian-Sheng/patch-1
improve readability of context compression description
2026-03-10 14:10:49 +08:00
DennisYu07
1ce1818680
Merge pull request #2230 from QwenLM/feat/hook-stop-implementation
fix(hooks): Fix failing hook integration tests by updating hook scripts to create hook_invoke_count.txt
2026-03-10 13:59:59 +08:00
tanzhenxin
9154048be2
Merge pull request #2219 from LaZzyMan/fix-mcp-extension-ui
fix: clean up MCP server display and add CONCAT merge strategy for mcp allowed/excluded lists
2026-03-10 13:55:59 +08:00
tanzhenxin
89b4931dc5
Merge pull request #2226 from QwenLM/release/v0.12.1
chore(release): bump version to 0.12.1
2026-03-10 11:47:25 +08:00
DennisYu07
f945f95540 refactor test case 2026-03-09 20:38:38 -07:00
tanzhenxin
29e82822e2 fix(test): simplify AskUserQuestionDialog tests to remove flaky timing-dependent tests
Keep only essential stable tests:
- Rendering tests (6)
- Basic single-select interaction (4)
- Basic multi-select interaction (2)
- Multiple questions navigation (4)
- Focus behavior (1)

Remove timing-sensitive tests involving:
- Auto-advance after selection (setTimeout 150ms)
- Custom input state preservation across navigation
- Complex multi-select toggle state assertions

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 11:11:23 +08:00
yiliang114
3f77f416ec Merge branch 'main' of https://github.com/QwenLM/qwen-code into feat/vscode-ide-companion-layout 2026-03-10 11:05:31 +08:00
DennisYu07
e529b62fd2 refactor expect for stop hook 2026-03-09 20:05:17 -07:00
tanzhenxin
3b5e9f21c2
Merge branch 'main' into release/v0.12.1 2026-03-10 10:51:50 +08:00
tanzhenxin
2643116804 fix(test): remove flaky custom input state tests from AskUserQuestionDialog
Remove 5 tests in 'custom input preserves state' describe block that were
flaky on Windows CI due to timing issues with TextInput state updates and
keyboard navigation.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 10:50:21 +08:00
tanzhenxin
a4136f484d
Merge pull request #2110 from QwenLM/fix/clear-message-after-change-modle
fix(cli): clear static error message when starting new query
2026-03-10 10:36:32 +08:00
tanzhenxin
e5aa9ce8e7 fix(test): increase wait times in AskUserQuestionDialog tests for Windows CI
- Increase wait times from 200ms to 250-300ms for auto-advance tests
- Windows CI can have timing issues with setTimeout precision

This fixes flaky test failures on Windows CI where the 150ms auto-advance
timeout wasn't completing before the next test action.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 10:29:54 +08:00
pomelo
d80199d893
Merge pull request #2212 from xuewenjie123/fix/mcp-oauth-scope-from-protected-resource
fix(mcp): use scopes from protected resource metadata (RFC 9728)
2026-03-10 10:23:12 +08:00
tanzhenxin
1376a621b8 chore(release): bump version to 0.12.1
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 09:22:03 +08:00
靳灿奇
85855bbc8b
Fix translation for context compression message 2026-03-10 03:17:27 +08:00
yiliang114
1ee0222727 refactor: simplify mock implementations for testing environments 2026-03-10 01:15:23 +08:00
yiliang114
842e2e0eee refactor: extract connection config logic into separate module 2026-03-10 00:43:43 +08:00
yiliang114
6bf5a06bbd fix(ide): add lock file cleanup logic and tests 2026-03-09 21:50:00 +08:00
yiliang114
532c416fb7 fix(ide): use callback-based dns.lookup for better compatibility
Replace Promise-based dns.promises.lookup with callback-based dns.lookup
for better compatibility across different Node.js environments (e.g.,
VSCode, Cursor).

The callback-based approach avoids potential issues with Promise-based
DNS lookup in certain IDE embedded terminal environments.
2026-03-09 21:40:41 +08:00