Label Epiphany state update notifications
This commit is contained in:
parent
cabad31b5e
commit
4c770e98dd
17 changed files with 100 additions and 22 deletions
|
|
@ -1888,6 +1888,7 @@ mod tests {
|
|||
let notification = ServerNotification::ThreadEpiphanyStateUpdated(
|
||||
v2::ThreadEpiphanyStateUpdatedNotification {
|
||||
thread_id: "thr_123".to_string(),
|
||||
source: v2::ThreadEpiphanyStateUpdatedSource::Update,
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
revision: 7,
|
||||
objective: Some("Keep the map live".to_string()),
|
||||
|
|
@ -1900,6 +1901,7 @@ mod tests {
|
|||
"method": "thread/epiphany/stateUpdated",
|
||||
"params": {
|
||||
"threadId": "thr_123",
|
||||
"source": "update",
|
||||
"epiphanyState": {
|
||||
"revision": 7,
|
||||
"objective": "Keep the map live"
|
||||
|
|
@ -2512,6 +2514,7 @@ mod tests {
|
|||
let notification = ServerNotification::ThreadEpiphanyStateUpdated(
|
||||
v2::ThreadEpiphanyStateUpdatedNotification {
|
||||
thread_id: "thr_123".to_string(),
|
||||
source: v2::ThreadEpiphanyStateUpdatedSource::Promote,
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState::default(),
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4058,9 +4058,18 @@ pub struct ThreadEpiphanyUpdateResponse {
|
|||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadEpiphanyStateUpdatedNotification {
|
||||
pub thread_id: String,
|
||||
pub source: ThreadEpiphanyStateUpdatedSource,
|
||||
pub epiphany_state: CoreEpiphanyThreadState,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub enum ThreadEpiphanyStateUpdatedSource {
|
||||
Update,
|
||||
Promote,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
|
|
|
|||
Reference in a new issue