Remove dependents of language_models
(#25511)
This PR removes the dependents of the `language_models` crate. The following types have been moved from `language_models` to `language_model` to facilitate this: - `LlmApiToken` - `RefreshLlmTokenListener` - `MaxMonthlySpendReachedError` - `PaymentRequiredError` With this change only `zed` now depends on `language_models`. Release Notes: - N/A
This commit is contained in:
parent
bbb8d63de0
commit
def342e35c
14 changed files with 117 additions and 124 deletions
|
@ -9,6 +9,7 @@ mod telemetry;
|
|||
pub mod fake_provider;
|
||||
|
||||
use anyhow::Result;
|
||||
use client::Client;
|
||||
use futures::FutureExt;
|
||||
use futures::{future::BoxFuture, stream::BoxStream, StreamExt, TryStreamExt as _};
|
||||
use gpui::{AnyElement, AnyView, App, AsyncApp, SharedString, Task, Window};
|
||||
|
@ -29,8 +30,9 @@ pub use crate::telemetry::*;
|
|||
|
||||
pub const ZED_CLOUD_PROVIDER_ID: &str = "zed.dev";
|
||||
|
||||
pub fn init(cx: &mut App) {
|
||||
pub fn init(client: Arc<Client>, cx: &mut App) {
|
||||
registry::init(cx);
|
||||
RefreshLlmTokenListener::register(client.clone(), cx);
|
||||
}
|
||||
|
||||
/// The availability of a [`LanguageModel`].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue