Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Send EP trigger as part of zeta2 prediction request (#47523)
Max Brunsfeld2301c5f9f0af
diff --git a/crates/cloud_llm_client/src/predict_edits_v3.rs b/crates/cloud_llm_client/src/predict_edits_v3.rsindex 4b64813590d..c0bd3bc3204 100644--- a/crates/cloud_llm_client/src/predict_edits_v3.rs+++ b/crates/cloud_llm_client/src/predict_edits_v3.rs@@ -1,3 +1,4 @@+use crate::PredictEditsRequestTrigger;use serde::{Deserialize, Serialize};use std::borrow::Cow;@@ -20,6 +21,8 @@ pub struct PredictEditsV3Request {pub model: Option<String>,#[serde(default)]pub prompt_version: zeta_prompt::ZetaVersion,+ #[serde(default)]+ pub trigger: PredictEditsRequestTrigger,}#[derive(Debug, Deserialize, Serialize)]diff --git a/crates/edit_prediction/src/edit_prediction.rs b/crates/edit_prediction/src/edit_prediction.rsindex 6a04ab62bc9..ec080ae69d4 100644--- a/crates/edit_prediction/src/edit_prediction.rs+++ b/crates/edit_prediction/src/edit_prediction.rs@@ -1923,6 +1923,7 @@ impl EditPredictionStore {client: Arc<Client>,llm_token: LlmApiToken,app_version: Version,+ trigger: PredictEditsRequestTrigger,) -> Result<(PredictEditsV3Response, Option<EditPredictionUsage>)> {let url = client.http_client()@@ -1932,6 +1933,7 @@ impl EditPredictionStore {input,model: EDIT_PREDICTIONS_MODEL_ID.clone(),prompt_version,+ trigger,};Self::send_api_request(diff --git a/crates/edit_prediction/src/zeta2.rs b/crates/edit_prediction/src/zeta2.rsindex 4d307cd7c78..9eefe1e38e1 100644--- a/crates/edit_prediction/src/zeta2.rs+++ b/crates/edit_prediction/src/zeta2.rs@@ -34,6 +34,7 @@ pub fn request_prediction_with_zeta2(related_files,events,debug_tx,+ trigger,..}: EditPredictionModelInput,zeta_version: ZetaVersion,@@ -110,6 +111,7 @@ pub fn request_prediction_with_zeta2(client,llm_token,app_version,+ trigger,).await?;