feat(ui): Chat, Streaming und Completions als Fähigkeiten der Engine, Symbole auch auf der Engines-Seite (#1081)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg3Td16J38kAyDLzb39
This commit is contained in:
@ -7,7 +7,7 @@ use std::sync::Arc;
|
||||
use axum::extract::{RawQuery, State};
|
||||
use axum::http::{HeaderMap, StatusCode};
|
||||
use axum::response::Response;
|
||||
use nexus_adapter::{Capabilities, DiscoveredArtifact, Mode};
|
||||
use nexus_adapter::{DiscoveredArtifact, Mode};
|
||||
|
||||
use super::{Viewer, csrf_field, esc, form_field, html, layout, notice, redirect, viewer};
|
||||
use crate::state::AppState;
|
||||
@ -20,21 +20,6 @@ fn mode_text(mode: Mode) -> &'static str {
|
||||
}
|
||||
}
|
||||
|
||||
fn capability_chips(c: &Capabilities) -> String {
|
||||
[
|
||||
(c.chat, "Chat"),
|
||||
(c.completions, "Completions"),
|
||||
(c.streaming, "Streaming"),
|
||||
(c.embeddings, "Embeddings"),
|
||||
(c.tool_calling, "Tool Calling"),
|
||||
(c.images, "Bilder"),
|
||||
]
|
||||
.iter()
|
||||
.filter(|(on, _)| *on)
|
||||
.map(|(_, label)| format!("<span class=\"chip\">{label}</span>"))
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Ergebnis der Suche einer Engine als Tabelle mit „Registrieren“ je Fund.
|
||||
fn found_block(
|
||||
viewer: &Viewer,
|
||||
@ -221,7 +206,7 @@ pub(super) async fn engines_page(
|
||||
<span class=\"chip accent\">{mode}</span>{installed}\
|
||||
<span class=\"rechts muted\">{n} Modelle registriert</span></div>\
|
||||
<div class=\"chips\">{caps}</div>{start_details}</section>",
|
||||
name = esc(&name), mode = mode_text(info.mode), n = models.len(), caps = capability_chips(&info.capabilities),
|
||||
name = esc(&name), mode = mode_text(info.mode), n = models.len(), caps = super::faehigkeiten::engine_faehigkeiten(&info.capabilities),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
Reference in New Issue
Block a user