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 Hammer,
141 Hash,
142 HistoryRerun,
143 Image,
144 Indicator,
145 Info,
146 InlayHint,
147 Keyboard,
148 Layout,
149 Library,
150 LightBulb,
151 LineHeight,
152 Link,
153 ListTree,
154 ListX,
155 LockOutlined,
156 MagnifyingGlass,
157 MailOpen,
158 Maximize,
159 Menu,
160 MenuAlt,
161 MessageBubbles,
162 Mic,
163 MicMute,
164 Microscope,
165 Minimize,
166 Option,
167 PageDown,
168 PageUp,
169 PanelLeft,
170 PanelRight,
171 Pencil,
172 Person,
173 PersonCircle,
174 PhoneIncoming,
175 Pin,
176 Play,
177 Plus,
178 PocketKnife,
179 Power,
180 Public,
181 PullRequest,
182 Quote,
183 RefreshTitle,
184 Regex,
185 ReplNeutral,
186 Replace,
187 ReplaceAll,
188 ReplaceNext,
189 ReplyArrowRight,
190 Rerun,
191 Return,
192 Reveal,
193 RotateCcw,
194 RotateCw,
195 Route,
196 Save,
197 Screen,
198 SearchCode,
199 SearchSelection,
200 SelectAll,
201 Send,
202 Server,
203 Settings,
204 SettingsAlt,
205 Shift,
206 Slash,
207 SlashSquare,
208 Sliders,
209 SlidersVertical,
210 Snip,
211 Space,
212 Sparkle,
213 SparkleAlt,
214 SparkleFilled,
215 Spinner,
216 Split,
217 SquareDot,
218 SquareMinus,
219 SquarePlus,
220 Star,
221 StarFilled,
222 Stop,
223 StopFilled,
224 Strikethrough,
225 Supermaven,
226 SupermavenDisabled,
227 SupermavenError,
228 SupermavenInit,
229 SwatchBook,
230 Tab,
231 Terminal,
232 TextSnippet,
233 ThumbsDown,
234 ThumbsUp,
235 Trash,
236 TrashAlt,
237 Triangle,
238 TriangleRight,
239 Undo,
240 Unpin,
241 Update,
242 UserCheck,
243 UserGroup,
244 UserRoundPen,
245 Visible,
246 Wand,
247 Warning,
248 WholeWord,
249 X,
250 XCircle,
251 ZedAssistant,
252 ZedAssistantFilled,
253 ZedMaxMode,
254 ZedPredict,
255 ZedPredictDisabled,
256 ZedPredictDown,
257 ZedPredictError,
258 ZedPredictUp,
259 ZedXCopilot,
260}
261
262impl IconName {
263 /// Returns the path to this icon.
264 pub fn path(&self) -> Arc<str> {
265 let file_stem: &'static str = self.into();
266 format!("icons/{file_stem}.svg").into()
267 }
268}