# edit_prediction_button: Fix Copilot menu not updating after sign out \(\#38854\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bd3cccea1549dc3b3c5b8b77c812b562f942dc04)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bd3cccea1549dc3b3c5b8b77c812b562f942dc04

Requested commit: bd3cccea1549dc3b3c5b8b77c812b562f942dc04

Commit: bd3cccea1549dc3b3c5b8b77c812b562f942dc04

Tree: a3f4e042e1aa7b4d99a987365a5e07f9e39fa321

Author: Xiaobo Liu

Committer: GitHub

## Message

```
edit_prediction_button: Fix Copilot menu not updating after sign out (#38854)

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

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
```

## Parents

- [d437bbaa0a100aa1bf6c64980dd773a63cbfdc8e](https://git.cafe/gitcafe/zed/commit/d437bbaa0a100aa1bf6c64980dd773a63cbfdc8e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bd3cccea1549dc3b3c5b8b77c812b562f942dc04?format=markdown)
