feat: Spalte Datei statt Quantisierung und Größe; Entscheidungen #1158 bis #1161; Version 0.1.15-rc5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg6k5Hxh8GpVW7od4Di
This commit is contained in:
@ -270,11 +270,18 @@ fn models_table(state: &AppState, viewer: &Viewer) -> String {
|
||||
),
|
||||
(None, None) => "<span class=\"muted\">–</span>".to_string(),
|
||||
};
|
||||
// Quantisierung und Größe in einer Spalte „Datei“ (#1160), je Teil nur wenn bekannt.
|
||||
let datei = match (m.quantization.as_deref(), m.size_bytes) {
|
||||
(Some(q), Some(v)) => format!("{} · {:.1} GiB", esc(q), v as f64 / 1073741824.0),
|
||||
(Some(q), None) => esc(q),
|
||||
(None, Some(v)) => format!("{:.1} GiB", v as f64 / 1073741824.0),
|
||||
(None, None) => "–".to_string(),
|
||||
};
|
||||
let status_text = if m.enabled { "freigegeben" } else { "gesperrt" };
|
||||
let row_id = format!("modell-{}", dialog_id(&m.name));
|
||||
format!(
|
||||
"<tr id=\"{row_id}\"><td class=\"name\">{}</td><td>{}</td><td data-sort=\"{status_text}\">{}</td>{faehig}<td>{}</td><td class=\"num\"{context_attr}>{context}</td>\
|
||||
<td class=\"num\"{memory_attr}>{memory}</td><td>{}</td><td>{}</td><td data-sort=\"{state_sort}\">{state_chip}</td>{actions}</tr>",
|
||||
<td class=\"num\"{memory_attr}>{memory}</td><td>{datei}</td><td data-sort=\"{state_sort}\">{state_chip}</td>{actions}</tr>",
|
||||
esc(&m.name),
|
||||
m.engine
|
||||
.as_ref()
|
||||
@ -286,14 +293,12 @@ fn models_table(state: &AppState, viewer: &Viewer) -> String {
|
||||
} else {
|
||||
super::faehigkeiten::gpu_symbole(&m.gpus)
|
||||
},
|
||||
m.quantization.as_deref().map(esc).unwrap_or_else(|| "–".to_string()),
|
||||
m.size_bytes.map(|v| format!("{:.1} GiB", v as f64 / 1073741824.0)).unwrap_or_else(|| "–".to_string()),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
format!(
|
||||
"<div class=\"breit\"><table data-filtern=\"modelle\"><thead><tr><th data-spalte=\"name\">Name</th><th data-spalte=\"engine\" data-filter>Engine</th><th data-spalte=\"status\" data-filter>Status</th><th>Kann</th><th>GPUs</th>\
|
||||
<th class=\"num\" data-spalte=\"kontext\" data-zahl>Kontext</th><th class=\"num\" data-spalte=\"speicher\" data-zahl>Speicher</th><th>Quantisierung</th><th>Größe</th><th data-spalte=\"zustand\" data-filter>Zustand</th>{}</tr></thead><tbody>{body}</tbody></table></div>\
|
||||
<th class=\"num\" data-spalte=\"kontext\" data-zahl>Kontext</th><th class=\"num\" data-spalte=\"speicher\" data-zahl>Speicher</th><th>Datei</th><th data-spalte=\"zustand\" data-filter>Zustand</th>{}</tr></thead><tbody>{body}</tbody></table></div>\
|
||||
<p class=\"klein\">Kann: Symbole auf gefüllter Kachel sind aus den Dateien des Modells erkannt (zum Beispiel eine Bild-Zusatzdatei), Symbole mit gestricheltem Umriss sind Fähigkeiten der Engine, für das einzelne Modell nicht geprüft. Chat, Streaming und Completions können alle Modelle einer Engine und stehen auf der Seite „Engines“.</p>",
|
||||
if viewer.admin() { "<th></th>" } else { "" }
|
||||
)
|
||||
|
||||
@ -1648,6 +1648,16 @@ async fn denkstufen_test_braucht_admin_und_csrf() {
|
||||
assert_eq!(status, 403);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn modelltabelle_fasst_quantisierung_und_groesse_in_einer_spalte_zusammen() {
|
||||
// #1160: schmalere Tabelle, eine Spalte „Datei“ statt zwei.
|
||||
let gw = gateway(0, false).await;
|
||||
let (cookie, _) = ui_session(&gw, &gw.key_ui).await;
|
||||
let (_, _, llm) = ui_get(&gw, "/ui/modelle", Some(&cookie)).await;
|
||||
assert!(llm.contains("<th>Datei</th>"));
|
||||
assert!(!llm.contains("<th>Quantisierung</th>") && !llm.contains("<th>Größe</th>"));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn modellseite_hat_reiter_mit_aktivem_zustand_und_kein_status_text_bei_den_knoepfen() {
|
||||
// Styleguide „Reiter und Umschalter“: der aktive Reiter ist gekennzeichnet; Status steht als Symbol, nicht als Text in den Aktionen.
|
||||
|
||||
Reference in New Issue
Block a user