mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-24 07:28:13 +02:00
Purge du code de compatibilite jean, base bbolt et arborescence ajean
- suppression des migrations d'agencement, d'unites et de dossier de donnees - store bbolt unique (ajean.db) : config, prefs, conversation, cles, drapeaux - arborescence backends/ bin/ presets/ memory/ models/ workspace/ - plus aucune variable, unite ou asset nomme jean
This commit is contained in:
1 parent
081a88c846
commit
2455d9f402
78 files changed
+1160
-2293
No files matched your search
@@ -6,13 +6,13 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Un modèle posé hors de JEAN_HOME (disque externe) doit être utilisable dès
|
||||
// Un modèle posé hors de AJEAN_HOME (disque externe) doit être utilisable dès
|
||||
// que son dossier est déclaré — et refusé tant qu'il ne l'est pas.
|
||||
func TestResolveModelPathExtraDir(t *testing.T) {
|
||||
home := t.TempDir()
|
||||
ext := t.TempDir()
|
||||
t.Setenv("JEAN_HOME", home)
|
||||
t.Setenv("JEAN_MODEL_DIRS", "")
|
||||
t.Setenv("AJEAN_HOME", home)
|
||||
t.Setenv("AJEAN_MODEL_DIRS", "")
|
||||
|
||||
extModel := filepath.Join(ext, "gros.gguf")
|
||||
if err := os.WriteFile(extModel, []byte("x"), 0o644); err != nil {
|
||||
@@ -39,12 +39,12 @@ func TestResolveModelPathExtraDir(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// JEAN_HOME garde la priorité et les non-.gguf restent refusés.
|
||||
// AJEAN_HOME garde la priorité et les non-.gguf restent refusés.
|
||||
func TestResolveModelPathHomeFirst(t *testing.T) {
|
||||
home := t.TempDir()
|
||||
ext := t.TempDir()
|
||||
t.Setenv("JEAN_HOME", home)
|
||||
t.Setenv("JEAN_MODEL_DIRS", ext)
|
||||
t.Setenv("AJEAN_HOME", home)
|
||||
t.Setenv("AJEAN_MODEL_DIRS", ext)
|
||||
for _, d := range []string{home, ext} {
|
||||
if err := os.WriteFile(filepath.Join(d, "m.gguf"), []byte("x"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -52,7 +52,7 @@ func TestResolveModelPathHomeFirst(t *testing.T) {
|
||||
}
|
||||
got, err := resolveModelPath("m.gguf")
|
||||
if err != nil || got != filepath.Join(home, "m.gguf") {
|
||||
t.Fatalf("got %q (%v), attendu le fichier de JEAN_HOME", got, err)
|
||||
t.Fatalf("got %q (%v), attendu le fichier de AJEAN_HOME", got, err)
|
||||
}
|
||||
if _, err := resolveModelPath("/etc/passwd"); err == nil {
|
||||
t.Fatal("un fichier non-.gguf devrait être refusé")
|
||||
|
||||
Reference in new issue
Block a user