What happened?
When using qwen-code's edit file feature that requires user confirmation, the VSCode diff editor that pops up always creates a new editor group to display the diff, instead of opening in the user's currently active editor group.
Steps to reproduce
- Open qwen-code extension in VSCode
- Let qwen-code perform a file edit operation (one that requires confirmation)
- Observe where the diff editor opens
Actual behavior: The diff editor always opens in a newly created editor group.
Related: #2097
What did you expect to happen?
The diff editor should open in the user's currently active editor group (or at least have a configuration option to control this behavior), rather than forcibly creating a new group.
This aligns with VSCode's native diff behavior — when using the vscode.diff command, it defaults to opening in the current editor group or an adjacent group, rather than always creating a new one.
Code Analysis
By examining packages/vscode-ide-companion/src/diff-manager.ts and packages/vscode-ide-companion/src/utils/editorGroupUtils.ts, the current implementation logic is:
- The
showDiff() method attempts to find an editor group to the left of the chat webview
- If not found, it calls
ensureLeftGroupOfChatWebview() which forcibly creates a new group
- Then opens the diff in that new group
Core code at diff-manager.ts:195-203:
```typescript
let targetViewColumn = findLeftGroupOfChatWebview();
if (targetViewColumn === undefined) {
// If there is no left neighbor, create one to satisfy the requirement of
// opening diffs to the left of the chat webview.
targetViewColumn = await ensureLeftGroupOfChatWebview();
}
```
This design intends to open diffs to the left of the chat webview, but when the user's workspace layout doesn't satisfy this condition, it forcibly creates a new group, affecting user experience.
Client information
Client Information
```
/about
╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Status │
│ │
│ Qwen Code 0.12.0 (426e9c2) │
│ Runtime Node.js v22.22.0 / npm 10.9.4 │
│ OS darwin arm64 (24.1.0) │
│ │
│ Auth Alibaba Cloud Bailian Coding Plan │
│ Base URL https://coding.dashscope.aliyuncs.com/v1 │
│ Model qwen3.5-plus │
│ Sandbox no sandbox │
│ Proxy no proxy │
│ Memory Usage 284.5 MB │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
```
What happened?
When using qwen-code's edit file feature that requires user confirmation, the VSCode diff editor that pops up always creates a new editor group to display the diff, instead of opening in the user's currently active editor group.
Steps to reproduce
Actual behavior: The diff editor always opens in a newly created editor group.
Related: #2097
What did you expect to happen?
The diff editor should open in the user's currently active editor group (or at least have a configuration option to control this behavior), rather than forcibly creating a new group.
This aligns with VSCode's native diff behavior — when using the
vscode.diffcommand, it defaults to opening in the current editor group or an adjacent group, rather than always creating a new one.Code Analysis
By examining
packages/vscode-ide-companion/src/diff-manager.tsandpackages/vscode-ide-companion/src/utils/editorGroupUtils.ts, the current implementation logic is:showDiff()method attempts to find an editor group to the left of the chat webviewensureLeftGroupOfChatWebview()which forcibly creates a new groupCore code at
diff-manager.ts:195-203:```typescript
let targetViewColumn = findLeftGroupOfChatWebview();
if (targetViewColumn === undefined) {
// If there is no left neighbor, create one to satisfy the requirement of
// opening diffs to the left of the chat webview.
targetViewColumn = await ensureLeftGroupOfChatWebview();
}
```
This design intends to open diffs to the left of the chat webview, but when the user's workspace layout doesn't satisfy this condition, it forcibly creates a new group, affecting user experience.
Client information
Client Information
```
╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Status │
│ │
│ Qwen Code 0.12.0 (426e9c2) │
│ Runtime Node.js v22.22.0 / npm 10.9.4 │
│ OS darwin arm64 (24.1.0) │
│ │
│ Auth Alibaba Cloud Bailian Coding Plan │
│ Base URL https://coding.dashscope.aliyuncs.com/v1 │
│ Model qwen3.5-plus │
│ Sandbox no sandbox │
│ Proxy no proxy │
│ Memory Usage 284.5 MB │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
```