feat(ui): Reiter Engines und überarbeitete Modelle-Seite mit Dialog je Modell (#1068)

Engine::start_info meldet das Startkommando mit Platzhaltern. Die Karten
"Planung ändern" weichen einem Dialog je Modell. Lokal mit Attrappen im
Browser gesehen, auf srv04 nicht geprüft.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmHhg3osejhFSpUz472iQ1
This commit is contained in:
2026-11-16 12:54:29 +01:00
parent a4e791b571
commit cb685b0659
15 changed files with 532 additions and 61 deletions

View File

@ -33,7 +33,7 @@ use crate::engine::Engine;
use crate::process::{PortPool, http_status, log_tail, rotate_log, sigterm, terminate_group};
use crate::types::{
AdapterError, Capabilities, DiscoveredArtifact, Endpoint, EngineInfo, Health, InstanceHandle,
Mode, ProfileSpec, Protocol, Result, Usage,
Mode, ProfileSpec, Protocol, Result, StartInfo, Usage,
};
const MIB: u64 = 1024 * 1024;
@ -413,6 +413,54 @@ impl OllamaEngine {
#[async_trait]
impl Engine for OllamaEngine {
fn start_info(&self) -> StartInfo {
let c = &self.config;
if !self.managed() {
return StartInfo {
executable: None,
command: "(wird nicht gestartet: das Gateway nutzt einen laufenden Ollama-Server)"
.to_string(),
env: Vec::new(),
details: vec![
("Adresse".to_string(), c.base_url.clone()),
(
"Modellordner".to_string(),
c.models_dir.display().to_string(),
),
],
};
}
StartInfo {
executable: Some(c.binary.clone()),
command: format!("{} serve", c.binary.display()),
env: self
.server_env(c.port_from)
.into_iter()
.map(|(k, v)| {
if k == "OLLAMA_HOST" {
(k, "127.0.0.1:<Port>".to_string())
} else {
(k, v)
}
})
.collect(),
details: vec![
(
"Modellordner".to_string(),
c.models_dir.display().to_string(),
),
(
"Ports".to_string(),
format!("{} bis {}", c.port_from, c.port_to),
),
(
"Zeitlimit Start".to_string(),
format!("{} s", c.ready_timeout_secs),
),
],
}
}
fn describe(&self) -> EngineInfo {
EngineInfo {
name: "ollama".to_string(),