Simple CLI Application for batch removing GitHub Copilot WebUI threads (chats).
First, you need to retrieve your Copilot token. To do so, open the copilot page and run in console:
localStorage.getItem("COPILOT_AUTH_TOKEN")You will find your token under value field.
NOTE: token you retrieve has a short TTL, so if you getting any token-related errors, retrieve your token again.
Run the application with Copilot token you retrieved earlier as a command-line argument:
./gh-copilot-remove-chats <token>Or for development, run inside project directory:
go run . <token>You will be prompted with options:
- Enter
1to delete all threads. - Enter
2to select threads for deletion (feature not implemented yet).
The application will use the provided token to make requests to the Copilot API to fetch and delete threads. If the token is invalid or expired, you will see an error message.
main.go: Entry point, needed functionstypes.go: Type definitionsgo.mod: Go module definition
To build the application, run:
go build -o ./build/gh-copilot-remove-chats ./src