Skip to content

Conversation

cppcoffee
Copy link
Contributor

The edit prediction button menu was displaying stale authentication status due to capturing the Copilot status in a closure. After signing out, the menu would still show "Sign Out" instead of "Sign In to Copilot".

This change fixes the issue by reading the current Copilot status each time the menu is displayed, ensuring the menu options are always accurate.

Release Notes:

  • Fixed Copilot AI menu not updating after sign out

The edit prediction button menu was displaying stale authentication status
due to capturing the Copilot status in a closure. After signing out, the
menu would still show "Sign Out" instead of "Sign In to Copilot".

This change fixes the issue by reading the current Copilot status each
time the menu is displayed, ensuring the menu options are always accurate.

Signed-off-by: Xiaobo Liu <[email protected]>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 25, 2025
@cppcoffee
Copy link
Contributor Author

Inside the closure, due to the use of the move keyword, status is moved into the closure, remaining the same value and not changing.

@SomeoneToIgnore SomeoneToIgnore added the ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Sep 25, 2025
@ConradIrwin ConradIrwin merged commit bd3ccce into zed-industries:main Sep 26, 2025
24 checks passed
@ConradIrwin
Copy link
Member

Nice, thanks!

@cppcoffee cppcoffee deleted the copilot branch September 29, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants