- 修改了 WebViewProvider 中的逻辑,先尝试通过 ACP 加载旧会话 - 如果加载失败,则创建新会话作为回退方案 - 在 AcpConnection 中添加了初始化响应的日志输出 - 在 QwenAgentManager 中添加了新的 loadSessionViaAcp 方法,用于测试 ACP 的 session/load 功能
Qwen Code Companion
The Qwen Code Companion extension seamlessly integrates Qwen Code. This extension is compatible with both VS Code and VS Code forks.
Features
-
Open Editor File Context: Qwen Code gains awareness of the files you have open in your editor, providing it with a richer understanding of your project's structure and content.
-
Selection Context: Qwen Code can easily access your cursor's position and selected text within the editor, giving it valuable context directly from your current work.
-
Native Diffing: Seamlessly view, modify, and accept code changes suggested by Qwen Code directly within the editor.
-
Launch Qwen Code: Quickly start a new Qwen Code session from the Command Palette (Cmd+Shift+P or Ctrl+Shift+P) by running the "Qwen Code: Run" command.
Requirements
To use this extension, you'll need:
- VS Code version 1.101.0 or newer
- Qwen Code (installed separately) running within the VS Code integrated terminal
Development and Debugging
To debug and develop this extension locally:
-
Clone the repository
git clone https://github.com/QwenLM/qwen-code.git cd qwen-code -
Install dependencies
npm install # or if using pnpm pnpm install -
Open the extension in VS Code
cd packages/vscode-ide-companion code . -
Start debugging
- Press
F5or click "Run and Debug" from the sidebar - Select "Run Extension" from the debug configuration dropdown
- This will open a new "Extension Development Host" window with the extension loaded
- Press
-
Make changes and reload
- Edit the source code in the original VS Code window
- To see your changes, reload the Extension Development Host window by:
- Pressing
Ctrl+R(Windows/Linux) orCmd+R(macOS) - Or clicking the "Reload" button in the debug toolbar
- Pressing
-
View logs and debug output
- Open the Debug Console in the original VS Code window to see extension logs
- In the Extension Development Host window, open Developer Tools with
Help > Toggle Developer Toolsto see webview logs
Build for Production
To build the extension for distribution:
npm run compile
# or
pnpm run compile
To package the extension as a VSIX file:
npx vsce package
# or
pnpm vsce package
Terms of Service and Privacy Notice
By installing this extension, you agree to the Terms of Service.