A VS Code extension to open Copilot Chat from Tabby, or any other external application.
Features
This extension starts a local TCP server that listens for connections. When a connection is made, it triggers the workbench.action.chat.openInNewWindow command in VS Code, opening the Copilot Chat window.
This allows for seamless integration with external tools like the Tabby terminal, enabling you to open Copilot Chat with a single command.
How to Use
Install the extension: Install the .vsix file from the releases page or by building it from source.
Reload VS Code: Ensure the extension is activated by reloading VS Code.
Trigger from a script: Use a script to connect to the TCP server on port 6789.
Example PowerShell Script
try {
$tcpClient = New-Object System.Net.Sockets.TcpClient("127.0.0.1", 6789)
$stream = $tcpClient.GetStream()
$writer = New-Object System.IO.StreamWriter($stream)
$writer.Flush()
$reader = New-Object System.IO.StreamReader($stream)
$response = $reader.ReadToEnd()
Write-Host "Server response: $response"
}
catch {
Write-Host "Failed to connect to VS Code. Make sure the tabby-copilot-opener extension is running."
}
finally {
if ($tcpClient) {
$tcpClient.Close()
}
}
For Tabby Users
When used with the Tabby terminal, this extension provides a much faster and more reliable way to open Copilot Chat compared to the default PowerShell method. The tabby-vscode-agent will automatically detect if this extension is installed and use it.