language_model: Remove dependency on ui
(#27448)
This PR removes the dependency on the `ui` crate from the `language_model` crate. We were only depending on it to import `IconName`—which now lives in `icons`—and some re-exported GPUI items. Release Notes: - N/A
This commit is contained in:
parent
503bf607c5
commit
4a30b960d4
5 changed files with 6 additions and 6 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -7311,6 +7311,7 @@ dependencies = [
|
||||||
"google_ai",
|
"google_ai",
|
||||||
"gpui",
|
"gpui",
|
||||||
"http_client",
|
"http_client",
|
||||||
|
"icons",
|
||||||
"image",
|
"image",
|
||||||
"log",
|
"log",
|
||||||
"open_ai",
|
"open_ai",
|
||||||
|
@ -7323,7 +7324,6 @@ dependencies = [
|
||||||
"strum",
|
"strum",
|
||||||
"telemetry_events",
|
"telemetry_events",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"ui",
|
|
||||||
"util",
|
"util",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ futures.workspace = true
|
||||||
google_ai = { workspace = true, features = ["schemars"] }
|
google_ai = { workspace = true, features = ["schemars"] }
|
||||||
gpui.workspace = true
|
gpui.workspace = true
|
||||||
http_client.workspace = true
|
http_client.workspace = true
|
||||||
|
icons.workspace = true
|
||||||
image.workspace = true
|
image.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
open_ai = { workspace = true, features = ["schemars"] }
|
open_ai = { workspace = true, features = ["schemars"] }
|
||||||
|
@ -37,7 +38,6 @@ smol.workspace = true
|
||||||
strum.workspace = true
|
strum.workspace = true
|
||||||
telemetry_events.workspace = true
|
telemetry_events.workspace = true
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
ui.workspace = true
|
|
||||||
util.workspace = true
|
util.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -13,6 +13,7 @@ use client::Client;
|
||||||
use futures::FutureExt;
|
use futures::FutureExt;
|
||||||
use futures::{future::BoxFuture, stream::BoxStream, StreamExt, TryStreamExt as _};
|
use futures::{future::BoxFuture, stream::BoxStream, StreamExt, TryStreamExt as _};
|
||||||
use gpui::{AnyElement, AnyView, App, AsyncApp, SharedString, Task, Window};
|
use gpui::{AnyElement, AnyView, App, AsyncApp, SharedString, Task, Window};
|
||||||
|
use icons::IconName;
|
||||||
use proto::Plan;
|
use proto::Plan;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||||
|
@ -20,7 +21,6 @@ use std::fmt;
|
||||||
use std::ops::{Add, Sub};
|
use std::ops::{Add, Sub};
|
||||||
use std::{future::Future, sync::Arc};
|
use std::{future::Future, sync::Arc};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use ui::IconName;
|
|
||||||
use util::serde::is_default;
|
use util::serde::is_default;
|
||||||
|
|
||||||
pub use crate::model::*;
|
pub use crate::model::*;
|
||||||
|
|
|
@ -6,13 +6,13 @@ use client::Client;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Global, ReadGlobal as _,
|
App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Global, ReadGlobal as _,
|
||||||
};
|
};
|
||||||
|
use icons::IconName;
|
||||||
use proto::{Plan, TypedEnvelope};
|
use proto::{Plan, TypedEnvelope};
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use smol::lock::{RwLock, RwLockUpgradableReadGuard, RwLockWriteGuard};
|
use smol::lock::{RwLock, RwLockUpgradableReadGuard, RwLockWriteGuard};
|
||||||
use strum::EnumIter;
|
use strum::EnumIter;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use ui::IconName;
|
|
||||||
|
|
||||||
use crate::LanguageModelAvailability;
|
use crate::LanguageModelAvailability;
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ use crate::role::Role;
|
||||||
use crate::{LanguageModelToolUse, LanguageModelToolUseId};
|
use crate::{LanguageModelToolUse, LanguageModelToolUseId};
|
||||||
use base64::write::EncoderWriter;
|
use base64::write::EncoderWriter;
|
||||||
use gpui::{
|
use gpui::{
|
||||||
point, size, App, AppContext as _, DevicePixels, Image, ObjectFit, RenderImage, Size, Task,
|
point, px, size, App, AppContext as _, DevicePixels, Image, ObjectFit, RenderImage,
|
||||||
|
SharedString, Size, Task,
|
||||||
};
|
};
|
||||||
use image::{codecs::png::PngEncoder, imageops::resize, DynamicImage, ImageDecoder};
|
use image::{codecs::png::PngEncoder, imageops::resize, DynamicImage, ImageDecoder};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use ui::{px, SharedString};
|
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
|
|
||||||
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Hash)]
|
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Hash)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue