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