aboutsummaryrefslogtreecommitdiff
path: root/src/server/notifications.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/notifications.rs')
-rw-r--r--src/server/notifications.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/server/notifications.rs b/src/server/notifications.rs
index 711087f5..ed8fcb6c 100644
--- a/src/server/notifications.rs
+++ b/src/server/notifications.rs
@@ -25,13 +25,8 @@ pub(crate) fn toast_message_from_state_change(
suppress_active_tab_notifications: bool,
prev_state: AgentState,
new_state: AgentState,
+ previous_agent_label: Option<&str>,
) -> Option<String> {
- let kind = app::actions::notification_toast_for_state_change(
- suppress_active_tab_notifications,
- prev_state,
- new_state,
- )?;
-
state
.workspaces
.iter()
@@ -43,6 +38,13 @@ pub(crate) fn toast_message_from_state_change(
.terminals
.get(&pane.attached_terminal_id)
.and_then(|terminal| terminal.effective_agent_label())?;
+ let kind = app::actions::notification_toast_for_state_change_with_agent_labels(
+ suppress_active_tab_notifications,
+ prev_state,
+ new_state,
+ previous_agent_label,
+ Some(agent_label),
+ )?;
let workspace_label = ws.display_name_from(&state.terminals, terminal_runtimes);
Some(format!(
"{} {}: {}",
@@ -138,6 +140,7 @@ mod tests {
false,
AgentState::Working,
AgentState::Idle,
+ Some("codex"),
);
assert_eq!(