New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: copilot chat extension does not work #335
Conversation
Pull Request Dev image published: |
Pull Request Che-Code image published: |
14 similar comments
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Pull Request Che-Code image published: |
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
2c17083
to
99cf176
Compare
Pull Request Dev image published: |
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Pull Request Dev image published: |
Pull Request Che-Code image published: |
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Pull Request Dev image published: |
Pull Request Che-Code image published: |
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Pull Request Dev image published: |
Pull Request Che-Code image published: |
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Pull Request Dev image published: |
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Pull Request Dev image published: |
Pull Request Che-Code image published: |
1 similar comment
Pull Request Che-Code image published: |
@vitaliy-guliy |
options.silent = false; | ||
options.createIfNone = true; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vitaliy-guliy
I tested this solution - it works for me - I'm able to use Github Copilot Chat extension,
thank you!
At the same time it's still unclear how it works on VS Code side without these changes.
Also I detected some side-effects of the current solution:
- let's say I don't have Copilot and Copilot extensions
- It asks me to
sign in using GitHub
directly after starting a workspace - without these changes the system asks to
sign in using GitHub
only when I'm using some command that requires it (git clone for example)
Another use case is - Sign Out
:
- with these changes the system asks to
Sign In
directly afterSign Out
for all extensions, like: I doSign Out
=> 3 dialogs are shown toSign in
for 3 extensions
Without these changes:
https://github.com/che-incubator/che-code/assets/5676062/87a7f967-6621-4e26-b52d-04fb0e1e4cb3
With these changes:
https://github.com/che-incubator/che-code/assets/5676062/702d9f6b-29f4-4cf4-9c57-e069f5fe3a13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK for me to merge the PR as is if we don't have another solution that allows to avoid those side-effects - they are insignificant from my point of view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, user is asked to grant the access when the extension wants to get a session.
But is seems user is asked only once at the workspace startup.
It should not be very annoying in case you want to use extension like copilot.
From the other side, clicking the button each time when creating a workspace could make a user a bit nervous.
I created another PR to test a bit different behavior #339
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But is seems user is asked only once at the workspace startup.
I also described another use case above:
I want to Sign Out
=> 3 dialogs are shown to Sign in
for 3 extensions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure users are practicing signing out in a real life.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yes, it's a case
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Pull Request Dev image published: |
Pull Request Che-Code image published: |
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
Pull Request Dev image published: |
Pull Request Che-Code image published: |
What does this PR do?
Ask the user when an extension wants to sign in using GitHub.
What issues does this PR fix?
eclipse-che/che#22781
How to test this PR?
Create a workspace with
https://github.com/vitaliy-guliy/vscode-test-extension?che-editor=https://gist.githubusercontent.com/vitaliy-guliy/8fbbfafa1de2448acffa01e1386f1a3f/raw/6ed01b24709f6afaa8e171fbd1e3666e65e8538d/editor.yaml
Download both extensions to your laptop
GitHub.copilot-1.172.0.vsix
GitHub.copilot-chat-0.14.2024032101.vsix
Open Extensions view, install the extensions
If necessary, perform device authorization
Compatibility [WIP]
che-code@7.84.0 (main branch) / vscode@1.88.0 - dogfooding
GitHub.copilot-1.173.0.vsix
GitHub.copilot-chat-0.13.1.vsix
GitHub.copilot-chat-0.13.2024022301.vsix
desktop vscode@1.87.1
GitHub.copilot-1.173.0.vsix
GitHub.copilot-chat-0.13.1.vsix
che-code@7.82.1 / vscode@1.87.0 - staging with Dev Spaces 3.12
GitHub.copilot-1.173.0.vsix
GitHub.copilot-chat-0.13.1.vsix
che-code@7.80.1 / vscode@1.86.0 - sandbox with Dev Spaces 3.11
GitHub.copilot-1.173.0.vsix
GitHub.copilot-chat-0.11.1.vsix stable
GitHub.copilot-chat-0.12.2.vsix
GitHub.copilot-chat-0.12.2024013003.vsix
Workaround for workspaces without fixes in this pull request
If you try to install the extensions in che-code from the main branch, the copilot chat extension will not work because it cannot get GitHub session due to specific call of the extension plugin API like here
https://github.com/vitaliy-guliy/vscode-test-extension/blob/get-session/src/extension.ts#L39
If
silent
is true, user will not be asked to permit giving the access to his account to the extension. And as result the extension will haveundefined
instead of a session.If you apply this fixup, it will update your browser database and granted the access for Pull Request extension and for both Copilot extensions.
How to test:
Just to check this workaround is working, try to repeat above steps but do not launch the script.
Does this PR contain changes that override default upstream Code-OSS behavior?
git rebase
were added to the .rebase folder