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 DebugDisconnect,
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 Download,
98 Ellipsis,
99 EllipsisVertical,
100 Envelope,
101 Eraser,
102 Escape,
103 Exit,
104 ExpandDown,
105 ExpandUp,
106 ExpandVertical,
107 ExternalLink,
108 Eye,
109 File,
110 FileCode,
111 FileCreate,
112 FileDelete,
113 FileDiff,
114 FileDoc,
115 FileGeneric,
116 FileGit,
117 FileLock,
118 FileRust,
119 FileSearch,
120 FileText,
121 FileToml,
122 FileTree,
123 Filter,
124 Flame,
125 Folder,
126 FolderOpen,
127 FolderX,
128 Font,
129 FontSize,
130 FontWeight,
131 ForwardArrow,
132 Function,
133 GenericClose,
134 GenericMaximize,
135 GenericMinimize,
136 GenericRestore,
137 GitBranch,
138 GitBranchSmall,
139 Github,
140 Globe,
141 Hammer,
142 Hash,
143 HistoryRerun,
144 Image,
145 Indicator,
146 Info,
147 InlayHint,
148 Keyboard,
149 Layout,
150 Library,
151 LightBulb,
152 LineHeight,
153 Link,
154 ListCollapse,
155 ListTree,
156 ListX,
157 LockOutlined,
158 MagnifyingGlass,
159 MailOpen,
160 Maximize,
161 Menu,
162 MenuAlt,
163 MessageBubbles,
164 Mic,
165 MicMute,
166 Microscope,
167 Minimize,
168 Option,
169 PageDown,
170 PageUp,
171 PanelLeft,
172 PanelRight,
173 Pencil,
174 Person,
175 PersonCircle,
176 PhoneIncoming,
177 Pin,
178 Play,
179 Plus,
180 PocketKnife,
181 Power,
182 Public,
183 PullRequest,
184 Quote,
185 RefreshTitle,
186 Regex,
187 ReplNeutral,
188 Replace,
189 ReplaceAll,
190 ReplaceNext,
191 ReplyArrowRight,
192 Rerun,
193 Return,
194 Reveal,
195 RotateCcw,
196 RotateCw,
197 Route,
198 Save,
199 Scissors,
200 Screen,
201 SearchCode,
202 SearchSelection,
203 SelectAll,
204 Send,
205 Server,
206 Settings,
207 SettingsAlt,
208 Shift,
209 Slash,
210 SlashSquare,
211 Sliders,
212 SlidersVertical,
213 Snip,
214 Space,
215 Sparkle,
216 SparkleAlt,
217 SparkleFilled,
218 Spinner,
219 Split,
220 SquareDot,
221 SquareMinus,
222 SquarePlus,
223 Star,
224 StarFilled,
225 Stop,
226 StopFilled,
227 Strikethrough,
228 Supermaven,
229 SupermavenDisabled,
230 SupermavenError,
231 SupermavenInit,
232 SwatchBook,
233 Tab,
234 Terminal,
235 TextSnippet,
236 ThumbsDown,
237 ThumbsUp,
238 Trash,
239 TrashAlt,
240 Triangle,
241 TriangleRight,
242 Undo,
243 Unpin,
244 Update,
245 UserCheck,
246 UserGroup,
247 UserRoundPen,
248 Visible,
249 Wand,
250 Warning,
251 WholeWord,
252 X,
253 XCircle,
254 ZedAssistant,
255 ZedAssistantFilled,
256 ZedMaxMode,
257 ZedPredict,
258 ZedPredictDisabled,
259 ZedPredictDown,
260 ZedPredictError,
261 ZedPredictUp,
262 ZedXCopilot,
263}
264
265impl IconName {
266 /// Returns the path to this icon.
267 pub fn path(&self) -> Arc<str> {
268 let file_stem: &'static str = self.into();
269 format!("icons/{file_stem}.svg").into()
270 }
271}