mirror of
https://github.com/openai/codex.git
synced 2026-10-30 19:18:49 +00:00
[codex-analytics] add protocol-native turn timestamps
This commit is contained in:
@@ -5043,6 +5043,9 @@ pub struct ThreadNameUpdatedNotification {
|
||||
pub struct TurnStartedNotification {
|
||||
pub thread_id: String,
|
||||
pub turn: Turn,
|
||||
/// Unix timestamp (in seconds) when the turn started.
|
||||
#[ts(type = "number")]
|
||||
pub created_at: i64,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
@@ -5069,6 +5072,12 @@ pub struct Usage {
|
||||
pub struct TurnCompletedNotification {
|
||||
pub thread_id: String,
|
||||
pub turn: Turn,
|
||||
/// Unix timestamp (in seconds) when the turn completed.
|
||||
#[ts(type = "number")]
|
||||
pub completed_at: i64,
|
||||
/// Duration between turn start and completion in milliseconds, if known.
|
||||
#[ts(type = "number | null")]
|
||||
pub duration_ms: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
|
||||
Reference in New Issue
Block a user