Skip to content
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 is logged out #21360

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

fred-sch
Copy link
Contributor

@fred-sch fred-sch commented Nov 30, 2024

Closes #21255

Release Notes:

  • Fixed Copilot Chat OAuth Token parsing

Copy link

cla-bot bot commented Nov 30, 2024

We require contributors to sign our Contributor License Agreement, and we don't have @fred-sch on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@fred-sch
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 30, 2024
Copy link

cla-bot bot commented Nov 30, 2024

The cla-bot has been summoned, and re-checked this pull request!

@fred-sch
Copy link
Contributor Author

I summarized the details of this fix in #21255 (comment).

@bennetbo
Copy link
Contributor

bennetbo commented Dec 2, 2024

Hey, thanks for investigating! This PR breaks copilot chat for me, because (for whatever reason) the oauth token is still stored in hosts.json on my machine.
However, looking at other repositories on GitHub, it seems like that it's actually pretty common to check for both hosts.json and apps.json (search query).
I changed the implementation to handle both cases, can you check if this still works for you?

@fred-sch
Copy link
Contributor Author

fred-sch commented Dec 2, 2024

Thanks for your feedback. Your fix is still working fine for me!

I was expecting that users would need to sign-out and sign-in again into github copilot (because they have the hosts.json file but not the apps.json), but I totally agree that checking both files is the better solution.

@bennetbo
Copy link
Contributor

bennetbo commented Dec 2, 2024

Thanks for verifying! After logging out and in again, I can indeed see the hosts.json file appearing, not sure why I did not make that connection.
Anyways, thanks for fixing this!

@bennetbo bennetbo merged commit 380679f into zed-industries:main Dec 2, 2024
13 checks passed
@erenergul
Copy link

Its not working in my case. Still can not login for chat.

@bennetbo
Copy link
Contributor

bennetbo commented Dec 4, 2024

Its not working in my case. Still can not login for chat.

The fix has not been released (although it will be part of today's preview release). Are you running into this building from main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copilot chat logged out while autocomplete is logged in
3 participants