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 Folder,
137 FolderOpen,
138 FolderPlus,
139 FolderSearch,
140 Font,
141 FontSize,
142 FontWeight,
143 ForwardArrow,
144 ForwardArrowUp,
145 GenericClose,
146 GenericMaximize,
147 GenericMinimize,
148 GenericRestore,
149 GitBranch,
150 GitBranchAlt,
151 GitBranchPlus,
152 GitCommit,
153 GitGraph,
154 GitMergeConflict,
155 GitWorktree,
156 Github,
157 Hash,
158 HistoryRerun,
159 Image,
160 Inception,
161 Indicator,
162 Info,
163 Json,
164 Keyboard,
165 Library,
166 LineHeight,
167 Link,
168 Linux,
169 ListCollapse,
170 ListFilter,
171 ListTodo,
172 ListTree,
173 ListX,
174 LoadCircle,
175 LocationEdit,
176 LockOutlined,
177 MagnifyingGlass,
178 Maximize,
179 Menu,
180 MenuAlt,
181 MenuAltTemp,
182 Mic,
183 MicMute,
184 Minimize,
185 NewThread,
186 Notepad,
187 OpenFolder,
188 Option,
189 PageDown,
190 PageUp,
191 Paperclip,
192 Pencil,
193 PencilUnavailable,
194 Person,
195 Pin,
196 PlayFilled,
197 PlayOutlined,
198 Plus,
199 Power,
200 Public,
201 PullRequest,
202 QueueMessage,
203 Quote,
204 Reader,
205 RefreshTitle,
206 Regex,
207 ReplNeutral,
208 Replace,
209 ReplaceAll,
210 ReplaceNext,
211 ReplyArrowRight,
212 Rerun,
213 Return,
214 RotateCcw,
215 RotateCw,
216 Scissors,
217 Screen,
218 SelectAll,
219 Send,
220 Server,
221 Settings,
222 ShieldCheck,
223 Shift,
224 SignalHigh,
225 SignalLow,
226 SignalMedium,
227 Slash,
228 Sliders,
229 Space,
230 Sparkle,
231 Split,
232 SplitAlt,
233 SquareDot,
234 SquareMinus,
235 SquarePlus,
236 Star,
237 StarFilled,
238 Stop,
239 SwatchBook,
240 SweepAi,
241 SweepAiDisabled,
242 SweepAiDown,
243 SweepAiError,
244 SweepAiUp,
245 Tab,
246 Terminal,
247 TerminalAlt,
248 TerminalGhost,
249 TextSnippet,
250 TextThread,
251 ThinkingMode,
252 ThinkingModeOff,
253 Thread,
254 ThreadFromSummary,
255 ThreadsSidebarLeftClosed,
256 ThreadsSidebarLeftOpen,
257 ThreadsSidebarRightClosed,
258 ThreadsSidebarRightOpen,
259 ThumbsDown,
260 ThumbsUp,
261 TodoComplete,
262 TodoPending,
263 TodoProgress,
264 ToolCopy,
265 ToolDeleteFile,
266 ToolDiagnostics,
267 ToolFolder,
268 ToolHammer,
269 ToolNotification,
270 ToolPencil,
271 ToolRead,
272 ToolRegex,
273 ToolSearch,
274 ToolTerminal,
275 ToolThink,
276 ToolWeb,
277 Trash,
278 Triangle,
279 TriangleRight,
280 Undo,
281 Unpin,
282 UserCheck,
283 UserGroup,
284 UserRoundPen,
285 Warning,
286 WholeWord,
287 XCircle,
288 XCircleFilled,
289 ZedAgent,
290 ZedAgentTwo,
291 ZedAssistant,
292 ZedPredict,
293 ZedPredictDisabled,
294 ZedPredictDown,
295 ZedPredictError,
296 ZedPredictUp,
297 ZedSrcCustom,
298 ZedSrcExtension,
299 ZedXCopilot,
300}
301
302impl IconName {
303 /// Returns the path to this icon.
304 pub fn path(&self) -> Arc<str> {
305 let file_stem: &'static str = self.into();
306 format!("icons/{file_stem}.svg").into()
307 }
308}