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