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