ZIm/crates/zed
Marshall Bowers e5b6194914
zeta: Fix update required notification not showing (#25588)
This PR fixes an issue introduced in #25530 that broke the notifications
that inform the user that a Zed update is required to continue using
edit prediction.

The issue is that the `Workspace` stored on the `Editor` is set _after_
the point we initialize Zeta, so capturing the `Workspace` at
construction time leads to it being `None`.

@ConradIrwin suggested that we could obtain the `Workspace` from the
`Window`, which does indeed do the trick.

I tested it both with and without this change by mocking the error
response, like so:

```rs
let response: Result<PredictEditsResponse, anyhow::Error> =
    Err(anyhow!(ZedUpdateRequiredError {
        minimum_version: SemanticVersion::new(0, 1, 0),
    }));
```

Release Notes:

- N/A
2025-02-25 20:02:43 +00:00
..
contents Fix bundle script 2023-11-17 17:44:41 -08:00
resources Remove unnecessary icon field from snapcraft.yaml (#25200) 2025-02-19 15:47:46 -07:00
src zeta: Fix update required notification not showing (#25588) 2025-02-25 20:02:43 +00:00
build.rs chore: Remove duplicate lines in crates/zed/build.rs (#22500) 2024-12-30 11:52:40 +00:00
Cargo.toml Use the development credentials provider in development by default (#25273) 2025-02-20 19:07:16 +00:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
RELEASE_CHANNEL Restore the default release channel (#23671) 2025-01-26 09:19:24 +00:00