aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-06 17:41:44 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-06 17:42:38 +0300
commit4001fd2ec8ff05a982da18744b8cbde9df3ab530 (patch)
treef8dbf984cff9a4b025e86481d3f70c89322bd79f /src/app/state.rs
parent048d8a29195d580014b24ee3fc7e89ac6bdfee8a (diff)
feat: improve toast ergonomics
refs #486
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs26
1 files changed, 26 insertions, 0 deletions
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,10 +1176,34 @@ pub struct ToastNotification {
pub kind: ToastKind,
pub title: String,
pub context: String,
+ pub position: Option<crate::config::ToastHerdrPosition>,
pub target: Option<ToastTarget>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct PendingAgentNotification {
+ pub pane_id: PaneId,
+ pub workspace_id: String,
+ pub agent_label: String,
+ pub known_agent: Option<crate::detect::Agent>,
+ 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<crate::detect::Agent>,
+ pub kind: ToastKind,
+ pub toast: Option<ToastNotification>,
+ pub client_notification: Option<ToastNotification>,
+ pub sound: Option<crate::sound::Sound>,
+}
+
+#[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<String>,
pub toast: Option<ToastNotification>,
+ pub pending_agent_notifications: std::collections::HashMap<PaneId, PendingAgentNotification>,
pub copy_feedback: Option<CopyFeedback>,
/// 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'),