zeta: Improve UX for simultaneous LSP and prediction completions (#24024)

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
Agus Zubiaga 2025-02-03 21:47:11 -03:00 committed by GitHub
parent b6e680ea3d
commit 4c29e1ff07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 1196 additions and 762 deletions

View file

@ -26,7 +26,7 @@ use fs::MTime;
use futures::channel::oneshot;
use gpui::{
AnyElement, App, AppContext as _, Context, Entity, EventEmitter, HighlightStyle, Pixels,
SharedString, Task, TaskLabel, Window,
SharedString, StyledText, Task, TaskLabel, TextStyle, Window,
};
use lsp::LanguageServerId;
use parking_lot::Mutex;
@ -617,6 +617,11 @@ impl HighlightedText {
);
highlighted_text.build()
}
pub fn to_styled_text(&self, default_style: &TextStyle) -> StyledText {
gpui::StyledText::new(self.text.clone())
.with_highlights(default_style, self.highlights.iter().cloned())
}
}
impl HighlightedTextBuilder {