migrate ui components to gpui-kit

This commit is contained in:
2026-10-21 13:40:29 +07:00
parent 0d4acf5b65
commit d0ad1a6f57
173 changed files with 2775 additions and 10885 deletions
+19
View File
@@ -10,6 +10,25 @@ use rust_embed::RustEmbed;
#[exclude = "*.DS_Store"]
pub struct Assets;
/// Coop's bundled assets, with the GPUI Kit component icon bundle (Lucide) as
/// the fallback so `IconName` SVGs resolve alongside coop's own files.
pub struct CombinedAssets;
impl AssetSource for CombinedAssets {
fn load(&self, path: &str) -> Result<Option<std::borrow::Cow<'static, [u8]>>> {
if let Some(data) = Assets.load(path)? {
return Ok(Some(data));
}
gpui_kit::assets::Assets.load(path)
}
fn list(&self, path: &str) -> Result<Vec<SharedString>> {
let mut paths = Assets.list(path)?;
paths.extend(gpui_kit::assets::Assets.list(path)?);
Ok(paths)
}
}
impl AssetSource for Assets {
fn load(&self, path: &str) -> Result<Option<std::borrow::Cow<'static, [u8]>>> {
Self::get(path)