Skip to main content
The Qwen Code Companion extension brings Qwen Code directly into Visual Studio Code with a native chat panel, diff view, and seamless workspace integration. Everything you need is bundled—no additional CLI installation required.

Features

Native IDE Experience

Dedicated Qwen Code Chat panel accessed via the Qwen icon in the editor title bar

Native Diffing

Review, edit, and accept changes in VS Code’s native diff view

Auto-Accept Mode

Automatically apply Qwen’s changes as they’re made for faster workflows

File Management

@-mention files or attach files and images using the system file picker

Conversation History

Access past conversations and run multiple sessions simultaneously

Context Awareness

Share active files, cursor position, and selections for more precise help

Requirements

  • Visual Studio Code 1.85.0 or newer
  • Also works with Cursor, Windsurf, and other VS Code-based editors

Installation

1

Install from Marketplace

Install the extension from one of these sources:Or search for “Qwen Code Companion” in VS Code’s Extensions panel (Ctrl+Shift+X / Cmd+Shift+X).
2

Open the Chat Panel

Launch the Qwen Code chat panel using any of these methods:
  • Click the Qwen icon in the top-right corner of the editor
  • Run Qwen Code: Open from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
3

Start Chatting

Ask Qwen to help with coding tasks:
Explain what this project does
Fix the bug in @src/main.ts
Write unit tests for @utils/parser.ts
Refactor this function to be more efficient

Usage

Opening the Chat Panel

Access the Qwen Code chat interface:
  1. Via Editor Icon: Click the Qwen icon in the editor title bar (top-right)
  2. Via Command Palette: Press Ctrl+Shift+P / Cmd+Shift+P and run Qwen Code: Open

Referencing Files

Add files to your conversation context:
  • @-mentions: Type @ followed by a filename to reference files in your workspace
  • File picker: Use the attachment button to select files via the system file picker
  • Images: Attach screenshots or diagrams to help explain visual issues

Reviewing Changes

When Qwen suggests code changes:
  1. View diff: Changes appear in VS Code’s native diff view
  2. Edit inline: Modify the suggested changes directly in the diff editor
  3. Accept: Click the checkmark icon or press Ctrl+S / Cmd+S to accept
  4. Reject: Click the close icon to discard changes

Auto-Accept Mode

Enable auto-accept to automatically apply changes:
  • Changes are applied immediately without manual review
  • Useful for rapid prototyping and trusted operations
  • Toggle on/off as needed for different workflows

Multiple Sessions

Run multiple concurrent Qwen Code sessions:
  • Each chat panel is independent
  • Maintain separate contexts for different tasks
  • Review conversation history for each session

Commands

Available commands in the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
CommandDescriptionShortcut
Qwen Code: OpenOpen the Qwen Code Chat panel-
Qwen Code: RunLaunch a classic terminal session with the bundled CLI-
Qwen Code: Accept Current DiffAccept the currently displayed diffCtrl+S / Cmd+S (when diff visible)
Qwen Code: Close Diff EditorClose/reject the current diff-
Qwen Code: View Third-Party NoticesView third-party software notices-

Configuration

The extension uses the same configuration as the Qwen Code CLI. Settings are stored in:
  • User settings: ~/.qwen/settings.json (global)
  • Project settings: .qwen/settings.json (workspace-specific)

Configuring Models

Edit your ~/.qwen/settings.json to configure available models:
{
  "modelProviders": {
    "openai": [
      {
        "id": "qwen3-coder-plus",
        "name": "qwen3-coder-plus",
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "envKey": "DASHSCOPE_API_KEY"
      }
    ]
  },
  "env": {
    "DASHSCOPE_API_KEY": "sk-xxxxxxxxxxxxx"
  },
  "security": {
    "auth": {
      "selectedType": "openai"
    }
  },
  "model": {
    "name": "qwen3-coder-plus"
  }
}
See the Configuration Guide for all available options.

VS Code Settings

The extension also respects VS Code’s native settings. Access via:
  • File → Preferences → Settings (Windows/Linux)
  • Code → Settings → Settings (macOS)
Search for “Qwen Code” to see extension-specific settings.

Using the Bundled CLI

The extension includes a bundled version of the Qwen Code CLI. Access it via:
Qwen Code: Run
This launches a terminal session with the bundled CLI, giving you access to:
  • All CLI commands and features
  • Terminal-based chat interface
  • Headless mode for scripting
See the CLI documentation for complete usage.

Keyboard Shortcuts

ActionWindows/LinuxmacOS
Open Command PaletteCtrl+Shift+PCmd+Shift+P
Open ExtensionsCtrl+Shift+XCmd+Shift+X
Accept diffCtrl+SCmd+S

Tips & Best Practices

Instead of asking “fix the bug”, say “fix the bug in @src/utils/parser.ts:42”. This gives Qwen exact context about which file and line you’re referring to.
Even with auto-accept mode, periodically review Qwen’s suggestions. The diff view makes it easy to verify changes before they’re applied.
Use separate chat panels for different tasks:
  • One for debugging
  • One for new feature development
  • One for documentation
Previous conversations are saved. Reopen them to:
  • Continue where you left off
  • Reference past solutions
  • Learn from previous interactions

Troubleshooting

Issue: Can’t find the Qwen icon or commands.Solutions:
  • Verify the extension is installed and enabled in the Extensions panel
  • Restart VS Code
  • Check VS Code version (requires 1.85.0 or newer)
Issue: Clicking the Qwen icon does nothing.Solutions:
  • Check the Developer Tools for errors (Help → Toggle Developer Tools)
  • Look for extension activation errors in the Output panel (View → Output → Qwen Code)
  • Try reloading the window (Developer: Reload Window)
Issue: Can’t sign in or API key not working.Solutions:
  • Verify your ~/.qwen/settings.json configuration
  • Check API key validity by running the bundled CLI
  • Ensure network connectivity for OAuth flow
Issue: Suggested changes don’t appear.Solutions:
  • Check that the file is part of your workspace
  • Verify the file isn’t excluded by .gitignore or VS Code settings
  • Look for errors in the Developer Tools console

Viewing Logs

To debug issues:
  1. Developer Tools: Help → Toggle Developer Tools
  2. Output Panel: View → Output → Select “Qwen Code” from dropdown
  3. Extension Host Log: Developer: Show Logs → Extension Host

Compatibility

VS Code-Based Editors

The extension works with VS Code forks and derivatives:
  • Cursor: Full compatibility
  • Windsurf: Full compatibility
  • VSCodium: Full compatibility via Open VSX
  • Code - OSS: Full compatibility

Platform Support

  • Windows: Windows 10/11
  • macOS: macOS 10.15 (Catalina) or newer
  • Linux: Most distributions with glibc 2.28+

Feedback & Support

Report Bugs

Found an issue? Let us know on GitHub

Request Features

Have an idea? Submit a feature request

View Changelog

See what’s new in recent releases

Contributing

Help improve the extension

Next Steps