GitHub Copilot subscription, or LM Studio (Local LLM)
🎮 Usage
Launch VS Code (server starts automatically)
Open Chrome extension side panel
Enter questions or operation instructions on any web page
Commands
AI Browser Bridge: Start Server - Manually start the server
AI 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