Skip to content

aktsmm/copilot-browser-bridge-vscode

Repository files navigation

GitHub Copilot Browser Bridge for VS Code

VS Code Marketplace License: CC BY-NC-SA 4.0 GitHub

🔗 VS Code extension that bridges browser pages with LLM (GitHub Copilot / Local LLM) for analysis and interaction

Install from VS Code Marketplace

Japanese / 日本語版はこちら

License

CC BY-NC-SA 4.0 — see LICENSE.

📥 Installation

VS Code Marketplace

code --install-extension yamapan.copilot-browser-bridge-vscode

Or search for "GitHub Copilot Browser Bridge" in VS Code Extensions (Ctrl+Shift+X)

Manual Installation

  1. Download .vsix from Releases
  2. VS Code: Ctrl+Shift+PExtensions: Install from VSIX...
  3. Select the downloaded .vsix file

📋 Requirements

🎮 Usage

  1. Launch VS Code (server starts automatically)
  2. Open Chrome extension side panel
  3. Enter questions or operation instructions on any web page

Commands

  • GitHub Copilot Browser Bridge: Start Server - Manually start the server
  • GitHub Copilot Browser Bridge: Stop Server - Stop the server

⚙️ Settings

Setting Default Description
copilotBrowserBridge.serverPort 3210 Local server port number
copilotBrowserBridge.autoStart true Auto-start server on VS Code launch
copilotBrowserBridge.enableAgentTerminalTool false Allow a small read-only subset of agent run_terminal commands
copilotBrowserBridge.enableCopilotCliFallback true Allow GitHub Copilot CLI fallback when VS Code model access is unavailable
copilotBrowserBridge.allowedExtensionOrigins [] Additional allowed chrome-extension:// origins (only enforced when an Origin header is present)

Bridge behavior

  • The Chrome side can now save generated Markdown to a workspace-relative path through the VS Code bridge
  • If workspace-relative save is requested without an open workspace, the Chrome extension falls back to browser downloads
  • The Chrome side primary provider setting can choose Auto, VS Code Language Model API, or LM Studio
  • Auto prioritizes VS Code Language Model API for both chat and browser-agent work. GitHub Copilot CLI is reserved for the last answer fallback. LM Studio is used only when explicitly selected
  • The GitHub Copilot SDK route uses the Public Preview @github/copilot-sdk and is exposed only as an experimental/advanced fallback diagnostic; VS Code extension hosts can resolve process.execPath to Code/Electron instead of node, so SDK runtime availability is gated before use
  • GitHub Copilot CLI can be used as a last-resort fallback response path when VS Code language model access is unavailable
  • Copilot model selection is live-only: static fallback model IDs are not selectable when the bridge cannot return user-visible Copilot models
  • LM Studio endpoints are restricted to localhost / loopback addresses for safety

Request authorization model

  • The server binds to 127.0.0.1 only and authorizes protected routes via the X-Copilot-Bridge-Client: chrome-extension header. A cross-site page cannot set this custom header without a CORS preflight, which only allowed extension origins pass.
  • An Origin header is not required: Chrome omits it when the extension fetches a host it already holds host_permissions for (the local bridge), so requiring it would break the side panel. When an Origin header is present, it must match the official store origin or one of allowedExtensionOrigins.

🔧 Development

# Run unit tests
npm run test

# Build
npm run compile

# Watch mode
npm run watch

# Create VSIX package
npx @vscode/vsce package

📄 License

CC BY-NC-SA 4.0 © aktsmm

📑 Third-Party Notices

🔒 Privacy

  • Data Collection: None
  • Communication: Only operates on localhost using the configured port (default: localhost:3210)
  • External Transmission: Only sent to Copilot/Local LLM based on provider selection

🔗 Related Projects

👤 Author

yamapan (https://github.com/aktsmm)

About

VS Code extension to bridge browser pages with GitHub Copilot / LLM - companion to Chrome extension

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors