Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T04:12:26.157Z 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

action_macros.rs

56 lines · 1.3 KB · rust
1use gpui::{Action, actions};
2use gpui_macros::register_action;
3use schemars::JsonSchema;
4use serde::Deserialize;
5
6#[test]
7fn test_action_macros() {
8    actions!(
9        test_only,
10        [
11            SomeAction,
12            /// Documented action
13            SomeActionWithDocs,
14        ]
15    );
16
17    #[derive(PartialEq, Clone, Deserialize, JsonSchema, Action)]
18    #[action(namespace = test_only)]
19    #[serde(deny_unknown_fields)]
20    struct AnotherAction;
21
22    #[derive(PartialEq, Clone, gpui::private::serde::Deserialize)]
23    #[serde(deny_unknown_fields)]
24    struct RegisterableAction {}
25
26    register_action!(RegisterableAction);
27
28    impl gpui::Action for RegisterableAction {
29        fn boxed_clone(&self) -> Box<dyn gpui::Action> {
30            unimplemented!()
31        }
32
33        fn partial_eq(&self, _action: &dyn gpui::Action) -> bool {
34            unimplemented!()
35        }
36
37        fn name(&self) -> &'static str {
38            unimplemented!()
39        }
40
41        fn name_for_type() -> &'static str
42        where
43            Self: Sized,
44        {
45            unimplemented!()
46        }
47
48        fn build(_value: serde_json::Value) -> anyhow::Result<Box<dyn gpui::Action>>
49        where
50            Self: Sized,
51        {
52            unimplemented!()
53        }
54    }
55}
56
Served at tenant.openagents/omega Member data and write actions are omitted.