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 AcpRegistry,
12 Ai,
13 AiAnthropic,
14 AiBedrock,
15 AiClaude,
16 AiDeepSeek,
17 AiEdit,
18 AiGemini,
19 AiGoogle,
20 AiLmStudio,
21 AiMistral,
22 AiOllama,
23 AiOpenAi,
24 AiOpenAiCompat,
25 AiOpenCode,
26 AiOpenRouter,
27 AiVercel,
28 AiVZero,
29 AiXAi,
30 AiZed,
31 Archive,
32 ArrowCircle,
33 ArrowDown,
34 ArrowDown10,
35 ArrowDownRight,
36 ArrowLeft,
37 ArrowRight,
38 ArrowRightLeft,
39 ArrowUp,
40 ArrowUpRight,
41 AtSign,
42 Attach,
43 AudioOff,
44 AudioOn,
45 Backspace,
46 Bell,
47 BellDot,
48 BellOff,
49 BellRing,
50 Binary,
51 Blocks,
52 BoltFilled,
53 BoltOutlined,
54 Book,
55 BookCopy,
56 Box,
57 CaseSensitive,
58 Chat,
59 Check,
60 CheckDouble,
61 ChevronDown,
62 ChevronDownUp,
63 ChevronLeft,
64 ChevronRight,
65 ChevronUp,
66 ChevronUpDown,
67 Circle,
68 CircleHelp,
69 Close,
70 CloudDownload,
71 Code,
72 Cog,
73 Command,
74 Control,
75 Copilot,
76 CopilotDisabled,
77 CopilotError,
78 CopilotInit,
79 Copy,
80 CountdownTimer,
81 Crosshair,
82 CursorIBeam,
83 Dash,
84 DatabaseZap,
85 Debug,
86 DebugBreakpoint,
87 DebugContinue,
88 DebugDetach,
89 DebugDisabledBreakpoint,
90 DebugDisabledLogBreakpoint,
91 DebugIgnoreBreakpoints,
92 DebugLogBreakpoint,
93 DebugPause,
94 DebugStepInto,
95 DebugStepOut,
96 DebugStepOver,
97 Diff,
98 DiffSplit,
99 DiffUnified,
100 Disconnected,
101 Download,
102 EditorAtom,
103 EditorCursor,
104 EditorEmacs,
105 EditorJetBrains,
106 EditorSublime,
107 EditorVsCode,
108 Ellipsis,
109 EllipsisVertical,
110 Envelope,
111 Eraser,
112 Escape,
113 Exit,
114 ExpandDown,
115 ExpandUp,
116 ExpandVertical,
117 Eye,
118 EyeOff,
119 FastForward,
120 FastForwardOff,
121 File,
122 FileCode,
123 FileDiff,
124 FileDoc,
125 FileGeneric,
126 FileGit,
127 FileLock,
128 FileMarkdown,
129 FileRust,
130 FileTextFilled,
131 FileTextOutlined,
132 FileToml,
133 FileTree,
134 Filter,
135 Flame,
136 Focus,
137 Folder,
138 FolderOpen,
139 FolderPlus,
140 FolderSearch,
141 Font,
142 FontSize,
143 FontWeight,
144 ForwardArrow,
145 ForwardArrowUp,
146 GenericClose,
147 GenericMaximize,
148 GenericMinimize,
149 GenericRestore,
150 GitBranch,
151 GitBranchAlt,
152 GitBranchPlus,
153 GitCommit,
154 GitGraph,
155 GitMergeConflict,
156 GitWorktree,
157 Github,
158 Hash,
159 HistoryRerun,
160 Image,
161 Inception,
162 Indicator,
163 Info,
164 Json,
165 Keyboard,
166 Library,
167 LineHeight,
168 Link,
169 Linux,
170 ListCollapse,
171 ListFilter,
172 ListTodo,
173 ListTree,
174 ListX,
175 LoadCircle,
176 LocationEdit,
177 LockOutlined,
178 MagnifyingGlass,
179 Maximize,
180 Menu,
181 MenuAlt,
182 MenuAltTemp,
183 Mic,
184 MicMute,
185 Minimize,
186 NewThread,
187 Notepad,
188 OpenFolder,
189 Option,
190 PageDown,
191 PageUp,
192 Paperclip,
193 Pencil,
194 PencilUnavailable,
195 Person,
196 Pin,
197 PlayFilled,
198 PlayOutlined,
199 Plus,
200 Power,
201 Public,
202 PullRequest,
203 QueueMessage,
204 Quote,
205 Reader,
206 RefreshTitle,
207 Regex,
208 ReplNeutral,
209 Replace,
210 ReplaceAll,
211 ReplaceNext,
212 ReplyArrowRight,
213 Rerun,
214 Return,
215 RotateCcw,
216 RotateCw,
217 Scissors,
218 Screen,
219 SelectAll,
220 Send,
221 Server,
222 Settings,
223 ShieldCheck,
224 Shift,
225 SignalHigh,
226 SignalLow,
227 SignalMedium,
228 Slash,
229 Sliders,
230 Space,
231 Sparkle,
232 Split,
233 SplitAlt,
234 SquareDot,
235 SquareMinus,
236 SquarePlus,
237 Star,
238 StarFilled,
239 Stop,
240 SwatchBook,
241 SweepAi,
242 SweepAiDisabled,
243 SweepAiDown,
244 SweepAiError,
245 SweepAiUp,
246 Tab,
247 Terminal,
248 TerminalAlt,
249 TerminalGhost,
250 TextSnippet,
251 TextThread,
252 ThinkingMode,
253 ThinkingModeOff,
254 Thread,
255 ThreadFromSummary,
256 ThreadsSidebarLeftClosed,
257 ThreadsSidebarLeftOpen,
258 ThreadsSidebarRightClosed,
259 ThreadsSidebarRightOpen,
260 ThumbsDown,
261 ThumbsUp,
262 TodoComplete,
263 TodoPending,
264 TodoProgress,
265 ToolCopy,
266 ToolDeleteFile,
267 ToolDiagnostics,
268 ToolFolder,
269 ToolHammer,
270 ToolNotification,
271 ToolPencil,
272 ToolRead,
273 ToolRegex,
274 ToolSearch,
275 ToolTerminal,
276 ToolThink,
277 ToolWeb,
278 Trash,
279 Triangle,
280 TriangleRight,
281 Undo,
282 Unpin,
283 UserCheck,
284 UserGroup,
285 UserRoundPen,
286 Warning,
287 WholeWord,
288 XCircle,
289 XCircleFilled,
290 ZedAgent,
291 ZedAgentTwo,
292 ZedAssistant,
293 ZedPredict,
294 ZedPredictDisabled,
295 ZedPredictDown,
296 ZedPredictError,
297 ZedPredictUp,
298 ZedSrcCustom,
299 ZedSrcExtension,
300 ZedXCopilot,
301}
302
303impl IconName {
304 /// Returns the path to this icon.
305 pub fn path(&self) -> Arc<str> {
306 let file_stem: &'static str = self.into();
307 format!("icons/{file_stem}.svg").into()
308 }
309}