feat(model): add rich model metadata, caching, and UI panel for inspection

Introduce `DetailedModelInfo` and `ModelInfoRetrievalError` structs for richer model data.
Add `ModelDetailsCache` with TTL‑based storage and async API for get/insert/invalidate.
Extend `OllamaProvider` to fetch, cache, refresh, and list detailed model info.
Expose model‑detail methods in `Session` for on‑demand and bulk retrieval.
Add `ModelInfoPanel` widget to display detailed info with scrolling support.
Update TUI rendering to show the panel, compute viewport height, and render model selector labels with parameters, size, and context length.
Adjust imports and module re‑exports accordingly.
This commit is contained in:
2025-10-12 09:45:16 +02:00
parent fab63d224b
commit c2f5ccea3b
10 changed files with 1168 additions and 14 deletions

View File

@@ -20,6 +20,7 @@ use owlen_core::{
};
use owlen_tui::tui_controller::{TuiController, TuiRequest};
use owlen_tui::{config, ui, AppState, ChatApp, Event, EventHandler, SessionEvent};
use std::any::Any;
use std::borrow::Cow;
use std::io;
use std::sync::Arc;
@@ -346,6 +347,10 @@ impl Provider for OfflineProvider {
"offline provider cannot reach any backing models"
)))
}
fn as_any(&self) -> &(dyn Any + Send + Sync) {
self
}
}
#[tokio::main(flavor = "multi_thread")]