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    Ai,
 12    AiAnthropic,
 13    AiBedrock,
 14    AiDeepSeek,
 15    AiEdit,
 16    AiGoogle,
 17    AiLmStudio,
 18    AiMistral,
 19    AiOllama,
 20    AiOpenAi,
 21    AiOpenRouter,
 22    AiZed,
 23    ArrowCircle,
 24    ArrowDown,
 25    ArrowDownFromLine,
 26    ArrowDownRight,
 27    ArrowLeft,
 28    ArrowRight,
 29    ArrowRightLeft,
 30    ArrowUp,
 31    ArrowUpFromLine,
 32    ArrowUpRight,
 33    ArrowUpRightAlt,
 34    AtSign,
 35    AudioOff,
 36    AudioOn,
 37    Backspace,
 38    Bell,
 39    BellDot,
 40    BellOff,
 41    BellRing,
 42    Binary,
 43    Blocks,
 44    Bolt,
 45    BoltFilled,
 46    Book,
 47    BookCopy,
 48    BookPlus,
 49    Brain,
 50    BugOff,
 51    CaseSensitive,
 52    Check,
 53    CheckDouble,
 54    ChevronDown,
 55    /// This chevron indicates a popover menu.
 56    ChevronDownSmall,
 57    ChevronLeft,
 58    ChevronRight,
 59    ChevronUp,
 60    ChevronUpDown,
 61    Circle,
 62    CircleOff,
 63    Clipboard,
 64    Close,
 65    Cloud,
 66    Code,
 67    Cog,
 68    Command,
 69    Context,
 70    Control,
 71    Copilot,
 72    CopilotDisabled,
 73    CopilotError,
 74    CopilotInit,
 75    Copy,
 76    CountdownTimer,
 77    Crosshair,
 78    CursorIBeam,
 79    Dash,
 80    DatabaseZap,
 81    Debug,
 82    DebugBreakpoint,
 83    DebugContinue,
 84    DebugDisabledBreakpoint,
 85    DebugDisabledLogBreakpoint,
 86    DebugDetach,
 87    DebugIgnoreBreakpoints,
 88    DebugLogBreakpoint,
 89    DebugPause,
 90    DebugRestart,
 91    DebugStepBack,
 92    DebugStepInto,
 93    DebugStepOut,
 94    DebugStepOver,
 95    DebugStop,
 96    Delete,
 97    Diff,
 98    Disconnected,
 99    DocumentText,
100    Download,
101    Ellipsis,
102    EllipsisVertical,
103    Envelope,
104    Eraser,
105    Escape,
106    Exit,
107    ExpandDown,
108    ExpandUp,
109    ExpandVertical,
110    ExternalLink,
111    Eye,
112    File,
113    FileCode,
114    FileCreate,
115    FileDelete,
116    FileDiff,
117    FileDoc,
118    FileGeneric,
119    FileGit,
120    FileLock,
121    FileRust,
122    FileSearch,
123    FileText,
124    FileToml,
125    FileTree,
126    Filter,
127    Flame,
128    Folder,
129    FolderOpen,
130    FolderX,
131    Font,
132    FontSize,
133    FontWeight,
134    ForwardArrow,
135    Function,
136    GenericClose,
137    GenericMaximize,
138    GenericMinimize,
139    GenericRestore,
140    GitBranch,
141    GitBranchSmall,
142    Github,
143    Globe,
144    Hammer,
145    Hash,
146    HistoryRerun,
147    Image,
148    Indicator,
149    Info,
150    InlayHint,
151    Keyboard,
152    Layout,
153    Library,
154    LightBulb,
155    LineHeight,
156    Link,
157    ListCollapse,
158    ListTree,
159    ListX,
160    LoadCircle,
161    LockOutlined,
162    MagnifyingGlass,
163    MailOpen,
164    Maximize,
165    Menu,
166    MenuAlt,
167    MessageBubbles,
168    Mic,
169    MicMute,
170    Microscope,
171    Minimize,
172    Option,
173    PageDown,
174    PageUp,
175    PanelLeft,
176    PanelRight,
177    Pencil,
178    Person,
179    PersonCircle,
180    PhoneIncoming,
181    Pin,
182    Play,
183    PlayAlt,
184    PlayBug,
185    Plus,
186    PocketKnife,
187    Power,
188    Public,
189    PullRequest,
190    Quote,
191    RefreshTitle,
192    Regex,
193    ReplNeutral,
194    Replace,
195    ReplaceAll,
196    ReplaceNext,
197    ReplyArrowRight,
198    Rerun,
199    Return,
200    Reveal,
201    RotateCcw,
202    RotateCw,
203    Route,
204    Save,
205    Scissors,
206    Screen,
207    SearchCode,
208    SearchSelection,
209    SelectAll,
210    Send,
211    Server,
212    Settings,
213    SettingsAlt,
214    Shift,
215    Slash,
216    SlashSquare,
217    Sliders,
218    SlidersVertical,
219    Snip,
220    Space,
221    Sparkle,
222    SparkleAlt,
223    SparkleFilled,
224    Spinner,
225    Split,
226    SquareDot,
227    SquareMinus,
228    SquarePlus,
229    Star,
230    StarFilled,
231    Stop,
232    StopFilled,
233    Strikethrough,
234    Supermaven,
235    SupermavenDisabled,
236    SupermavenError,
237    SupermavenInit,
238    SwatchBook,
239    Tab,
240    Terminal,
241    TextSnippet,
242    ThumbsDown,
243    ThumbsUp,
244    Trash,
245    TrashAlt,
246    Triangle,
247    TriangleRight,
248    Undo,
249    Unpin,
250    Update,
251    UserCheck,
252    UserGroup,
253    UserRoundPen,
254    Visible,
255    Wand,
256    Warning,
257    WholeWord,
258    X,
259    XCircle,
260    ZedAssistant,
261    ZedAssistantFilled,
262    ZedBurnMode,
263    ZedBurnModeOn,
264    ZedPredict,
265    ZedPredictDisabled,
266    ZedPredictDown,
267    ZedPredictError,
268    ZedPredictUp,
269    ZedXCopilot,
270}
271
272impl IconName {
273    /// Returns the path to this icon.
274    pub fn path(&self) -> Arc<str> {
275        let file_stem: &'static str = self.into();
276        format!("icons/{file_stem}.svg").into()
277    }
278}