macOS : DYLD_LIBRARY_PATH pour llama-server + journal du moteur dans l'UI

- dyld IGNORE LD_LIBRARY_PATH : sur macOS les .dylib livrees a cote de
  llama-server n'etaient pas trouvees, le moteur mourait sans un mot
- nouvelle route GET /api/service/log (journalctl sous Linux, fichier de
  log ailleurs) + panneau repliable ouvert en cliquant la pastille d'etat :
  on voit enfin POURQUOI un modele ne charge pas
This commit is contained in:
nathaninline committed 2026-07-25 12:21:02 +02:00
1 parent 075a05ebaa
commit 43da4b9197
10 files changed
+109 -6

No files matched your search

+11
View File
@@ -6,6 +6,7 @@ import (
"fmt"
"os"
"os/exec"
"strconv"
"strings"
"time"
)
@@ -70,3 +71,13 @@ func serviceIsActive() bool {
out, _ := exec.Command("systemctl", "is-active", serviceName()).Output()
return strings.TrimSpace(string(out)) == "active"
}
// serviceLogTail renvoie les n dernières lignes du journal du service (pour
// l'UI web). Linux : journalctl.
func serviceLogTail(n int) string {
out, err := exec.Command("journalctl", "-u", serviceName(), "-n", strconv.Itoa(n), "--no-pager").CombinedOutput()
if err != nil && len(out) == 0 {
return "journalctl indisponible : " + err.Error()
}
return string(out)
}