mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
* fix(vscode-ide-companion/session): force fresh sessions for new chats Ensure explicit new-session actions bypass active ACP session reuse so the VS Code sidebar clears context correctly. Add regression coverage for the agent manager and webview new-session entry points. * fix(vscode): remove core runtime imports from webview bundle Replace the runtime import of `isSupportedImageMimeType` from `@qwen-code/qwen-code-core` with a local `SUPPORTED_PASTED_IMAGE_MIME_TYPES` set in the vscode-ide-companion package. The webview is bundled for a browser environment where Node.js-only core modules are unavailable, so keeping the MIME list local avoids esbuild failures during development. Added tests to verify the local list stays aligned with core and that the webview bundle does not contain core runtime imports. * fix(vscode): reset context usage display on new session (#2847) The webview context-usage bar did not clear when the user started a new session because the old code always fell back to DEFAULT_TOKEN_LIMIT, producing a stale percentage even after usageStats and modelInfo were both cleared. Key changes: - Extract `knownTokenLimit()` in core/tokenLimits.ts that returns `undefined` for unrecognized models instead of a default, keeping `tokenLimit()` behavior unchanged. - In acpModelInfo.ts, derive `_meta.contextLimit` from the known-model table when the ACP payload omits a numeric limit. - Extract `computeContextUsage()` into its own module, which returns `null` when no trusted numeric limit is available — the UI then correctly hides the context bar. - Remove the `@qwen-code/qwen-code-core` runtime import from App.tsx so the webview bundle stays free of Node-only dependencies. Closes #2847 * fix(vscode-ide-companion/webview): reset state on new session * test(vscode-ide-companion/webview): cover stale conversation reset * fix(vscode): remove webview token limit runtime import * fix(vscode): fully reset state for explicit new session * fix(vscode-ide-companion/webview): clear residual state on new session --------- Co-authored-by: tanzhenxin <tanzhenxing1987@gmail.com> |
||
|---|---|---|
| .. | ||
| .vscode | ||
| assets | ||
| schemas | ||
| scripts | ||
| src | ||
| .vscodeignore | ||
| development.md | ||
| esbuild.js | ||
| eslint.config.mjs | ||
| LICENSE | ||
| NOTICES.txt | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| tsconfig.json | ||
| vitest.config.ts | ||
Qwen Code Companion
Seamlessly integrate Qwen Code into Visual Studio Code with native IDE features and an intuitive chat interface. This extension bundles everything you need — no additional installation required.
Demo
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 diff view
- Auto-accept edits mode: Automatically apply Qwen's changes as they're made
- File management: @-mention files or attach files and images using the system file picker
- Conversation history & multiple sessions: Access past conversations and run multiple sessions simultaneously
- Open file & selection context: 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)
Quick Start
-
Install from the VS Code Marketplace or Open VSX Registry
-
Open the Chat panel using one of these methods:
- Click the Qwen icon in the top-right corner of the editor
- Run
Qwen Code: Openfrom the Command Palette (Cmd+Shift+P/Ctrl+Shift+P)
-
Start chatting — Ask Qwen to help with coding tasks, explain code, fix bugs, or write new features
Commands
| Command | Description |
|---|---|
Qwen Code: Open |
Open the Qwen Code Chat panel |
Qwen Code: Run |
Launch a classic terminal session with the bundled CLI |
Qwen Code: Accept Current Diff |
Accept the currently displayed diff |
Qwen Code: Close Diff Editor |
Close/reject the current diff |
Feedback & Issues
Contributing
We welcome contributions! See our Contributing Guide for details on:
- Setting up the development environment
- Building and debugging the extension locally
- Submitting pull requests
Terms of Service and Privacy Notice
By installing this extension, you agree to the Terms of Service.