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 Ai,
12 AiAnthropic,
13 AiBedrock,
14 AiAnthropicHosted,
15 AiDeepSeek,
16 AiEdit,
17 AiGoogle,
18 AiLmStudio,
19 AiMistral,
20 AiOllama,
21 AiOpenAi,
22 AiZed,
23 ArrowCircle,
24 ArrowDown,
25 ArrowDownFromLine,
26 ArrowLeft,
27 ArrowRight,
28 ArrowRightLeft,
29 ArrowUp,
30 ArrowUpFromLine,
31 ArrowUpRight,
32 ArrowUpRightAlt,
33 AtSign,
34 AudioOff,
35 AudioOn,
36 Backspace,
37 Bell,
38 BellDot,
39 BellOff,
40 BellRing,
41 Blocks,
42 Bolt,
43 Book,
44 BookCopy,
45 BookPlus,
46 Brain,
47 CaseSensitive,
48 Check,
49 ChevronDown,
50 /// This chevron indicates a popover menu.
51 ChevronDownSmall,
52 ChevronLeft,
53 ChevronRight,
54 ChevronUp,
55 ChevronUpDown,
56 Circle,
57 Clipboard,
58 Close,
59 Code,
60 Cog,
61 Command,
62 Context,
63 Control,
64 Copilot,
65 CopilotDisabled,
66 CopilotError,
67 CopilotInit,
68 Copy,
69 CountdownTimer,
70 CursorIBeam,
71 Dash,
72 DebugBreakpoint,
73 DebugDisabledBreakpoint,
74 DebugDisabledLogBreakpoint,
75 DebugIgnoreBreakpoints,
76 DebugPause,
77 DebugContinue,
78 DebugStepOver,
79 DebugStepInto,
80 DebugStepOut,
81 DebugStepBack,
82 DebugRestart,
83 Debug,
84 DebugStop,
85 DebugDisconnect,
86 DebugLogBreakpoint,
87 DatabaseZap,
88 Delete,
89 Diff,
90 Disconnected,
91 Download,
92 Ellipsis,
93 EllipsisVertical,
94 Envelope,
95 Eraser,
96 Escape,
97 ExpandVertical,
98 Exit,
99 ExternalLink,
100 ExpandUp,
101 ExpandDown,
102 Eye,
103 File,
104 FileCode,
105 FileCreate,
106 FileDelete,
107 FileDoc,
108 FileDiff,
109 FileGeneric,
110 FileGit,
111 FileLock,
112 FileRust,
113 FileSearch,
114 FileText,
115 FileToml,
116 FileTree,
117 Filter,
118 Folder,
119 FolderOpen,
120 FolderX,
121 Font,
122 FontSize,
123 FontWeight,
124 GenericClose,
125 GenericMaximize,
126 GenericMinimize,
127 GenericRestore,
128 Github,
129 Globe,
130 GitBranch,
131 GitBranchSmall,
132 Hash,
133 HistoryRerun,
134 Indicator,
135 Info,
136 InlayHint,
137 Keyboard,
138 Library,
139 LineHeight,
140 Link,
141 ListTree,
142 ListX,
143 LockOutlined,
144 MagnifyingGlass,
145 MailOpen,
146 Maximize,
147 Menu,
148 MessageBubbles,
149 MessageCircle,
150 Cloud,
151 Mic,
152 MicMute,
153 Microscope,
154 Minimize,
155 Option,
156 PageDown,
157 PageUp,
158 PanelLeft,
159 PanelRight,
160 Pencil,
161 Person,
162 PersonCircle,
163 PhoneIncoming,
164 Pin,
165 Play,
166 Plus,
167 PocketKnife,
168 Public,
169 PullRequest,
170 Quote,
171 RefreshTitle,
172 Regex,
173 ReplNeutral,
174 Replace,
175 ReplaceAll,
176 ReplaceNext,
177 ReplyArrowRight,
178 Rerun,
179 Return,
180 Reveal,
181 RotateCcw,
182 RotateCw,
183 Route,
184 Save,
185 Screen,
186 SearchCode,
187 SearchSelection,
188 SelectAll,
189 Server,
190 Settings,
191 SettingsAlt,
192 Shift,
193 Slash,
194 SlashSquare,
195 Sliders,
196 SlidersVertical,
197 Snip,
198 Space,
199 Sparkle,
200 SparkleAlt,
201 SparkleFilled,
202 Spinner,
203 Split,
204 SquareDot,
205 SquareMinus,
206 SquarePlus,
207 Star,
208 StarFilled,
209 Stop,
210 Strikethrough,
211 Supermaven,
212 SupermavenDisabled,
213 SupermavenError,
214 SupermavenInit,
215 SwatchBook,
216 Tab,
217 Terminal,
218 TextSnippet,
219 ThumbsUp,
220 ThumbsDown,
221 Trash,
222 TrashAlt,
223 Triangle,
224 TriangleRight,
225 Undo,
226 Unpin,
227 Update,
228 UserGroup,
229 Visible,
230 Wand,
231 Warning,
232 WholeWord,
233 X,
234 XCircle,
235 ZedAssistant,
236 ZedAssistantFilled,
237 ZedPredict,
238 ZedPredictUp,
239 ZedPredictDown,
240 ZedPredictDisabled,
241 ZedPredictError,
242 ZedXCopilot,
243}
244
245impl IconName {
246 /// Returns the path to this icon.
247 pub fn path(&self) -> Arc<str> {
248 let file_stem: &'static str = self.into();
249 format!("icons/{file_stem}.svg").into()
250 }
251}