Skip to content

Commit fbcb09f

Browse files
procedures: Document GitHub Copilot Chat usage (#3097)
* procedures: Document GitHub Copilot Chat usage Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Assisted-by: Cursor AI * docs: whitelist URLs in air-gapped env for Copilot Chat usage Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Assisted-by: Cursor AI * Improve doc related to GitHub Copilot Chat usage Co-authored-by: Gaurav Trivedi <90042568+gtrivedi88@users.noreply.github.com> * chore: Avoid hardcoded version usage for the Copilot extension Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Assisted-by: Cursor AI --------- Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Assisted-by: Cursor AI Co-authored-by: Gaurav Trivedi <90042568+gtrivedi88@users.noreply.github.com>
1 parent 55dc6a0 commit fbcb09f

3 files changed

Lines changed: 90 additions & 0 deletions

File tree

modules/end-user-guide/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* xref:devfile-introduction.adoc[]
3535
* xref:ides-in-workspaces.adoc[]
3636
** xref:microsoft-visual-studio-code-open-source-ide.adoc[]
37+
*** xref:using-github-copilot-chat.adoc[]
3738
** xref:connect-visual-studio-code-to-che-workspace.adoc[]
3839
** xref:defining-a-common-ide.adoc[]
3940
* xref:using-credentials-and-configurations-in-workspaces.adoc[]

modules/end-user-guide/pages/microsoft-visual-studio-code-open-source-ide.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ You can automate installation of Microsoft Visual Studio Code extensions from th
3232
Configure IDE preferences on a per-workspace basis by invoking the link:https://code.visualstudio.com/api/ux-guidelines/command-palette[Command Palette] and selecting *Preferences: Open Workspace Settings*.
3333
====
3434

35+
TIP: To use GitHub Copilot Chat in your workspace, see xref:using-github-copilot-chat.adoc[].
36+
3537
NOTE: You might see your organization's branding in this IDE if your organization customized it through a branded build.
3638

3739
include::partial$proc_automating-installation-of-microsoft-visual-studio-code-extensions-at-workspace-startup.adoc[leveloffset=+1]
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
:_content-type: PROCEDURE
2+
:description: Set up GitHub Copilot Chat in a Che workspace
3+
:keywords: copilot, github-copilot, copilot-chat, ai, extensions
4+
:navtitle: Set up GitHub Copilot Chat
5+
:copilot-ext-ver: 0.36.2
6+
7+
[id="using-github-copilot-chat"]
8+
= Set up GitHub Copilot Chat
9+
10+
To get AI-assisted coding suggestions in your {prod-short} workspace, install the link:https://open-vsx.org/extension/redhat/devspaces-copilot-chat-integration/0.36.2[Dev Spaces Copilot Chat Integration] extension (version {copilot-ext-ver}) and authenticate with your GitHub account.
11+
12+
.Prerequisites
13+
14+
* A GitHub account with an active link:https://github.com/features/copilot[GitHub Copilot] subscription.
15+
* A running {prod-short} workspace with the Code - OSS editor.
16+
* The following URLs must be accessible from the workspace (ensure they are added to the allowlist if you are in a restricted or air-gapped environment):
17+
+
18+
--
19+
** `https://github.com`
20+
** `https://api.github.com`
21+
** `https://api.githubcopilot.com`
22+
--
23+
24+
.Procedure
25+
26+
. Install version {copilot-ext-ver} of the *Dev Spaces Copilot Chat Integration* extension.
27+
+
28+
Choose one of the following options depending on your Open VSX registry configuration:
29+
+
30+
--
31+
* If your {prod-short} instance is configured to use the link:https://open-vsx.org[public Open VSX registry] or a standalone Open VSX registry that contains the extension:
32+
+
33+
Open the Extensions view by pressing kbd:[Ctrl+Shift+X], search for `Dev Spaces Copilot Chat Integration`, select version *{copilot-ext-ver}*, and click *Install*.
34+
35+
* If your {prod-short} instance uses the default embedded Open VSX registry or a registry that does not contain the extension, install it manually from a `.vsix` file:
36+
+
37+
Download the `.vsix` file from the link:https://open-vsx.org/extension/redhat/devspaces-copilot-chat-integration/0.36.2[Open VSX registry], then press kbd:[F1] to open the Command Palette and run `Extensions: Install from VSIX...`.
38+
--
39+
+
40+
[IMPORTANT]
41+
====
42+
Use version {copilot-ext-ver} of the extension. Other versions may not be compatible with the current {prod-short} editor.
43+
====
44+
45+
. Authenticate using Device Authentication.
46+
+
47+
Press kbd:[F1] to open the Command Palette, type `GitHub: Device Authentication`, and select the command.
48+
+
49+
IMPORTANT: 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.
50+
51+
. Complete the device authentication flow.
52+
+
53+
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.
54+
55+
. Refresh the browser page.
56+
+
57+
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.
58+
59+
.Verification
60+
61+
* Open the Copilot Chat panel, type a prompt such as "Explain this file", and verify that a response appears.
62+
63+
[NOTE]
64+
====
65+
Device Authentication is a one-time step. The credentials are saved as a Kubernetes object and persist across workspaces on the same cluster.
66+
====
67+
68+
.Troubleshooting
69+
70+
If you attempted to use Copilot Chat before completing Device Authentication, the extension may enter an error state. Typical symptoms include:
71+
72+
* Copilot Chat appears to be connected but does not respond to prompts.
73+
* The Copilot Chat output log contains errors such as:
74+
+
75+
[source,text]
76+
----
77+
Failed to get copilot token. reason: NotAuthorized
78+
GitHub Copilot could not connect to server. Extension activation failed: "Failed to get copilot token. reason: NotAuthorized"
79+
----
80+
81+
This happens when *Sign in to use AI Features* is triggered before a valid Device Authentication token exists.
82+
83+
To recover:
84+
85+
. 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.
86+
. Press kbd:[F1] to open the Command Palette and run `GitHub: Device Authentication`. Complete the device authentication flow in the browser.
87+
. Refresh the browser page when prompted. Copilot Chat is now ready to use.

0 commit comments

Comments
 (0)