Plumb compaction counts to TUI clients

This commit is contained in:
canvrno-oai
2026-07-08 14:54:19 -07:00
parent 358575465c
commit d5e7342080
20 changed files with 170 additions and 6 deletions
@@ -5115,6 +5115,13 @@
},
"turnId": {
"type": "string"
},
"windowNumber": {
"default": 0,
"description": "Current context-window generation. This starts at zero and advances after compaction.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
@@ -19821,6 +19821,13 @@
},
"turnId": {
"type": "string"
},
"windowNumber": {
"default": 0,
"description": "Current context-window generation. This starts at zero and advances after compaction.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
@@ -17600,6 +17600,13 @@
},
"turnId": {
"type": "string"
},
"windowNumber": {
"default": 0,
"description": "Current context-window generation. This starts at zero and advances after compaction.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
@@ -65,6 +65,13 @@
},
"turnId": {
"type": "string"
},
"windowNumber": {
"default": 0,
"description": "Current context-window generation. This starts at zero and advances after compaction.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
@@ -3,4 +3,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ThreadTokenUsage } from "./ThreadTokenUsage";
export type ThreadTokenUsageUpdatedNotification = { threadId: string, turnId: string, tokenUsage: ThreadTokenUsage, };
export type ThreadTokenUsageUpdatedNotification = { threadId: string, turnId: string, tokenUsage: ThreadTokenUsage,
/**
* Current context-window generation. This starts at zero and advances after compaction.
*/
windowNumber: number, };
@@ -1373,6 +1373,10 @@ pub struct ThreadTokenUsageUpdatedNotification {
pub thread_id: String,
pub turn_id: String,
pub token_usage: ThreadTokenUsage,
/// Current context-window generation. This starts at zero and advances after compaction.
#[serde(default)]
#[ts(type = "number")]
pub window_number: u64,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]