feat(model-server): afficher le téléchargement du modèle llamacpp au démarrage (#54)

Ajoute un handle du téléchargement des modèles lors du démarrage de
llamacpp : le domaine et l'application émettent la progression de
téléchargement du modèle, relayée en événement côté app-tauri, et l'UI
l'affiche via un badge de lancement et un overlay de cellule pendant que
le serveur de modèle démarre.

Backend (B1) : progression de téléchargement dans domain/application,
relais d'événement app-tauri, couverture de tests.
Frontend (F1) : modelServerLaunch, badge et overlay LayoutGrid, tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-13 23:14:05 +02:00
parent c67ec4f7bd
commit fe7ed0aa20
12 changed files with 891 additions and 29 deletions

View File

@ -33,7 +33,7 @@ pub enum OrchestrationSource {
/// concern relayed to IPC by an infrastructure adapter, which owns the wire
/// format. `PtyOutput` in particular is usually short-circuited to a Tauri
/// channel rather than serialised here.
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq)]
pub enum DomainEvent {
/// A project was created.
ProjectCreated {

View File

@ -494,7 +494,7 @@ pub struct ModelServerReady {
}
/// Lifecycle status emitted for presentation.
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq)]
pub enum ModelServerLifecycleStatus {
/// No local model server is configured for the profile.
NotConfigured,
@ -502,6 +502,17 @@ pub enum ModelServerLifecycleStatus {
Probing,
/// IdeA is starting the server.
Starting,
/// The server process is alive but still downloading/preparing a remote model.
Downloading {
/// Downloaded bytes when known.
downloaded_bytes: Option<u64>,
/// Total bytes when known.
total_bytes: Option<u64>,
/// Completion percentage when known.
percent: Option<f32>,
/// Remote model source, for example a Hugging Face repository id.
source: Option<String>,
},
/// The server is ready.
Ready {
/// `true` when an already-running server was reused.