diff --git a/crates/cloud_llm_client/src/cloud_llm_client.rs b/crates/cloud_llm_client/src/cloud_llm_client.rs index d2d25ff5b84ef524f4e573a13149b26fe32fc4a5..8c06bd7ebb10b48acca46a4fc7c8afd82eb1a979 100644 --- a/crates/cloud_llm_client/src/cloud_llm_client.rs +++ b/crates/cloud_llm_client/src/cloud_llm_client.rs @@ -111,7 +111,8 @@ pub struct PredictEditsBody { pub trigger: PredictEditsRequestTrigger, } -#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize)] +#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize, strum::AsRefStr)] +#[strum(serialize_all = "snake_case")] pub enum PredictEditsRequestTrigger { Testing, Diagnostics, @@ -170,7 +171,10 @@ pub struct EditPredictionRejection { pub e2e_latency_ms: Option, } -#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize, PartialEq)] +#[derive( + Default, Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash, strum::AsRefStr, +)] +#[strum(serialize_all = "snake_case")] pub enum EditPredictionRejectReason { /// New requests were triggered before this one completed Canceled,