Skip to repository content

tenant.openagents/omega

No repository description is available.

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

icons.rs

354 lines · 6.3 KB · rust
1use std::sync::Arc;
2
3use serde::{Deserialize, Serialize};
4use strum::{EnumIter, EnumString, IntoStaticStr};
5
6#[derive(
7    Debug, PartialEq, Eq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize,
8)]
9#[strum(serialize_all = "snake_case")]
10pub enum IconName {
11    AcpRegistry,
12    AiAnthropic,
13    AiAnthropicCompat,
14    AiBedrock,
15    AiClaude,
16    AiDeepSeek,
17    AiEdit,
18    AiGemini,
19    AiGoogle,
20    AiLlamaCpp,
21    AiLmStudio,
22    AiMistral,
23    AiOllama,
24    AiOpenAi,
25    AiOpenAiCompat,
26    AiOpenCode,
27    AiOpenRouter,
28    AiVercel,
29    AiXAi,
30    AiZed,
31    Archive,
32    ArrowCircle,
33    ArrowDown,
34    ArrowDown10,
35    ArrowDownRight,
36    ArrowLeft,
37    ArrowRight,
38    ArrowRightLeft,
39    ArrowUp,
40    ArrowUpRight,
41    AtSign,
42    Attach,
43    AudioOff,
44    AudioOn,
45    Backspace,
46    Bell,
47    BellDot,
48    BellOff,
49    BellRing,
50    Binary,
51    Bitbucket,
52    Blocks,
53    Bookmark,
54    BoltFilled,
55    BoltOutlined,
56    Book,
57    BookCopy,
58    Box,
59    BoxOpen,
60    CaseSensitive,
61    Chat,
62    Check,
63    CheckDouble,
64    ChevronDown,
65    ChevronDownUp,
66    ChevronLeft,
67    ChevronRight,
68    ChevronUp,
69    ChevronUpDown,
70    Circle,
71    CircleHelp,
72    Clock,
73    Close,
74    CloudDownload,
75    Code,
76    Codeberg,
77    Command,
78    Compact,
79    Control,
80    Copilot,
81    CopilotDisabled,
82    CopilotError,
83    CopilotInit,
84    Copy,
85    CountdownTimer,
86    Crosshair,
87    CursorIBeam,
88    Dash,
89    DatabaseZap,
90    Debug,
91    DebugBreakpoint,
92    DebugContinue,
93    DebugDetach,
94    DebugDisabledBreakpoint,
95    DebugDisabledLogBreakpoint,
96    DebugIgnoreBreakpoints,
97    DebugLogBreakpoint,
98    DebugPause,
99    DebugStepInto,
100    DebugStepOut,
101    DebugStepOver,
102    Diff,
103    DiffSplit,
104    DiffSplitAuto,
105    DiffUnified,
106    Disconnected,
107    Download,
108    EditorAtom,
109    EditorCursor,
110    EditorEmacs,
111    EditorJetBrains,
112    EditorSublime,
113    EditorVsCode,
114    Ellipsis,
115    Envelope,
116    Eraser,
117    Escape,
118    Exit,
119    ExpandDown,
120    ExpandUp,
121    ExpandVertical,
122    Eye,
123    EyeOff,
124    FastForward,
125    FastForwardOff,
126    File,
127    FileCode,
128    FileDiff,
129    FileDoc,
130    FileGeneric,
131    FileGit,
132    FileIgnored,
133    FileLock,
134    FileMarkdown,
135    FileMultiple,
136    FileRust,
137    FileTextFilled,
138    FileTextOutlined,
139    FileToml,
140    FileTree,
141    Filter,
142    Flame,
143    FoldVertical,
144    Folder,
145    FolderAdd,
146    FolderInclude,
147    FolderOpen,
148    FolderSearch,
149    FolderShare,
150    FolderShared,
151    Font,
152    FontSize,
153    FontWeight,
154    Forgejo,
155    ForwardArrow,
156    ForwardArrowUp,
157    GenericClose,
158    GenericMaximize,
159    GenericMinimize,
160    GenericRestore,
161    Gerrit,
162    GitBranch,
163    GitBranchPlus,
164    GitCommit,
165    GitGraph,
166    GitMergeConflict,
167    GitWorktree,
168    Gitea,
169    Github,
170    Gitlab,
171    Hash,
172    HistoryRerun,
173    Image,
174    Inception,
175    Indicator,
176    Info,
177    Json,
178    Keyboard,
179    LineHeight,
180    Link,
181    Linux,
182    ListCollapse,
183    ListTodo,
184    ListTree,
185    ListX,
186    LoadCircle,
187    LocationEdit,
188    Lock,
189    LockOff,
190    MagnifyingGlass,
191    Maximize,
192    MaximizeAlt,
193    Menu,
194    Mic,
195    MicMute,
196    Minimize,
197    Notepad,
198    OmegaAgent,
199    OmegaAgentTwo,
200    OmegaAssistant,
201    OmegaPredict,
202    OmegaPredictDisabled,
203    OmegaPredictDown,
204    OmegaPredictError,
205    OmegaPredictUp,
206    OnCall,
207    Option,
208    PageDown,
209    PageUp,
210    Paperclip,
211    Pencil,
212    PencilUnavailable,
213    Person,
214    Pin,
215    PlayFilled,
216    PlayOutlined,
217    Plus,
218    Power,
219    Public,
220    PullRequest,
221    QueueMessage,
222    Quote,
223    Reader,
224    RefreshTitle,
225    Regex,
226    ReplNeutral,
227    Replace,
228    ReplaceAll,
229    ReplaceNext,
230    ReplyArrowRight,
231    Rerun,
232    Return,
233    RotateCcw,
234    RotateCw,
235    Scissors,
236    Screen,
237    SelectAll,
238    Send,
239    Server,
240    Settings,
241    Share,
242    Shift,
243    SignalHigh,
244    SignalLow,
245    SignalMedium,
246    Slash,
247    Sourcehut,
248    Space,
249    Sparkle,
250    Split,
251    SplitAlt,
252    SquareDot,
253    SquareMinus,
254    SquarePlus,
255    SrcCustom,
256    SrcExtension,
257    Star,
258    StarFilled,
259    Stop,
260    Tab,
261    Terminal,
262    TerminalAlt,
263    TextSnippet,
264    TextWrap,
265    TextUnwrap,
266    ThinkingMode,
267    ThinkingModeOff,
268    ThisWindow,
269    Thread,
270    ThreadFromSummary,
271    ThreadsSidebarLeftClosed,
272    ThreadsSidebarLeftOpen,
273    ThreadsSidebarRightClosed,
274    ThreadsSidebarRightOpen,
275    ThumbsDown,
276    ThumbsUp,
277    TodoComplete,
278    TodoPending,
279    TodoProgress,
280    ToolCopy,
281    ToolDeleteFile,
282    ToolDiagnostics,
283    ToolHammer,
284    ToolNotification,
285    ToolPencil,
286    ToolSearch,
287    ToolTerminal,
288    ToolThink,
289    ToolWeb,
290    Trash,
291    Triangle,
292    TriangleRight,
293    Undo,
294    Unpin,
295    UserArrowUp,
296    UserCheck,
297    UserGroup,
298    UserRoundPen,
299    Warning,
300    WholeWord,
301    XCircle,
302    XCircleFilled,
303}
304
305impl IconName {
306    /// Returns the path to this icon.
307    pub fn path(&self) -> Arc<str> {
308        let file_stem: &'static str = self.into();
309        format!("icons/{file_stem}.svg").into()
310    }
311}
312
313#[cfg(test)]
314mod tests {
315    use std::path::PathBuf;
316
317    use strum::{IntoEnumIterator as _, ParseError};
318
319    use crate::IconName;
320
321    #[test]
322    fn test_all_icons_exist() {
323        let asset_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../assets");
324
325        for icon in IconName::iter() {
326            let icon_path = asset_path.join(&*icon.path());
327            assert!(
328                icon_path.exists(),
329                "Icon {icon:?} does not exist at {icon_path:?}",
330            );
331        }
332    }
333
334    #[test]
335    fn test_no_dangling_icons() -> Result<(), ParseError> {
336        let icons_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../assets/icons");
337
338        for entry in std::fs::read_dir(&icons_dir).expect("failed to read icons directory") {
339            let path = entry.expect("failed to read icons directory entry").path();
340            if path.extension().is_none_or(|extension| extension != "svg") {
341                continue;
342            }
343            let file_stem = path
344                .file_stem()
345                .and_then(|file_stem| file_stem.to_str())
346                .expect("icon file name is not valid UTF-8");
347
348            file_stem.parse::<IconName>()?;
349        }
350
351        Ok(())
352    }
353}
354
Served at tenant.openagents/omega Member data and write actions are omitted.