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    Bookmark,
 52    BoltFilled,
 53    BoltOutlined,
 54    Book,
 55    BookCopy,
 56    Box,
 57    BoxOpen,
 58    CaseSensitive,
 59    Chat,
 60    Check,
 61    CheckDouble,
 62    ChevronDown,
 63    ChevronDownUp,
 64    ChevronLeft,
 65    ChevronRight,
 66    ChevronUp,
 67    ChevronUpDown,
 68    Circle,
 69    CircleHelp,
 70    Clock,
 71    Close,
 72    CloudDownload,
 73    Code,
 74    Command,
 75    Control,
 76    Copilot,
 77    CopilotDisabled,
 78    CopilotError,
 79    CopilotInit,
 80    Copy,
 81    CountdownTimer,
 82    Crosshair,
 83    CursorIBeam,
 84    Dash,
 85    DatabaseZap,
 86    Debug,
 87    DebugBreakpoint,
 88    DebugContinue,
 89    DebugDetach,
 90    DebugDisabledBreakpoint,
 91    DebugDisabledLogBreakpoint,
 92    DebugIgnoreBreakpoints,
 93    DebugLogBreakpoint,
 94    DebugPause,
 95    DebugStepInto,
 96    DebugStepOut,
 97    DebugStepOver,
 98    Diff,
 99    DiffSplit,
100    DiffSplitAuto,
101    DiffUnified,
102    Disconnected,
103    Download,
104    EditorAtom,
105    EditorCursor,
106    EditorEmacs,
107    EditorJetBrains,
108    EditorSublime,
109    EditorVsCode,
110    Ellipsis,
111    Envelope,
112    Eraser,
113    Escape,
114    Exit,
115    ExpandDown,
116    ExpandUp,
117    ExpandVertical,
118    Eye,
119    EyeOff,
120    FastForward,
121    FastForwardOff,
122    File,
123    FileCode,
124    FileDiff,
125    FileDoc,
126    FileGeneric,
127    FileGit,
128    FileLock,
129    FileMarkdown,
130    FileRust,
131    FileTextFilled,
132    FileTextOutlined,
133    FileToml,
134    FileTree,
135    Filter,
136    Flame,
137    Folder,
138    FolderOpen,
139    FolderOpenAdd,
140    FolderSearch,
141    Font,
142    FontSize,
143    FontWeight,
144    ForwardArrow,
145    ForwardArrowUp,
146    GenericClose,
147    GenericMaximize,
148    GenericMinimize,
149    GenericRestore,
150    GitBranch,
151    GitBranchPlus,
152    GitCommit,
153    GitGraph,
154    GitMergeConflict,
155    GitWorktree,
156    Github,
157    Hash,
158    HistoryRerun,
159    Image,
160    Inception,
161    Indicator,
162    Info,
163    Json,
164    Keyboard,
165    Library,
166    LineHeight,
167    Link,
168    Linux,
169    ListCollapse,
170    ListFilter,
171    ListTodo,
172    ListTree,
173    ListX,
174    LoadCircle,
175    LocationEdit,
176    LockOutlined,
177    MagnifyingGlass,
178    Maximize,
179    MaximizeAlt,
180    Menu,
181    MenuAltTemp,
182    Mic,
183    MicMute,
184    Minimize,
185    NewThread,
186    Notepad,
187    OpenFolder,
188    OpenNewWindow,
189    Option,
190    PageDown,
191    PageUp,
192    Paperclip,
193    Pencil,
194    PencilUnavailable,
195    Person,
196    Pin,
197    PlayFilled,
198    PlayOutlined,
199    Plus,
200    Power,
201    Public,
202    PullRequest,
203    QueueMessage,
204    Quote,
205    Reader,
206    RefreshTitle,
207    Regex,
208    ReplNeutral,
209    Replace,
210    ReplaceAll,
211    ReplaceNext,
212    ReplyArrowRight,
213    Rerun,
214    Return,
215    RotateCcw,
216    RotateCw,
217    Scissors,
218    Screen,
219    SelectAll,
220    Send,
221    Server,
222    Settings,
223    Shift,
224    SignalHigh,
225    SignalLow,
226    SignalMedium,
227    Slash,
228    Sliders,
229    Space,
230    Sparkle,
231    Split,
232    SplitAlt,
233    SquareDot,
234    SquareMinus,
235    SquarePlus,
236    Star,
237    StarFilled,
238    Stop,
239    Tab,
240    Terminal,
241    TerminalAlt,
242    TextSnippet,
243    ThinkingMode,
244    ThinkingModeOff,
245    Thread,
246    ThreadFromSummary,
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}