icons.rs

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