Using GitHub Copilot Chat
You can use GitHub Copilot Chat in a Che workspace with the Code - OSS editor by installing the Dev Spaces Copilot Chat Integration extension (version 0.36.2) and authenticating with your GitHub account.
-
A GitHub account with an active GitHub Copilot subscription.
-
A running Che workspace with the Code - OSS editor.
-
Install version 0.36.2 of the Dev Spaces Copilot Chat Integration extension.
Choose one of the following options depending on your Open VSX registry configuration:
-
If your Che instance is configured to use the public Open VSX registry or a standalone Open VSX registry that contains the extension:
Open the Extensions view by pressing Ctrl+Shift+X, search for
Dev Spaces Copilot Chat Integration, select version 0.36.2, and click Install. -
If your Che instance uses the default embedded Open VSX registry or a registry that does not contain the extension, install it manually from a
.vsixfile:Download the
.vsixfile from the Open VSX registry, then press F1 to open the Command Palette and runExtensions: Install from VSIX….
Use version 0.36.2 of the extension. Other versions may not be compatible with the current Che editor.
-
-
Authenticate using Device Authentication.
Press F1 to open the Command Palette, type
GitHub: Device Authentication, and select the command.You must complete Device Authentication before attempting to use AI features. Initiating "Sign in to use AI Features" without a valid device authentication token causes authentication errors that require signing out and re-authenticating.
-
Complete the device authentication flow.
A notification appears with a device code. Click the link to open the GitHub device activation page in your browser, paste the code, and authorize access.
-
Refresh the browser page.
After successful authentication, a notification prompts you to refresh the browser page. Refresh the page to apply the authentication token. Copilot Chat is authenticated automatically and ready to use.
-
The Copilot Chat panel opens and responds to prompts.
|
Device Authentication is a one-time step. The credentials are saved as a Kubernetes object and persist across workspaces on the same cluster. |
If you attempted to use Copilot Chat before completing Device Authentication, the extension may enter an error state. Typical symptoms include:
-
Copilot Chat appears to be connected but does not respond to prompts.
-
The Copilot Chat output log contains errors such as:
Failed to get copilot token. reason: NotAuthorized GitHub Copilot could not connect to server. Extension activation failed: "Failed to get copilot token. reason: NotAuthorized"
This happens when Sign in to use AI Features is triggered before a valid Device Authentication token exists.
To recover:
-
Click the Accounts icon on the left activity bar, select your account, and click Sign Out. A confirmation dialog appears indicating the account has been used by the Dev Spaces Copilot Chat Integration. Click Sign Out to confirm.
-
Press F1 to open the Command Palette and run
GitHub: Device Authentication. Complete the device authentication flow in the browser. -
Refresh the browser page when prompted. Copilot Chat is now ready to use.