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    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    MaximizeAlt,
179    Menu,
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    Shift,
222    SignalHigh,
223    SignalLow,
224    SignalMedium,
225    Slash,
226    Sliders,
227    Space,
228    Sparkle,
229    Split,
230    SplitAlt,
231    SquareDot,
232    SquareMinus,
233    SquarePlus,
234    Star,
235    StarFilled,
236    Stop,
237    Tab,
238    Terminal,
239    TerminalAlt,
240    TextSnippet,
241    ThinkingMode,
242    ThinkingModeOff,
243    Thread,
244    ThreadFromSummary,
245    ThreadImport,
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}