Update zed_llm_client to v0.8.1 (#30433)

This PR updates the `zed_llm_client` crate to v0.8.1.

The name of `Plan::Free` changed to `Plan::ZedFree` in this version.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-05-09 17:08:03 -04:00 committed by GitHub
parent 000077facf
commit f29c6e5661
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 16 additions and 16 deletions

4
Cargo.lock generated
View file

@ -18742,9 +18742,9 @@ dependencies = [
[[package]] [[package]]
name = "zed_llm_client" name = "zed_llm_client"
version = "0.8.0" version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a23b2fd00776b0c55072f389654910ceb501eb0083d7f78905ab0e5cc86949ec" checksum = "16d993fc42f9ec43ab76fa46c6eb579a66e116bb08cd2bc9a67f3afcaa05d39d"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"serde", "serde",

View file

@ -608,7 +608,7 @@ wasmtime-wasi = "29"
which = "6.0.0" which = "6.0.0"
wit-component = "0.221" wit-component = "0.221"
workspace-hack = "0.1.0" workspace-hack = "0.1.0"
zed_llm_client = "0.8.0" zed_llm_client = "0.8.1"
zstd = "0.11" zstd = "0.11"
[workspace.dependencies.async-stripe] [workspace.dependencies.async-stripe]

View file

@ -75,7 +75,7 @@ impl Default for DebugAccountState {
Self { Self {
enabled: false, enabled: false,
trial_expired: false, trial_expired: false,
plan: Plan::Free, plan: Plan::ZedFree,
custom_prompt_usage: RequestUsage { custom_prompt_usage: RequestUsage {
limit: UsageLimit::Unlimited, limit: UsageLimit::Unlimited,
amount: 0, amount: 0,

View file

@ -1085,11 +1085,11 @@ impl MessageEditor {
let plan = user_store let plan = user_store
.current_plan() .current_plan()
.map(|plan| match plan { .map(|plan| match plan {
Plan::Free => zed_llm_client::Plan::Free, Plan::Free => zed_llm_client::Plan::ZedFree,
Plan::ZedPro => zed_llm_client::Plan::ZedPro, Plan::ZedPro => zed_llm_client::Plan::ZedPro,
Plan::ZedProTrial => zed_llm_client::Plan::ZedProTrial, Plan::ZedProTrial => zed_llm_client::Plan::ZedProTrial,
}) })
.unwrap_or(zed_llm_client::Plan::Free); .unwrap_or(zed_llm_client::Plan::ZedFree);
let usage = self.thread.read(cx).last_usage().or_else(|| { let usage = self.thread.read(cx).last_usage().or_else(|| {
maybe!({ maybe!({
let amount = user_store.model_request_usage_amount()?; let amount = user_store.model_request_usage_amount()?;

View file

@ -39,7 +39,7 @@ impl RenderOnce for UsageCallout {
let (title, message, button_text, url) = if is_limit_reached { let (title, message, button_text, url) = if is_limit_reached {
match self.plan { match self.plan {
Plan::Free => ( Plan::ZedFree => (
"Out of free prompts", "Out of free prompts",
"Upgrade to continue, wait for the next reset, or switch to API key." "Upgrade to continue, wait for the next reset, or switch to API key."
.to_string(), .to_string(),
@ -61,7 +61,7 @@ impl RenderOnce for UsageCallout {
} }
} else { } else {
match self.plan { match self.plan {
Plan::Free => ( Plan::ZedFree => (
"Reaching free plan limit soon", "Reaching free plan limit soon",
format!( format!(
"{remaining} remaining - Upgrade to increase limit, or switch providers", "{remaining} remaining - Upgrade to increase limit, or switch providers",
@ -120,7 +120,7 @@ impl Component for UsageCallout {
single_example( single_example(
"Approaching limit (90%)", "Approaching limit (90%)",
UsageCallout::new( UsageCallout::new(
Plan::Free, Plan::ZedFree,
RequestUsage { RequestUsage {
limit: UsageLimit::Limited(50), limit: UsageLimit::Limited(50),
amount: 45, // 90% of limit amount: 45, // 90% of limit
@ -131,7 +131,7 @@ impl Component for UsageCallout {
single_example( single_example(
"Limit reached (100%)", "Limit reached (100%)",
UsageCallout::new( UsageCallout::new(
Plan::Free, Plan::ZedFree,
RequestUsage { RequestUsage {
limit: UsageLimit::Limited(50), limit: UsageLimit::Limited(50),
amount: 50, // 100% of limit amount: 50, // 100% of limit

View file

@ -1274,7 +1274,7 @@ async fn get_current_usage(
subscription subscription
.kind .kind
.map(Into::into) .map(Into::into)
.unwrap_or(zed_llm_client::Plan::Free) .unwrap_or(zed_llm_client::Plan::ZedFree)
}); });
let model_requests_limit = match plan.model_requests_limit() { let model_requests_limit = match plan.model_requests_limit() {

View file

@ -99,7 +99,7 @@ impl From<SubscriptionKind> for zed_llm_client::Plan {
match value { match value {
SubscriptionKind::ZedPro => Self::ZedPro, SubscriptionKind::ZedPro => Self::ZedPro,
SubscriptionKind::ZedProTrial => Self::ZedProTrial, SubscriptionKind::ZedProTrial => Self::ZedProTrial,
SubscriptionKind::ZedFree => Self::Free, SubscriptionKind::ZedFree => Self::ZedFree,
} }
} }
} }

View file

@ -57,8 +57,8 @@ impl LlmTokenClaims {
subscription subscription
.as_ref() .as_ref()
.and_then(|subscription| subscription.kind) .and_then(|subscription| subscription.kind)
.map_or(Plan::Free, |kind| match kind { .map_or(Plan::ZedFree, |kind| match kind {
SubscriptionKind::ZedFree => Plan::Free, SubscriptionKind::ZedFree => Plan::ZedFree,
SubscriptionKind::ZedPro => Plan::ZedPro, SubscriptionKind::ZedPro => Plan::ZedPro,
SubscriptionKind::ZedProTrial => Plan::ZedProTrial, SubscriptionKind::ZedProTrial => Plan::ZedProTrial,
}) })

View file

@ -2740,7 +2740,7 @@ async fn update_user_plan(user_id: UserId, session: &Session) -> Result<()> {
}), }),
usage: usage.map(|usage| { usage: usage.map(|usage| {
let plan = match plan { let plan = match plan {
proto::Plan::Free => zed_llm_client::Plan::Free, proto::Plan::Free => zed_llm_client::Plan::ZedFree,
proto::Plan::ZedPro => zed_llm_client::Plan::ZedPro, proto::Plan::ZedPro => zed_llm_client::Plan::ZedPro,
proto::Plan::ZedProTrial => zed_llm_client::Plan::ZedProTrial, proto::Plan::ZedProTrial => zed_llm_client::Plan::ZedProTrial,
}; };

View file

@ -611,7 +611,7 @@ impl CloudLanguageModel {
.and_then(|plan| zed_llm_client::Plan::from_str(plan).ok()) .and_then(|plan| zed_llm_client::Plan::from_str(plan).ok())
{ {
let plan = match plan { let plan = match plan {
zed_llm_client::Plan::Free => Plan::Free, zed_llm_client::Plan::ZedFree => Plan::Free,
zed_llm_client::Plan::ZedPro => Plan::ZedPro, zed_llm_client::Plan::ZedPro => Plan::ZedPro,
zed_llm_client::Plan::ZedProTrial => Plan::ZedProTrial, zed_llm_client::Plan::ZedProTrial => Plan::ZedProTrial,
}; };