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