Skip to content

[VS Code] Secondary sidebar declaration affects other extensions' view positions in older VS Code versions #2432

@yiliang114

Description

@yiliang114

What happened?

In VS Code versions below 1.106, the secondarySidebar viewsContainers contribution point is not available. While qwen-code-vscode-ide-companion correctly mounts the view to the primary sidebar via the qwen-code:doesNotSupportSecondarySidebar context key, it appears to affect the view positions of other extensions that default to the secondary sidebar.

For example, after installing vscode-ide-companion, the Cline extension's view (which should be in the secondary sidebar) moves to the primary sidebar.

Image

Steps to reproduce:

  1. Use VS Code version < 1.106
  2. Install extensions that place views in the secondary sidebar (e.g., Cline)
  3. Install qwen-code-vscode-ide-companion
  4. Observe the position change of other extensions' views

What did you expect to happen?

Installing qwen-code-vscode-ide-companion should not affect other extensions' view positions. Other extensions' secondary sidebar views should remain in their original locations.

Client information

Client Information

(Please run `qwen -p '/about'` in terminal and paste the output here)

Anything else we need to know?

Code analysis:

In `packages/vscode-ide-companion/package.json`, two viewsContainers are declared simultaneously:

```json
"viewsContainers": {
"activitybar": [{ "id": "qwen-code-sidebar", "when": "qwen-code:doesNotSupportSecondarySidebar" }],
"secondarySidebar": [{ "id": "qwen-code-secondary", "when": "!qwen-code:doesNotSupportSecondarySidebar" }]
}
```

Although `when` conditions are used to control visibility, in VS Code < 1.106, the `secondarySidebar` container declaration itself may still be parsed, affecting VS Code's handling of other extensions' view layouts.

Related Issue: #2416 (container 'qwen-code-secondary' does not exist)

Metadata

Metadata

Assignees

Labels

type/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions