//! Icons beyond gpui-component's default set, picked from the bundled Lucide
//! catalog so only these SVGs end up in the binary.
use std::borrow::Cow;
use gpui_kit::*;
pub use gpui_kit::assets::IconName as Lucide;
gpui_kit::assets::icon_assets!(ExtraIcons, [
Archive,
ArchiveRestore,
Brain,
ChevronsUpDown,
Code,
CornerDownRight,
FileCode,
FileDiff,
FolderPlus,
Gauge,
GitBranch,
GitCommitHorizontal,
Image,
Keyboard,
Laptop,
Lock,
LockOpen,
MessageCircleQuestionMark,
PanelLeftClose,
PanelLeftOpen,
PanelRightClose,
PanelRightOpen,
Paperclip,
Pencil,
Pi,
Plug,
RotateCcw,
ShieldCheck,
SlidersHorizontal,
Sparkles,
SquarePen,
Star,
Trash,
Zap,
]);
/// The app's asset source: the extra icons, then gpui-component's defaults.
pub struct AppAssets;
impl AssetSource for AppAssets {
fn load(&self, path: &str) -> Result<Option<Cow<'static, [u8]>>> {
if let Some(data) = ExtraIcons.load(path)? {
return Ok(Some(data));
}
gpui_kit::assets::Assets.load(path)
}
fn list(&self, path: &str) -> Result<Vec<SharedString>> {
let mut paths = ExtraIcons.list(path)?;
paths.extend(gpui_kit::assets::Assets.list(path)?);
Ok(paths)
}
}