ZIm/crates/zeta/src
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
..
completion_diff_element.rs Adds a way to toggle font size without settings adjustments (#24857) 2025-02-14 13:27:48 +02:00
init.rs edit prediction: Fix zeta: Rate completions action not working when using keybinding (#24569) 2025-02-11 12:14:42 +01:00
input_excerpt.rs Re-introduce syntax-based context and use new model (#24469) 2025-02-07 19:19:57 +00:00
license_detection.rs zeta: Add LICENSE.md and LICENCE.md to license detection (#25422) 2025-02-23 15:08:24 +00:00
onboarding_banner.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
onboarding_modal.rs edit prediction: Update disabled globs link in the onboarding modal (#25084) 2025-02-18 10:45:25 -03:00
onboarding_telemetry.rs edit predictions: Onboarding funnel telemetry (#24237) 2025-02-05 15:26:11 +00:00
rate_completion_modal.rs Display case-sensitive keybindings for vim commands (#24322) 2025-02-14 22:03:59 -07:00
zeta.rs zeta: Fix update required notification not showing (#25588) 2025-02-25 20:02:43 +00:00