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    Close,
 70    CloudDownload,
 71    Code,
 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    DiffSplitAuto,
 99    DiffUnified,
100    Disconnected,
101    Download,
102    EditorAtom,
103    EditorCursor,
104    EditorEmacs,
105    EditorJetBrains,
106    EditorSublime,
107    EditorVsCode,
108    Ellipsis,
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    FolderOpenAdd,
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    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    ThreadImport,
247    ThreadsSidebarLeftClosed,
248    ThreadsSidebarLeftOpen,
249    ThreadsSidebarRightClosed,
250    ThreadsSidebarRightOpen,
251    ThumbsDown,
252    ThumbsUp,
253    TodoComplete,
254    TodoPending,
255    TodoProgress,
256    ToolCopy,
257    ToolDeleteFile,
258    ToolDiagnostics,
259    ToolFolder,
260    ToolHammer,
261    ToolNotification,
262    ToolPencil,
263    ToolSearch,
264    ToolTerminal,
265    ToolThink,
266    ToolWeb,
267    Trash,
268    Triangle,
269    TriangleRight,
270    Undo,
271    Unpin,
272    UserCheck,
273    UserGroup,
274    UserRoundPen,
275    Warning,
276    WholeWord,
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}
290
291impl IconName {
292    /// Returns the path to this icon.
293    pub fn path(&self) -> Arc<str> {
294        let file_stem: &'static str = self.into();
295        format!("icons/{file_stem}.svg").into()
296    }
297}