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