mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Surface remote browser replay artifacts
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
34d59e54c3
commit
ba0d3b467b
@@ -1661,6 +1661,12 @@ mod tests {
|
||||
selected: true,
|
||||
}],
|
||||
},
|
||||
artifacts: Some(v2::BrowserSessionArtifacts {
|
||||
screenshot_image_url: Some("data:image/png;base64,AAA".to_string()),
|
||||
replay_gif_image_url: Some("data:image/gif;base64,R0lGODlh".to_string()),
|
||||
replay_frame_count: Some(2),
|
||||
replay_frame_duration_ms: Some(700),
|
||||
}),
|
||||
});
|
||||
assert_eq!(
|
||||
json!({
|
||||
@@ -1677,6 +1683,12 @@ mod tests {
|
||||
"selected": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"artifacts": {
|
||||
"screenshotImageUrl": "data:image/png;base64,AAA",
|
||||
"replayGifImageUrl": "data:image/gif;base64,R0lGODlh",
|
||||
"replayFrameCount": 2,
|
||||
"replayFrameDurationMs": 700
|
||||
}
|
||||
}
|
||||
}),
|
||||
@@ -1718,6 +1730,7 @@ mod tests {
|
||||
selected_tab_id: String::new(),
|
||||
tabs: Vec::new(),
|
||||
},
|
||||
artifacts: None,
|
||||
});
|
||||
let reason = crate::experimental_api::ExperimentalApi::experimental_reason(¬ification);
|
||||
assert_eq!(reason, Some("browserSession/updated"));
|
||||
|
||||
@@ -2117,6 +2117,24 @@ pub struct BrowserSessionState {
|
||||
pub tabs: Vec<BrowserTabState>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct BrowserSessionArtifacts {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional = nullable)]
|
||||
pub screenshot_image_url: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional = nullable)]
|
||||
pub replay_gif_image_url: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional = nullable)]
|
||||
pub replay_frame_count: Option<u32>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional = nullable)]
|
||||
pub replay_frame_duration_ms: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
@@ -2135,6 +2153,9 @@ pub struct BrowserSessionCommandResponse {
|
||||
pub browser_session_id: String,
|
||||
pub result: JsonValue,
|
||||
pub browser_state: BrowserSessionState,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional = nullable)]
|
||||
pub artifacts: Option<BrowserSessionArtifacts>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
@@ -2143,6 +2164,9 @@ pub struct BrowserSessionCommandResponse {
|
||||
pub struct BrowserSessionUpdatedNotification {
|
||||
pub browser_session_id: String,
|
||||
pub browser_state: BrowserSessionState,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional = nullable)]
|
||||
pub artifacts: Option<BrowserSessionArtifacts>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
|
||||
Reference in New Issue
Block a user