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    LineHeight,
145    Link,
146    ListTree,
147    ListX,
148    LockOutlined,
149    MagnifyingGlass,
150    MailOpen,
151    Maximize,
152    Menu,
153    MessageBubbles,
154    Cloud,
155    Mic,
156    MicMute,
157    Microscope,
158    Minimize,
159    Option,
160    PageDown,
161    PageUp,
162    PanelLeft,
163    PanelRight,
164    Pencil,
165    Person,
166    PersonCircle,
167    PhoneIncoming,
168    Pin,
169    Play,
170    Plus,
171    PocketKnife,
172    Power,
173    Public,
174    PullRequest,
175    Quote,
176    RefreshTitle,
177    Regex,
178    ReplNeutral,
179    Replace,
180    ReplaceAll,
181    ReplaceNext,
182    ReplyArrowRight,
183    Rerun,
184    Return,
185    Reveal,
186    RotateCcw,
187    RotateCw,
188    Route,
189    Save,
190    Screen,
191    SearchCode,
192    SearchSelection,
193    SelectAll,
194    Send,
195    Server,
196    Settings,
197    SettingsAlt,
198    Shift,
199    Slash,
200    SlashSquare,
201    Sliders,
202    SlidersVertical,
203    Snip,
204    Space,
205    Sparkle,
206    SparkleAlt,
207    SparkleFilled,
208    Spinner,
209    Split,
210    SquareDot,
211    SquareMinus,
212    SquarePlus,
213    Star,
214    StarFilled,
215    Stop,
216    StopFilled,
217    Strikethrough,
218    Supermaven,
219    SupermavenDisabled,
220    SupermavenError,
221    SupermavenInit,
222    SwatchBook,
223    Tab,
224    Terminal,
225    TextSnippet,
226    ThumbsUp,
227    ThumbsDown,
228    Trash,
229    TrashAlt,
230    Triangle,
231    TriangleRight,
232    Undo,
233    Unpin,
234    Update,
235    UserGroup,
236    UserRoundPen,
237    Visible,
238    Wand,
239    Warning,
240    WholeWord,
241    X,
242    XCircle,
243    ZedAssistant,
244    ZedAssistantFilled,
245    ZedPredict,
246    ZedPredictUp,
247    ZedPredictDown,
248    ZedPredictDisabled,
249    ZedPredictError,
250    ZedXCopilot,
251}
252
253impl IconName {
254    /// Returns the path to this icon.
255    pub fn path(&self) -> Arc<str> {
256        let file_stem: &'static str = self.into();
257        format!("icons/{file_stem}.svg").into()
258    }
259}