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