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