fix: route worker history appends through callbacks

This commit is contained in:
2026-05-24 06:44:19 +09:00
parent b64e098b5b
commit 65c399e6d9
5 changed files with 178 additions and 73 deletions
+7
View File
@@ -67,6 +67,11 @@ pub enum SystemItem {
/// `/<slug>` Workflow invocation. `body` is the workflow's
/// prompt body materialized into the LLM context.
Workflow { slug: String, body: String },
/// Synthetic note inserted after an interrupted turn before the next
/// user input. `body` is the exact LLM-context text explaining that the
/// previous turn was cut short.
Interrupt { body: String },
}
impl SystemItem {
@@ -79,6 +84,7 @@ impl SystemItem {
SystemItem::FileAttachment { body, .. } => body.clone(),
SystemItem::Knowledge { body, .. } => body.clone(),
SystemItem::Workflow { body, .. } => body.clone(),
SystemItem::Interrupt { body } => body.clone(),
}
}
@@ -97,6 +103,7 @@ impl SystemItem {
SystemItem::FileAttachment { .. } => "file_attachment",
SystemItem::Knowledge { .. } => "knowledge",
SystemItem::Workflow { .. } => "workflow",
SystemItem::Interrupt { .. } => "interrupt",
}
}
}