send context window with task started (#2752)

- Send context window with task started
- Accounting for changing the model per turn
This commit is contained in:
Ahmed Ibrahim
2025-08-27 00:04:21 -07:00
committed by GitHub
parent 4b6c6ce98f
commit d0e06f74e2
7 changed files with 44 additions and 10 deletions

View File

@@ -401,7 +401,7 @@ pub enum EventMsg {
Error(ErrorEvent),
/// Agent has started a task
TaskStarted,
TaskStarted(TaskStartedEvent),
/// Agent has completed all actions
TaskComplete(TaskCompleteEvent),
@@ -494,6 +494,11 @@ pub struct TaskCompleteEvent {
pub last_agent_message: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TaskStartedEvent {
pub model_context_window: Option<u64>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TokenUsage {
pub input_tokens: u64,