authoravatarclover caruso<git@paperclover.net>2026-11-30 03:08:42-08:00
committeravatarclover caruso<git@paperclover.net>2026-11-30 03:08:43-08:00
logd36c5fec038e2a984804da63dc139ddba6c5d3bd
treef9828c53b04a33340b94e657b90a07f3cbc3a9ea
parent5854c1a79d82d57034a5fc32a2b96c4cc24a904e
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

shale: show Gemini 4 variants with the Google logo and their element name

Compact author cells read "Neon" instead of "Gemini". Assisted-by: claude-sonnet-5.5

2 files changed, 10 insertions(+), 2 deletions(-)

dashboard/src/google.svg created+1
......@@ -0,0 +1 @@
1<svg width="48" height="48" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"/><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"/><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"/><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"/></svg>
dashboard/src/shale_page.rs+9-2
......@@ -109,6 +109,8 @@ fn ai_profile(model: Option<&str>) -> Profile {
109109 (rest, include_str!("openai.svg"), true)
110110 } else if id.starts_with("qwen") {
111111 (id, include_str!("qwen.svg"), false)
112 } else if id.starts_with("gemini-") {
113 (id, include_str!("google.svg"), false)
112114 } else {
113115 (id, include_str!("bot.svg"), false)
114116 };
......@@ -287,7 +289,10 @@ fn rewrite(html: &str, origin: &url::Url, profiles: &HashMap<String, Profile>, a
287289 }
288290 let name = if compact.get() && profile.owner.is_some() {
289291 let number = profile.name.find(|c: char| c.is_ascii_digit()).unwrap_or(profile.name.len());
290 profile.name[..number].trim_end_matches([' ', '-'])
292 match profile.name.strip_prefix("Gemini ").and_then(|rest| rest.split_once(' ')) {
293 Some((_, variant)) => variant,
294 None => profile.name[..number].trim_end_matches([' ', '-']),
295 }
291296 } else { &profile.name };
292297 element.append(name, ContentType::Text);
293298 if profile.url.is_some() { element.append("</span>", ContentType::Html); }
......@@ -666,6 +671,8 @@ mod tests {
666671 ("qwen3.8-27b", "Qwen 3.8 27b"),
667672 ("big-pickle-2", "Big Pickle 2"),
668673 ("llama-3-70", "Llama 3 70"),
674 ("gemini-4-neon", "Gemini 4 Neon"),
675 ("gemini-4-hydrogen", "Gemini 4 Hydrogen"),
669676 ] { assert_eq!(ai_profile(Some(id)).name, name, "{id}"); }
670677 }
671678
......@@ -693,7 +700,7 @@ mod tests {
693700 assert_eq!(image.attr("alt"), Some(""));
694701 }
695702 assert!(output.contains("<div class='markdown'><img src='https://api.dicebear.com/10.x/line-face/svg?seed=native-clover'>"));
696 for (model, short) in [("qwen3.8-27b", "Qwen"), ("big-pickle-2", "Big Pickle"), ("claude-new-variant-5-5", "New Variant")] {
703 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")] {
697704 let mut profile = ai_profile(Some(model));
698705 profile.owner = Some(("clover".into(), None));
699706 let profiles = HashMap::from([("ai-model".into(), profile)]);