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