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