mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-20 21:48:47 +02:00
v0.2.14 : PWA/UI mobile améliorée (plein écran standalone, gestion de l'encoche/safe-area, interface compacte en paysage, plus de zoom iOS à la saisie) + pastille d'état service (chargement/prêt) + gestion propre des erreurs de stream
This commit is contained in:
1 parent
adcc6548f6
commit
5931bd72a6
7 files changed
+87
-13
No files matched your search
@@ -678,6 +678,13 @@ func sseHeartbeat(w http.ResponseWriter, flusher http.Flusher) (*sync.Mutex, fun
|
||||
// runChatStream exécute le chat et pousse chaque événement (delta) via emit, qui
|
||||
// renvoie false pour interrompre. Partagé par handleChat et handleE2EChat.
|
||||
func runChatStream(ctx context.Context, body chatReq, emit func(map[string]any) bool) {
|
||||
// Garde-fou : si le modèle n'est pas encore chargé, llama-server répond 503
|
||||
// ("loading model") et le tour partirait dans le vide (aucune réponse, l'user
|
||||
// renvoie en boucle). On renvoie une erreur explicite affichée dans le chat.
|
||||
if !healthCheck() {
|
||||
emit(map[string]any{"error": "⏳ Le modèle est encore en train de charger — patiente quelques secondes puis renvoie ton message."})
|
||||
return
|
||||
}
|
||||
if body.Temperature == 0 {
|
||||
body.Temperature = 0.7
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user