Open Tushar49 opened 1 year ago
I have given a try to the steps mentioned in that issue as well, but it only deals with CoPilot Nightly extension issue, and not the Copilot labs as well as Copilot chat issues.
+1 Have had copilot work flawlessly using the steps above for some months, but now that I have access to Chats it's not showing up in the activity bar even though it does in Vscode (re-installed for the first time in a long time just to test it out 😔) and the following inline commands are not showing up either:
Appreciate all you do maintainers. Could be that we just accept the trade off?
Is this something we could help with in VSCodium at all - or should we just link the discussion issue in the wiki and close this issue?
This is an issue that Copilot chat oesnt work
The issue is that this extension is both proprietary and closed-source and only "blesses" the MS binaries; the question is therefore: can we do anything about this in vscodium directly - like adjusting the distributed product.json?
If not then the discussion issue seems to be a better place to check what/how something works and to document the result in the wiki - like we do for other MS extensions - or place a link to the discussion there.
The real solution to this issue would be of course that the extension is made public and under a free license (even if the endpoint needs online access which is stored behind an access token) and does not need any "blessing"but work on the OSS version of vscode out-of-the-box. But that's to be requested in the Copilot issue tracker and/or the vscode repo.
Yes, it's possible to make Copilot Chat work by tweaking some lines in the product.json file. However, I haven't managed to do this for the VScode Figma extension🥲 We definitely need someone to explain what's going on in the product.json file.
I was able to log into figma extension with duti util: duti -s com.vscodium vscode
Yes, it's possible to make Copilot Chat work by tweaking some lines in the product.json file.
@wtf403 Would you mind sharing what tweaks are needed to get this working? I'm using VSCodium Insider, and have the Copilot Chat extension installed. Regular Copilot features work but Chat doesn't. The extension logs for Copilot Chat say
[INFO] [auth] [2023-07-05T16:11:08.579Z] GitHub login failed
[ERROR] [default] [2023-07-05T16:11:08.583Z] You are not signed in to GitHub. Please sign in to use Copilot.
even though I am definitely logged in (since regular Copilot works).
Edit: forgot to mention but I'm also in the Chat private beta.
@movq Sorry, for now, I can't 🙃 I recently reinstalled VSCodium and overwrote the product.json file. After that, the student subscription on connected GitHub account expired🤣 Currently i'm in Copilot Chat waitlist. Not sure how to make it work again.
I just downloaded the latest VS Codium and the latest Copilot Chat extension, and when I try to install the .vsix file, I got this error:
not that hard to fix, edit
/Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Resources/app/product.json 2023-07-07 21:04:37```
and rename the app from VSCodium to vscode. download zipped vsix from webstore or from
`
~/Library/Application\ Support/Visual\ Studio\ Code/CachedExtensionVSIXs
`
unzip it and edit the package.json to accept vscodium, and change min version
As multiple users reported, Copilot Chat is not available (ofc I have beta access and I have it working flawlessly on VSCode Insiders). Other than that, I just got the following error message from Github Copilot Labs extension:
1487
Not helpful, we're dealing with GitHub Copilot Chat extension here
Hey, has anyone who has access to chat (and lab) have tried the insider edition of vscodium? https://github.com/VSCodium/vscodium-insiders
It will also be nice if a link of insider to be added to README since it is not obvious that it exists.
not that hard to fix, edit
/Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Resources/app/product.json 2023-07-07 21:04:37``` and rename the app from VSCodium to vscode. download zipped vsix from webstore or from ` ~/Library/Application\ Support/Visual\ Studio\ Code/CachedExtensionVSIXs ` unzip it and edit the package.json to accept vscodium, and change min version
i have installed it but the app does not show up in the left bar
I opened an issue for copilot chat. Feel free to upvote and add any details/comments to it
Hey, has anyone who has access to chat (and lab) have tried the insider edition of vscodium? https://github.com/VSCodium/vscodium-insiders
It will also be nice if a link of insider to be added to README since it is not obvious that it exists.
Done with https://github.com/VSCodium/vscodium/commit/b6676144488271e25cf8f4d9cdb7ebfde136ec90 :-) ... along with the request to add insider version where not available
It sends the editor version in the request to copilot, u need to edit extension.js and hardcode the editor version value in as vscode/insiders
@clockcoinG1 I assume you are talking about the chat extension.js.
I am going through it right now (unfortunately) but it is way too many lines and I am no expert in js. Which part of the extension.js do I need to change?
It seems like it is trying to call the getSession from the vscode module but it returned undefined.
return await vscode.authentication.getSession("github", ['user:email'], {silent: !0}) ??
await vscode.authentication.getSession("github", ['read:user'], {silent: !0});
this is under __webpack_modules__
in 31041
in t.getSession
if anyone is interested enough to dive in.
Seems like it is similar to microsoft/vscode-pull-request-github#1778
@clockcoinG1 I assume you are talking about the chat extension.js.
I am going through it right now (unfortunately) but it is way too many lines and I am no expert in js. Which part of the extension.js do I need to change?
Search `Bearer ${ in extension.js ( ~/.vscode-insiders/extensions/github-copilot-chat/dist/ add console.log there edit the Editor Version header to be hardcoded to vscode/1.83-insiders
copy the same editor version and hardcode it into the Bearer request so insteadof using the getEditorVersion function it just uses vscode/insiders. The endpoint used requires compatible header of editor version to get the authtoken. If you dont have then open dev panel
Here you see it pulling the version, change that to vscode/1.83.0-insider:
if it still doesnt work run it with GH_COPILOT_TOKEN, or GITHUB_TOKEN, env var and run it
Hardcode editor version into the headers or edit the getEditorVersion function to return a constant.
as long as ur editor version is compatible u can fetch to the completion endpoint "https://api.githubcopilot.com/chat/completions"
also in /Applications/VSCodium.app/Contents/Resources/app/product.json
u can change product dataFolderName to .vscode-insiders and the product name to VSCode - Insiders , get it running on insiders then close it and run codium with that as its dataDIrectory. add these lines to
extensionEnabledApiProposals as well:
"GitHub.copilot": ["inlineCompletionsAdditions", "interactive", "interactiveUserActions", "terminalDataWriteEvent"], "GitHub.copilot-nightly": ["inlineCompletionsAdditions", "interactive", "interactiveUserActions", "terminalDataWriteEvent"], "GitHub.copilot-chat": ["handleIssueUri", "interactive", "interactiveUserActions", "terminalContextMenu", "terminalDataWriteEvent", "terminalSelection", "terminalQuickFixProvider", "chatProvider", "chatSlashCommands", "chatVariables", "chatAgents", "readonlyMessage", "mappedEditsProvider", "aiRelatedInformation"],
Could someone provide a step by step explanation of that? @clockcoinG1 perhaps? Or could this be put into some "CoPilot Chat Installer" script or even extension? I'm finding it difficult to see which are now the exact steps after the multiple answers given.
Thanks to all
Yeah, I tried to follow the instructions but failed to even reach the point where @clockcoinG1 got. It failed before sending any of the authentication tokens, where it couldn't even start a session. I gave up after that since it was really a major pain to debug it.
It is possible that I might have missed something but that's as far as I got.
To be fair, the version of chat I was using seems to be different from @clockcoinG1 as well so that could also be a reason.
Ideally the vscode team should fix this, it will be great if you guys can upvote the issue if you haven't.
I would try to just rename the app name and datadirs to vscode-insiders, and enable copilot chat in preferences rename vscodium-oss to vsdode-insiders
/Applications/VSCodium.app/Contents/Resources/app/product.json
I just managed to hack / patch VSCode OSS's product.json
+ the extension's /extension/package.json
to get GitHub.copilot-chat-0.9.2023102002
working on Manjaro's packaged:
extra/code 1.83.0-1
aur/code-features 1.83.0-1 (+49 1.12)
Note: (For ArchLinux-based distros) The extra/code
repo/package is known as "Code OSS" variant of a VSCodium distribution. Meanwhile, the aur/code-features
repo/package also patches the /usr/lib/code/product.json
to enable some API proposals and other things.
The changes I had to make on top of this were in the following diff (note my /usr/lib/code/product.json
had tab indentations instead of spaces, so this diff may not apply cleanly for everyone without ignoring whitespace):
--- a/product.json 2023-10-20 11:17:19.854726954 -0600
+++ b/product.json 2023-10-20 11:20:43.678596193 -0600
@@ -534,20 +534,26 @@
"inlineCompletionsAdditions"
],
"GitHub.copilot-chat": [
- "handleIssueUri",
"interactive",
"interactiveUserActions",
- "terminalContextMenu",
+ "chatProvider",
+ "codeActionAI",
+ "findTextInFiles",
+ "textSearchProvider",
"terminalDataWriteEvent",
+ "terminalExecuteCommandEvent",
"terminalSelection",
"terminalQuickFixProvider",
- "chatSlashCommands",
- "chatVariables",
- "chatAgents",
+ "handleIssueUri",
"readonlyMessage",
- "chatProvider",
+ "chatVariables",
"mappedEditsProvider",
- "aiRelatedInformation"
+ "aiRelatedInformation",
+ "chatAgents",
+ "chatAgents2",
+ "chatAgents2Additions",
+ "defaultChatAgent",
+ "contribSourceControlInputBoxMenu"
],
"GitHub.remotehub": [
"contribRemoteHelp",
Finally, the other necessary change was to unpack the .vsix
and edit: extension/package.json
to modify the supported version pin under "engines": { "vscode": "__VERSION_HERE", ... }
I changed it from: ^1.84.0-20231017
to mach my version of /usr/bin/code --version
$ /usr/bin/code --version
1.83.0
e7e037083ff4455cf320e344325dacb480062c3c
x64
Relevant part of extension/package.json
:
"engines": {
"vscode": ">=1.83.0",
"npm": ">=9.0.0",
"node": ">=18.0.0"
}
Quit VSCode if running
Backup /usr/lib/code/product.json
cp /usr/lib/code/product.json /path/to/backup-directory/product.json.$(date +%Y-%m-%d).bak
Patch /usr/lib/code/product.json
cd /usr/lib/code && sudo patch -p1 --ignore-whitespace < /path/to/product_json.patch
Unpack .vsix
:
mkdir /tmp/GitHub.copilot-chat-0.9.2023102002.vsix.unpacked unzip -d /tmp/GitHub.copilot-chat-0.9.2023102002.vsix.unpacked/ ~/Downloads/GitHub.copilot-chat-0.9.2023102002.vsix
Change extension/package.json
(it's a minified JSON, so search for engines
)
vim /tmp/GitHub.copilot-chat-0.9.2023102002.vsix.unpacked/extension/package.json
Save the file & quit editor
Repack the patched .vsix
:
cd /tmp/GitHub.copilot-chat-0.9.2023102002.vsix.unpacked zip -r /tmp/GitHub.copilot-chat-0.9.2023102002.patched-0.83-0.vsix .
Manually install the patched .vsix
:
Code OSS
Extensions
(Ctrl+Shift+x)Views and More Actions...
")Install from VSIX...
".vsix
file: /tmp/GitHub.copilot-chat-0.9.2023102002.patched-0.83-0.vsix
Optional, but recommended: Copy the patched .vsix
installer to somewhere for backup purposes
cp /tmp/GitHub.copilot-chat-0.9.2023102002.patched-0.83-0.vsix ~/path/to/some/vsix/installers-backupdir
@trinitronx I believe your patch file specifically calls out line 534
while in my version of the file it's somewhere else. The patch
command won't work then. Anyone else reproducing this would need to adapt that.
@trinitronx I believe your patch file specifically calls out line
534
while in my version of the file it's somewhere else. Thepatch
command won't work then. Anyone else reproducing this would need to adapt that.
Yes, that's to be expected. Especially so, given that this patch was generated on Manjaro against the already patched product.json
(by the aur/code-features package). As such, it's safe to assume that it may not apply cleanly to every distro's product.json
file given the differences in line numbers, etc...
One trick is to try applying it with fuzz level increased (e.g. fuzz
>2
):
cd /usr/lib/code && sudo patch --fuzz=3 -p1 --ignore-whitespace < /path/to/product_json.patch
Another trick is to modify the line numbers in the unified patch format to match your variant of the file (change NNN
to match your file's starting line number that matches the patch context):
--- a/product.json 2023-10-20 11:17:19.854726954 -0600
+++ b/product.json 2023-10-20 11:20:43.678596193 -0600
@@ -NNN,20 +NNN,26 @@
Of course, any patch
-based method is prone to hunks being rejected and failing to patch cleanly. Manual editing is the best bet in this case. I guess this is also why the aur/code-features package scripts do the JSON patch/merge in Python instead.
Thanks to @trinitronx for those instructions! I've looked through the JSON for aur/code-features
+ the patch they provided and I think I've worked out which tweaks specifically fix it. Here is what should be the minimum amount you need to add to product.json
to enable Copilot and Chat:
"extensionEnabledApiProposals": {
"GitHub.copilot": [
"inlineCompletionsAdditions",
"interactive",
"interactiveUserActions",
"terminalDataWriteEvent"
],
"GitHub.copilot-nightly": [
"inlineCompletionsAdditions",
"interactive",
"interactiveUserActions",
"terminalDataWriteEvent"
],
"GitHub.copilot-chat": [
"handleIssueUri",
"interactive",
"interactiveUserActions",
"terminalDataWriteEvent",
"terminalExecuteCommandEvent",
"terminalSelection",
"terminalQuickFixProvider",
"chatProvider",
"chatVariables",
"chatAgents",
"chatAgents2",
"chatAgents2Additions",
"defaultChatAgent",
"readonlyMessage",
"mappedEditsProvider",
"aiRelatedInformation",
"codeActionAI",
"findTextInFiles",
"textSearchProvider"
]
},
"trustedExtensionAuthAccess": [
"github.copilot",
"github.copilot-chat"
],
Sometimes the exact APIs requested change from update-to-update; if it stops working, first step is to search the console for errors including API proposal
, see if you can find what it's requesting, and update extensionEnabledApiProposals
accordingly.
I was actually able to install Chat from the store directly in the latest Insiders build, neat! But if that ever stops working, you can download the VSIX file from the Version History
tab here and then apply the specified extension/package.json
patch from trinitronx's post and it should work.
edit: oops, didn't read the full thread
I still can't get it to work...
Codium version: 1.85.1 Extensions version: GitHub.copilot@1.143.0 GitHub.copilot-chat@0.12.2023120701 OS: Nobara Linux 38 (KDE Plasma)
Settings in product.json
:
"extensionEnabledApiProposals": {
"GitHub.copilot": [
"inlineCompletionsAdditions",
"interactive",
"interactiveUserActions",
"terminalDataWriteEvent"
],
"GitHub.copilot-nightly": [
"inlineCompletionsAdditions",
"interactive",
"interactiveUserActions",
"terminalDataWriteEvent"
],
"GitHub.copilot-chat": [
"handleIssueUri",
"interactive",
"interactiveUserActions",
"terminalDataWriteEvent",
"terminalExecuteCommandEvent",
"terminalSelection",
"terminalQuickFixProvider",
"chatProvider",
"chatVariables",
"chatAgents2",
"chatAgents2Additions",
"defaultChatAgent",
"readonlyMessage",
"mappedEditsProvider",
"aiRelatedInformation",
"codeActionAI",
"findTextInFiles",
"textSearchProvider",
"scmInputBoxValueProvider",
"contribSourceControlInputBoxMenu"
]
},
"trustedExtensionAuthAccess": [
"vscode.git",
"vscode.github",
"github.remotehub",
"github.vscode-pull-request-github",
"github.codespaces",
"github.copilot",
"github.copilot-chat"
],
"trustedExtensionProtocolHandlers": [
"vscode.git",
"vscode.github-authentication"
]
I'm still getting:
2023-12-24 17:08:13.888 [info] [auth] GitHub login failed
2023-12-24 17:08:13.892 [info] [extension] You are not signed in to GitHub. Please sign in to use Copilot.
Receiving the same GitHub login failed
as well. Copilot Chat installed via VSIX was working fine last December
Please complain at the Copilot extension that it does not work with open-source builds of vscode; if they keep changing things then they should either document what is needed or preferably add it in vscode itself.
note that a newer vsix may need an insider build - You didn't try with the old vsix that previously worked, did you? Note that for a working Copilot you may need a newer vsix in general (depends on what they've changed)
I literally just installed vscodium-bin-marketplace and was able to install GitHub Copilot Chat from the VSCodium UI without any issues. No need to manually download .vsix files or manipulate a product.json file after every update.
Depending on how you installed VSCodium, you might prefer one of these options:
For me (having vscodium-bin), my preferred choice was vscodium-marketplace-bin.
I'm using an the latest Manjaro Linux.
I installed GitHub Copilot Chat from the VSCodium UI with the visualstudio marketplace and after fixing a lot of errors with the product.json
, I can not fix: vscodium github-copilot-chat Chat failed to load. Please ensure that the GitHub Copilot Chat extension is up to date.
which appears even if I'm using the pre-release version of the extension. Even though the main copilot extension works.
I installed Copilot and Copilot Chat using the marketplace. I managed to get the login to work by adding "authLearnMore" into "GitHub.copilot-chat" permissions in product.json, restarting vscodium, pressing ctrl+p and ">GitHub Copilot: Sign in to Chat" and going through the auth flow. However, there is still some uncaught error that prevent the chat from working:
[error] Error: chatParticipant must be declared in package.json: github.copilot.default
I keep getting: Uncaught Errors (1)
n.onDidPerformAction is not a function
TypeError: n.onDidPerformAction is not a function at OY.createAgent (/Users/me/.vscode-oss/extensions/github.copilot-chat-0.14.1/dist/extension.js:861:10236) at OY.registerDefaultAgent
I keep getting: Uncaught Errors (1)
n.onDidPerformAction is not a function TypeError: n.onDidPerformAction is not a function at OY.createAgent (/Users/me/.vscode-oss/extensions/github.copilot-chat-0.14.1/dist/extension.js:861:10236) at OY.registerDefaultAgent
Finally got it running. Switching to vscodium-insiders seemed to do the trick.
vscodium stable 1.88.1.24104
works for me with product.json
modifications.
vscodium stable
1.88.1.24104
works for me withproduct.json
modifications.
GitHub Copilot chat released a new version of the extension just a moment ago, which might give you a message like: Unable to install extension 'github.copilot-chat' as it is not compatible with VSCodium '1.x.x.
. So you might need to download an older version or manually changing the extension if you really want to (no guarantees): https://github.com/VSCodium/vscodium/issues/1753#issuecomment-2064992100
GitHub Copilot chat released a new version of the extension just a moment ago, which might give you a message like:
Unable to install extension 'github.copilot-chat' as it is not compatible with VSCodium '1.x.x.
. So you might need to download an older version or manually changing the extension if you really want to (no guarantees): #1753 (comment)
In fact, all latest versions of GitHub Copilot Chat are TOO NEW and they only show the latest 5 versions on the marketplace web site.... omg.
So I needed to use: https://stackoverflow.com/questions/76211091/how-can-i-get-a-list-of-a-vs-code-extensions-versions
So I could execute: vsce show GitHub.copilot-chat --json | jq
Giving me:
.....
{
"version": "0.14.2024031901",
"flags": 1,
"lastUpdated": "2024-03-19T09:42:12.960Z"
},
{
"version": "0.14.2024031802",
"flags": 1,
"lastUpdated": "2024-03-18T16:40:48.993Z"
},
{
"version": "0.14.2024031501",
"flags": 1,
"lastUpdated": "2024-03-15T09:31:21.830Z"
},
....
I'll pick 0.14.2024031901
version. Finally I changed the download URL manually to incorporate the hand picked version (again: 0.14.2024031901
) in the URL, for example: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/GitHub/vsextensions/copilot-chat/0.14.2024031901/vspackage
I also believe now I picked a too old version, so Copilot chat still doesn't work. And if I picked the latest version(s), it's too new for Vscodium.. Aaaahhhh
Then I saw errors that it also needed the GitHub.vscode-pull-request-github
extenstion? So I also downloaded & installed that. I hope it's not required, but OK.
Then I saw errors that it also needed the
GitHub.vscode-pull-request-github
extenstion? So I also downloaded & installed that. I hope it's not required, but OK.
GitHub.vscode-pull-request-github
is not required.
Copilot Chat is just not working with VScodium (just copilot does work, but not Chat):
Again, downloading the latest GitHub Copilot chat for VScodium gives me compatibilities error messages. So either way, we can't use Copilot chat.
It works for me, you have to use the marketplace from VSCode and add the additional lines to your product.json
.
Other than the vscode marketplace, did you use something else? Which version of VSCodium and which extension(s) do you use?
You mean these additions? https://github.com/VSCodium/vscodium/issues/1546#issuecomment-1793619431
I see no reason to not include them by default, @daiyam do you?
I keep getting: Uncaught Errors (1)
n.onDidPerformAction is not a function TypeError: n.onDidPerformAction is not a function at OY.createAgent (/Users/me/.vscode-oss/extensions/github.copilot-chat-0.14.1/dist/extension.js:861:10236) at OY.registerDefaultAgent
@TimTheBig I am getting the same error now, how did you fix this? I'm using Copilot Chat extension v0.14.2024032901
and VSCodium v1.88.1.24104
. Already made all the required changes in the product.json
.
Don't really want to move to the Insiders build though, I would like to stick to my standard VSCodium if possible.
As far as I know you have to use the VS code marketplace. The extension may have been updated, you might have to wait for a VSCodium update.
@GitMensch, my answer from #1852
VSCodium is using the same
extensionEnabledApiProposals
as Visual Studio Code. I've checked.Here the script doing it https://github.com/VSCodium/vscodium/blob/master/build/update_api.sh
Those Apis depend on the version of the editor and of the extension. Your needs seem like an older version
Describe the bug I am having trouble integrating GitHub Copilot and Copilot Labs extensions with VSCodium. Despite having access to GitHub Copilot X, I am unable to get it working with VSCodium. The Copilot Labs extension isn't working and the Copilot chat doesn't show up in the activity bar.
Please confirm that you have searched existing issues in the repo. Yes, I have searched existing issues.
Please confirm that you have checked the FAQs. Yes, I have checked the FAQs.
VSCodium version Version: 1.79.0 (system setup) Release: 23159 Commit: 4be06ce527f2ea3b9b3096ac4b4c5aa11c64e7a4 Date: 2023-06-08T21:27:43.604Z Electron: 22.3.10 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22621
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect to be able to use GitHub Copilot and Copilot Labs extensions with VSCodium without any issues.
Screenshots (If applicable, add screenshots to help explain your problem.)
Desktop (please complete the following information):
Additional context I have tried several troubleshooting steps, including signing in and out of GitHub Copilot, editing the product.json file, and generating a new personal access token. None of these steps have resolved the issue.