Report response latency and errors when using (inline) assistant (#11806)

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: David <davidsp@anthropic.com>
This commit is contained in:
Antonio Scandurra 2024-05-14 18:18:26 +02:00 committed by GitHub
parent de09409f01
commit 9f0a20241b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 171 additions and 119 deletions

View file

@ -1,6 +1,6 @@
use semantic_version::SemanticVersion;
use serde::{Deserialize, Serialize};
use std::{fmt::Display, sync::Arc};
use std::{fmt::Display, sync::Arc, time::Duration};
#[derive(Serialize, Deserialize, Debug)]
pub struct EventRequestBody {
@ -93,6 +93,8 @@ pub struct AssistantEvent {
pub conversation_id: Option<String>,
pub kind: AssistantKind,
pub model: String,
pub response_latency: Option<Duration>,
pub error_message: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]