feat: add compaction event (#7289)

This commit is contained in:
jif-oai
2025-11-25 16:12:14 +00:00
committed by GitHub
parent 157a16cefa
commit 9ba27cfa0a
12 changed files with 38 additions and 10 deletions

View File

@@ -455,6 +455,9 @@ pub enum EventMsg {
/// indicates the task continued but the user should still be notified.
Warning(WarningEvent),
/// Conversation history was compacted (either automatically or manually).
ContextCompacted(ContextCompactedEvent),
/// Agent has started a task
TaskStarted(TaskStartedEvent),
@@ -739,6 +742,9 @@ pub struct WarningEvent {
pub message: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS)]
pub struct ContextCompactedEvent;
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS)]
pub struct TaskCompleteEvent {
pub last_agent_message: Option<String>,