跳到正文

Guide to Using VSCode Github Copilot with 开桥 ​

Overview ​

Visual Studio Code Copilot is an AI programming assistant from Microsoft integrated into the VS Code editor. It provides intelligent suggestions, auto-completion, and code generation as you write code. With 开桥, you can use your own API key to power VS Code Copilot, enjoying a more flexible and cost-effective AI programming experience.

Usage Tips

  • Ensure your VS Code version is up to date.
  • Have your 开桥 API key ready.
  • It is recommended to read the full guide first to understand the detailed configuration steps.

Quick Start ​

Start your 开桥 Copilot journey in just a few simple steps:

  1. Install Visual Studio Code version 1.104.0 or higher.
  2. 📥 Install Extension: 点击here to install the plugin.
  3. 💬 Open Copilot: Open the GitHub Copilot Chat interface in VS Code.
  4. ⚙️ Manage Models: 点击the model selector below the chat input box and choose "Manage Models...".
  5. ✅ Select 开桥: 点击"Add Models" and select the "开桥" provider.
  6. 🔑 Configure Key: Enter your 开桥 API Key (the key will be securely stored locally).
  7. 🎯 Pick Model: Select the specific models you wish to use in the model selector.

Detailed Configuration Instructions ​

1. Version Requirements ​

Ensure your VS Code version is 1.104.0 or higher. You can check your current version in the following ways:

  1. GUI Method:

    • macOS: 点击menu bar Code > About Visual Studio Code
    • Windows/Linux: 点击menu bar Help > About
  2. Command Line Method:

    bash
    code --version

Version Check

  • If the command line shows a version lower than 1.104.0
  • Or the GUI shows a version that does not meet the requirements
  • 请go to the VS Code Official Website to download the latest version

If you cannot update directly, consider:

  • Updating using a package manager (like Homebrew)
  • Downloading and manually installing the latest version
  • Contacting your IT support team for assistance with the upgrade

2. Install 开桥 Copilot Extension ​

There are two ways to install:

Method 1: Via VS Code Marketplace

  1. Open VS Code.
  2. 点击the Extensions icon in the left activity bar (or use shortcut Cmd+Shift+X / Ctrl+Shift+X).
  3. Type "开桥" in the search box.
  4. Find the extension published by hugehardzhang and click Install.

Search and install 开桥 Copilot extension in VS Code Marketplace

Method 2: Direct Link Installation

  1. 点击开桥 Copilot Extension Page.
  2. 点击the Install button; the browser will prompt to open VS Code.
  3. Confirm installation in VS Code.

3. Open Copilot Chat Interface ​

After installation, you can open Copilot Chat in any of the following ways:

  • 点击the Copilot Chat icon in the left activity bar.
  • Use shortcut Cmd+Shift+I (macOS) or Ctrl+Shift+I (Windows/Linux).
  • Press Cmd+Shift+P / Ctrl+Shift+P to open the Command Palette and type "Chat: Focus on Chat View".

Open VS Code Copilot Chat InterfaceOpen VS Code Copilot Chat Interface Select manage models

4. Manage and Configure Models ​

In the Copilot Chat interface:

  1. Find the Model Selector above the chat input box (usually displays the currently selected model name).
  2. 点击the model selector and choose "Manage Models..." from the dropdown menu.
  3. In the pop-up model management interface, click the "Add Models" button.
  4. Find and select "开桥" from the provider list.

Manage models in Copilot Chat and add 开桥 provider

5. Configure API Key ​

  1. After selecting 开桥, you will see an API Key input box.
  2. Enter your 开桥 API Key (if you don't have one, please visit https://openqiao.com to register and get one).
  3. The API key will be securely encrypted and stored locally; it will not be uploaded to any server.

Enter 开桥 API Key for configuration

Security Note

Your API key is stored only in the VS Code configuration on your local computer using an encrypted storage mechanism. 请keep your key safe and do not share it with others.

6. Select Available Models ​

After configuring the key, you can select the models you want to display in the model selector:

  • ✅ Check the models you want to use (multiple selection supported).
  • Recommended models include:
    • gpt-4o: Excellent comprehensive capabilities, fast response speed.
    • gpt-4-turbo: More cost-effective, suitable for daily use.
    • gemini-pro: Google's advanced model with strong code understanding capabilities.

Select 开桥 models to use in CopilotSelect 开桥 models to use in Copilot

7. Start Using ​

Once configured, you can:

  • Switch between different 开桥 models in the model selector.
  • Get intelligent completion suggestions while typing code in the editor.
  • Use the Chat interface to converse with AI and get programming help.

Keyboard Shortcuts ​

Shortcut Usage Instructions

  • Shortcuts can greatly improve your coding efficiency.
  • Shortcuts differ slightly between operating systems; please note the distinction.
ActionmacOSWindows/LinuxUsage Scenario
Open ChatCmd+Shift+ICtrl+Shift+IQuickly open the AI chat interface
Inline ChatCmd+ICtrl+IInteract with AI directly in the current code line
Accept SuggestionTabTabAccept code completion recommended by AI
Reject SuggestionEscEscCancel the current code suggestion
Next SuggestionOption+]Alt+]View the next available code suggestion
Previous SuggestionOption+[Alt+[View the previous available code suggestion
Trigger CompletionOption+\Alt+\Manually trigger AI code completion

Shortcut Notes

  • Some shortcuts may conflict with system or other software shortcuts.
  • If conflicts occur, you can customize shortcuts in VS Code settings.

Changelog ​

If you have questions or suggestions, feel free to provide feedback via GitHub Issues.