From 4001fd2ec8ff05a982da18744b8cbde9df3ab530 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 6 Jun 2026 17:41:44 +0300 Subject: feat: improve toast ergonomics refs #486 --- src/app/state.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/app/state.rs') diff --git a/src/app/state.rs b/src/app/state.rs index e06fb3f5..494bee0f 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -1176,9 +1176,33 @@ pub struct ToastNotification { pub kind: ToastKind, pub title: String, pub context: String, + pub position: Option, pub target: Option, } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct PendingAgentNotification { + pub pane_id: PaneId, + pub workspace_id: String, + pub agent_label: String, + pub known_agent: Option, + pub kind: ToastKind, + pub state: AgentState, + pub deadline: std::time::Instant, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct AgentNotificationDelivery { + pub pane_id: PaneId, + pub workspace_id: String, + pub agent_label: String, + pub known_agent: Option, + pub kind: ToastKind, + pub toast: Option, + pub client_notification: Option, + pub sound: Option, +} + #[derive(Debug, Clone, PartialEq, Eq)] pub struct CopyFeedback { pub message: String, @@ -1288,6 +1312,7 @@ pub struct AppState { pub update_dismissed: bool, pub config_diagnostic: Option, pub toast: Option, + pub pending_agent_notifications: std::collections::HashMap, pub copy_feedback: Option, /// Last reported focus state for the outer terminal hosting herdr. /// None means unsupported or not yet reported, which preserves active-pane suppression. @@ -1615,6 +1640,7 @@ impl AppState { update_dismissed: false, config_diagnostic: None, toast: None, + pending_agent_notifications: std::collections::HashMap::new(), copy_feedback: None, outer_terminal_focus: None, prefix_code: KeyCode::Char('b'), -- cgit v1.2.3