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    AiAnthropic,
 13    AiBedrock,
 14    AiClaude,
 15    AiDeepSeek,
 16    AiEdit,
 17    AiGemini,
 18    AiGoogle,
 19    AiLmStudio,
 20    AiMistral,
 21    AiOllama,
 22    AiOpenAi,
 23    AiOpenAiCompat,
 24    AiOpenCode,
 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    BoxOpen,
 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    Clock,
 70    Close,
 71    CloudDownload,
 72    Code,
 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    DiffSplitAuto,
100    DiffUnified,
101    Disconnected,
102    Download,
103    EditorAtom,
104    EditorCursor,
105    EditorEmacs,
106    EditorJetBrains,
107    EditorSublime,
108    EditorVsCode,
109    Ellipsis,
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    FolderOpenAdd,
139    FolderSearch,
140    Font,
141    FontSize,
142    FontWeight,
143    ForwardArrow,
144    ForwardArrowUp,
145    GenericClose,
146    GenericMaximize,
147    GenericMinimize,
148    GenericRestore,
149    GitBranch,
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    MaximizeAlt,
179    Menu,
180    MenuAltTemp,
181    Mic,
182    MicMute,
183    Minimize,
184    NewThread,
185    Notepad,
186    OpenFolder,
187    OpenNewWindow,
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    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    Tab,
239    Terminal,
240    TerminalAlt,
241    TextSnippet,
242    ThinkingMode,
243    ThinkingModeOff,
244    Thread,
245    ThreadFromSummary,
246    ThreadsSidebarLeftClosed,
247    ThreadsSidebarLeftOpen,
248    ThreadsSidebarRightClosed,
249    ThreadsSidebarRightOpen,
250    ThumbsDown,
251    ThumbsUp,
252    TodoComplete,
253    TodoPending,
254    TodoProgress,
255    ToolCopy,
256    ToolDeleteFile,
257    ToolDiagnostics,
258    ToolFolder,
259    ToolHammer,
260    ToolNotification,
261    ToolPencil,
262    ToolSearch,
263    ToolTerminal,
264    ToolThink,
265    ToolWeb,
266    Trash,
267    Triangle,
268    TriangleRight,
269    Undo,
270    Unpin,
271    UserCheck,
272    UserGroup,
273    UserRoundPen,
274    Warning,
275    WholeWord,
276    XCircle,
277    XCircleFilled,
278    ZedAgent,
279    ZedAgentTwo,
280    ZedAssistant,
281    ZedPredict,
282    ZedPredictDisabled,
283    ZedPredictDown,
284    ZedPredictError,
285    ZedPredictUp,
286    ZedSrcCustom,
287    ZedSrcExtension,
288}
289
290impl IconName {
291    /// Returns the path to this icon.
292    pub fn path(&self) -> Arc<str> {
293        let file_stem: &'static str = self.into();
294        format!("icons/{file_stem}.svg").into()
295    }
296}