diff --git a/dashboard/src/google.svg b/dashboard/src/google.svg new file mode 100644 index 0000000000000000000000000000000000000000..035eb520daefcc0605bb6cd364c9692ffe5f14d0 --- /dev/null +++ b/dashboard/src/google.svg @@ -0,0 +1 @@ + diff --git a/dashboard/src/shale_page.rs b/dashboard/src/shale_page.rs index 787f5411398505c46cfcf546596e604d7ae2d8d6..5248f20df3301a1624db3f701e234c683e6d87ee 100644 --- a/dashboard/src/shale_page.rs +++ b/dashboard/src/shale_page.rs @@ -109,6 +109,8 @@ fn ai_profile(model: Option<&str>) -> Profile { (rest, include_str!("openai.svg"), true) } else if id.starts_with("qwen") { (id, include_str!("qwen.svg"), false) + } else if id.starts_with("gemini-") { + (id, include_str!("google.svg"), false) } else { (id, include_str!("bot.svg"), false) }; @@ -287,7 +289,10 @@ fn rewrite(html: &str, origin: &url::Url, profiles: &HashMap, a } let name = if compact.get() && profile.owner.is_some() { let number = profile.name.find(|c: char| c.is_ascii_digit()).unwrap_or(profile.name.len()); - profile.name[..number].trim_end_matches([' ', '-']) + match profile.name.strip_prefix("Gemini ").and_then(|rest| rest.split_once(' ')) { + Some((_, variant)) => variant, + None => profile.name[..number].trim_end_matches([' ', '-']), + } } else { &profile.name }; element.append(name, ContentType::Text); if profile.url.is_some() { element.append("", ContentType::Html); } @@ -666,6 +671,8 @@ mod tests { ("qwen3.8-27b", "Qwen 3.8 27b"), ("big-pickle-2", "Big Pickle 2"), ("llama-3-70", "Llama 3 70"), + ("gemini-4-neon", "Gemini 4 Neon"), + ("gemini-4-hydrogen", "Gemini 4 Hydrogen"), ] { assert_eq!(ai_profile(Some(id)).name, name, "{id}"); } } @@ -693,7 +700,7 @@ mod tests { assert_eq!(image.attr("alt"), Some("")); } assert!(output.contains("
")); - for (model, short) in [("qwen3.8-27b", "Qwen"), ("big-pickle-2", "Big Pickle"), ("claude-new-variant-5-5", "New Variant")] { + for (model, short) in [("qwen3.8-27b", "Qwen"), ("big-pickle-2", "Big Pickle"), ("claude-new-variant-5-5", "New Variant"), ("gemini-4-neon", "Neon"), ("gemini-4-carbon", "Carbon"), ("gemini-4", "Gemini")] { let mut profile = ai_profile(Some(model)); profile.owner = Some(("clover".into(), None)); let profiles = HashMap::from([("ai-model".into(), profile)]);