zeta: Refresh LLM token in case it expired (#21796)

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
Thorsten Ball 2024-12-10 14:12:49 +01:00 committed by GitHub
parent 09006aaee9
commit 96499b7b25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 209 additions and 132 deletions

View file

@ -1,7 +1,7 @@
use anyhow::Result;
use copilot::{Copilot, Status};
use editor::{scroll::Autoscroll, Editor};
use feature_flags::FeatureFlagAppExt;
use feature_flags::{FeatureFlagAppExt, ZetaFeatureFlag};
use fs::Fs;
use gpui::{
div, Action, AnchorCorner, AppContext, AsyncWindowContext, Entity, IntoElement, ParentElement,
@ -199,7 +199,7 @@ impl Render for InlineCompletionButton {
}
InlineCompletionProvider::Zeta => {
if !cx.is_staff() {
if !cx.has_flag::<ZetaFeatureFlag>() {
return div();
}