Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T05:07:34.964Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

undo_reject_toast.rs

30 lines · 916 B · rust
1use action_log::ActionLog;
2use gpui::{App, Entity};
3use notifications::status_toast::StatusToast;
4use ui::prelude::*;
5use workspace::Workspace;
6
7pub fn show_undo_reject_toast(
8    workspace: &mut Workspace,
9    action_log: Entity<ActionLog>,
10    cx: &mut App,
11) {
12    let action_log_weak = action_log.downgrade();
13    let status_toast = StatusToast::new("Agent Changes Rejected", cx, move |this, _cx| {
14        this.icon(
15            Icon::new(IconName::Undo)
16                .size(IconSize::Small)
17                .color(Color::Muted),
18        )
19        .action("Undo", move |_window, cx| {
20            if let Some(action_log) = action_log_weak.upgrade() {
21                action_log
22                    .update(cx, |action_log, cx| action_log.undo_last_reject(cx))
23                    .detach();
24            }
25        })
26        .dismiss_button(true)
27    });
28    workspace.toggle_status_toast(status_toast, cx);
29}
30
Served at tenant.openagents/omega Member data and write actions are omitted.