Files
qwen-code/packages/vscode-ide-companion
易良 65796e2799 Fix/vscode ide companion completion menu content (#1243)
* refactor(vscode-ide-companion/types): move ApprovalModeValue type to dedicated file

feat(vscode-ide-companion/file-context): improve file context handling and search

Enhance file context hook to better handle search queries and reduce redundant requests.
Track last query to optimize when to refetch full file list.
Improve logging for debugging purposes.

* feat(vscode-ide-companion/completion): enhance completion menu performance and refresh logic

Implement item comparison to prevent unnecessary re-renders when completion items
haven't actually changed. Optimize refresh logic to only trigger when workspace
files content changes. Improve completion menu stability and responsiveness.

refactor(vscode-ide-companion/handlers): remove SettingsMessageHandler and consolidate functionality

Move setApprovalMode functionality from SettingsMessageHandler to SessionMessageHandler
to reduce code duplication and simplify message handling architecture. Remove unused
settings-related imports and clean up message router configuration.

chore(vscode-ide-companion/ui): minor UI improvements and code cleanup

Consolidate imports in SessionSelector component.
Remove debug console log statement from FileMessageHandler.
Move getTimeAgo utility function to sessionGrouping file and remove obsolete timeUtils file.
Clean up completion menu CSS classes.

* fix(vscode-ide-companion): resolve all ESLint errors

Fixed unused variable errors in SessionMessageHandler.ts:
- Commented out unused conversation and messages variables

Also includes previous commits:
1. feat(vscode-ide-companion): add upgrade button to CLI version warning
2. fix(vscode-ide-companion): resolve ESLint errors in InputForm component

When the Qwen Code CLI version is below the minimum required version,
the warning message now includes an "Upgrade Now" button that opens
a terminal and runs the npm install command to upgrade the CLI.

Added tests to verify the functionality works correctly.
2025-12-13 17:37:45 +08:00
..
2025-07-22 23:26:01 +08:00
2025-08-19 18:20:40 +08:00
2025-12-12 16:29:50 +08:00

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:

  1. Clone the repository

    git clone https://github.com/QwenLM/qwen-code.git
    cd qwen-code
    
  2. Install dependencies

    npm install
    # or if using pnpm
    pnpm install
    
  3. Start debugging

    code .  # Open the project root in VS Code
    
    • Open the packages/vscode-ide-companion/src/extension.ts file
    • Open Debug panel (Ctrl+Shift+D or Cmd+Shift+D)
    • Select "Launch Companion VS Code Extension" from the debug dropdown
    • Press F5 to launch Extension Development Host
  4. 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) or Cmd+R (macOS)
      • Or clicking the "Reload" button in the debug toolbar
  5. 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 Tools to 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.