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