Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T03:16:08.698Z 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

agent_panel_onboarding_card.rs

66 lines · 2.2 KB · rust
1use gpui::{AnyElement, IntoElement, ParentElement, linear_color_stop, linear_gradient};
2use smallvec::SmallVec;
3use ui::prelude::*;
4
5#[derive(IntoElement)]
6pub struct AgentPanelOnboardingCard {
7    children: SmallVec<[AnyElement; 2]>,
8}
9
10impl AgentPanelOnboardingCard {
11    pub fn new() -> Self {
12        Self {
13            children: SmallVec::new(),
14        }
15    }
16}
17
18impl ParentElement for AgentPanelOnboardingCard {
19    fn extend(&mut self, elements: impl IntoIterator<Item = AnyElement>) {
20        self.children.extend(elements)
21    }
22}
23
24impl RenderOnce for AgentPanelOnboardingCard {
25    fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
26        let color = cx.theme().colors();
27
28        div().min_w_0().p_2p5().bg(color.editor_background).child(
29            div()
30                .min_w_0()
31                .p(px(3.))
32                .rounded_lg()
33                .elevation_2(cx)
34                .bg(color.background.opacity(0.5))
35                .child(
36                    v_flex()
37                        .relative()
38                        .size_full()
39                        .min_w_0()
40                        .px_4()
41                        .py_3()
42                        .gap_2()
43                        .border_1()
44                        .rounded(px(5.))
45                        .border_color(color.text.opacity(0.1))
46                        .bg(color.panel_background)
47                        .overflow_hidden()
48                        .child(
49                            div()
50                                .absolute()
51                                .inset_0()
52                                .size_full()
53                                .rounded_md()
54                                .overflow_hidden()
55                                .bg(linear_gradient(
56                                    360.,
57                                    linear_color_stop(color.panel_background, 1.0),
58                                    linear_color_stop(color.editor_background, 0.45),
59                                )),
60                        )
61                        .children(self.children),
62                ),
63        )
64    }
65}
66
Served at tenant.openagents/omega Member data and write actions are omitted.