Adjust model selector popover design (#15056)
This PR mostly refines the model selector popover design by formatting the models names' and adjusting spacing/alignment in the list-related items. The list component changes could've been made in a separate PR but it was also very practical to do it here as I was already in-context. Either way, I'm happy to separate if that's better! One thing I couldn't necessarily figure out, though, is why the order changed (e.g., Anthropic at last ). I wonder if that was because of the separator logic somehow? I'd love guidance here—new to Rust! | Before | After | |--------|--------| | <img width="228" alt="Screenshot 2024-07-23 at 21 02 33" src="https://github.com/user-attachments/assets/3372c6c9-08dc-4d71-9265-26f015e2dbc2"> | <img width="228" alt="Screenshot 2024-07-23 at 21 01 45" src="https://github.com/user-attachments/assets/624cc7db-a3d9-48e3-99d7-c29829501130"> | --- Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev> Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
87d93033d1
commit
912b396e58
13 changed files with 220 additions and 298 deletions
|
@ -1,5 +1,6 @@
|
|||
use anthropic::{stream_completion, Request, RequestMessage};
|
||||
use anyhow::{anyhow, Result};
|
||||
use collections::BTreeMap;
|
||||
use editor::{Editor, EditorElement, EditorStyle};
|
||||
use futures::{future::BoxFuture, stream::BoxStream, FutureExt, StreamExt};
|
||||
use gpui::{
|
||||
|
@ -8,7 +9,7 @@ use gpui::{
|
|||
};
|
||||
use http_client::HttpClient;
|
||||
use settings::{Settings, SettingsStore};
|
||||
use std::{collections::BTreeMap, sync::Arc, time::Duration};
|
||||
use std::{sync::Arc, time::Duration};
|
||||
use strum::IntoEnumIterator;
|
||||
use theme::ThemeSettings;
|
||||
use ui::prelude::*;
|
||||
|
|
|
@ -6,10 +6,11 @@ use crate::{
|
|||
};
|
||||
use anyhow::Result;
|
||||
use client::Client;
|
||||
use collections::BTreeMap;
|
||||
use futures::{future::BoxFuture, stream::BoxStream, FutureExt, StreamExt, TryFutureExt};
|
||||
use gpui::{AnyView, AppContext, AsyncAppContext, Subscription, Task};
|
||||
use settings::{Settings, SettingsStore};
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
use std::sync::Arc;
|
||||
use strum::IntoEnumIterator;
|
||||
use ui::prelude::*;
|
||||
|
||||
|
|
|
@ -75,12 +75,12 @@ impl OllamaLanguageModelProvider {
|
|||
http_client,
|
||||
available_models: Default::default(),
|
||||
_subscription: cx.observe_global::<SettingsStore>(|this: &mut State, cx| {
|
||||
this.fetch_models(cx).detach_and_log_err(cx);
|
||||
this.fetch_models(cx).detach();
|
||||
cx.notify();
|
||||
}),
|
||||
}),
|
||||
};
|
||||
this.fetch_models(cx).detach_and_log_err(cx);
|
||||
this.fetch_models(cx).detach();
|
||||
this
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue