Add warning on compact (#6052)

This PR introduces the ability for `core` to send `warnings` as it can
send `errors. It also sends a warning on compaction.

<img width="811" height="187" alt="image"
src="https://github.com/user-attachments/assets/0947a42d-b720-420d-b7fd-115f8a65a46a"
/>
This commit is contained in:
Ahmed Ibrahim
2025-10-31 13:27:33 -07:00
committed by GitHub
parent 88e083a9d0
commit c8ebb2a0dc
12 changed files with 118 additions and 1 deletions

View File

@@ -438,6 +438,10 @@ pub enum EventMsg {
/// Error while executing a submission
Error(ErrorEvent),
/// Warning issued while processing a submission. Unlike `Error`, this
/// indicates the task continued but the user should still be notified.
Warning(WarningEvent),
/// Agent has started a task
TaskStarted(TaskStartedEvent),
@@ -672,6 +676,11 @@ pub struct ErrorEvent {
pub message: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS)]
pub struct WarningEvent {
pub message: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS)]
pub struct TaskCompleteEvent {
pub last_agent_message: Option<String>,