This is a simple GitHub Copilot Chat extension that simply echo's what you say. This sample is developed using Node.js with no particular host in mind. If you plan to deploy to Azure Functions, check out this repository.
Tip
This extension is inspired by the basic tutorial video from @ambilykk. Do check it out!
Pre-requisites: GitHub Debug CLI: see gh debug-cli
Run the app locally:
npm install
npm start
In a new terminal, use the gh debug-cli
:
export URL="http://localhost:3000" #if using Windows Command Prompt, use `set` instead of `export`
gh debug-cli
- Open this repo in GitHub Codespaces
npm install
andnpm start
- In the Ports tab, right-click the Forwarded Address and change Port Visibility to Public
- Copy the Forwarded Address URL
- Go to your GitHub Profile → Settings → Developer settings → New GitHub App
- Fill in the some initial values:
- the GitHub App name is going to be the
@agentname
that you'll use in the GH Copilot Chat - for test purposes, you may disable/uncheck "Request user authorization (OAuth) during installation"
- Click Copilot from the navigation bar on the left
- Change App Type to Agent
- Change URL to the public Forwarded Address URL of your GitHub Codespaces in step 4 above (this is also the URL you change when you deploy your extension publicly)
- Change Inference description to the message you want your users to see on the chat box
- In GitHub.com, open the GitHub Copilot Chat window
- Type your
@app-name Hi!
and hit ENTER (Note: The agent won't show up until you do this for the first time) - Start chatting in GitHub.com or in VSCode!