cloud_llm_client: Add derives for edit prediction fields (#51968)
## Context This PR adds some derives which make tracing easier on cloud side. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
This commit is contained in:
1 parent
7293753c9d
commit
b7f1602882
1 file changed
+6
-2
@@ -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<u128>,
|
||||
}
|
||||
|
||||
#[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,
|
||||
|
||||
Reference in new issue
Block a user