BugFix
release-tag / release-image (push) Successful in 2m24s

This commit is contained in:
2026-08-05 11:58:25 +02:00
parent 31d3efb8a2
commit b3bd3d5ffd
25 changed files with 679 additions and 719 deletions
-6
View File
@@ -65,9 +65,6 @@ type Config struct {
APIKey string
LearningEnabled bool
ThinkingEnabled bool
LearningCategories []string
DisplayCategories []string
ThinkingCategories []string
LearningSources []string
DisplaySources []string
ThinkingSources []string
@@ -161,9 +158,6 @@ func Load() (Config, error) {
APIKey: strings.TrimSpace(os.Getenv("BRAIN_API_KEY")),
LearningEnabled: boolean("BRAIN_LEARNING_ENABLED", true),
ThinkingEnabled: boolean("BRAIN_THINKING_ENABLED", true),
LearningCategories: stringList("BRAIN_LEARNING_CATEGORIES"),
DisplayCategories: stringList("BRAIN_DISPLAY_CATEGORIES"),
ThinkingCategories: stringList("BRAIN_THINKING_CATEGORIES"),
LearningSources: stringList("BRAIN_LEARNING_SOURCES"),
DisplaySources: stringList("BRAIN_DISPLAY_SOURCES"),
ThinkingSources: stringList("BRAIN_THINKING_SOURCES"),
-6
View File
@@ -42,9 +42,6 @@ func TestLoadRuntimeControlDefaultsAndFilters(t *testing.T) {
t.Setenv("BRAIN_DATA_DIR", t.TempDir())
t.Setenv("BRAIN_LEARNING_ENABLED", "false")
t.Setenv("BRAIN_THINKING_ENABLED", "false")
t.Setenv("BRAIN_LEARNING_CATEGORIES", "Netzwerk,GLPI KB")
t.Setenv("BRAIN_DISPLAY_CATEGORIES", "GLPI KB")
t.Setenv("BRAIN_THINKING_CATEGORIES", "Netzwerk")
t.Setenv("BRAIN_LEARNING_SOURCES", "GLPI Knowledge Base,internal-kb")
t.Setenv("BRAIN_DISPLAY_SOURCES", "GLPI Knowledge Base")
t.Setenv("BRAIN_THINKING_SOURCES", "internal-kb")
@@ -58,9 +55,6 @@ func TestLoadRuntimeControlDefaultsAndFilters(t *testing.T) {
if cfg.LearningEnabled || cfg.ThinkingEnabled || cfg.DefaultView != "constellation" || cfg.MaxDisplayNodes != 12000 || !cfg.LowPowerMode {
t.Fatalf("unexpected runtime defaults: %+v", cfg)
}
if len(cfg.LearningCategories) != 2 || len(cfg.DisplayCategories) != 1 || len(cfg.ThinkingCategories) != 1 {
t.Fatalf("unexpected category defaults: %+v", cfg)
}
if len(cfg.LearningSources) != 2 || len(cfg.DisplaySources) != 1 || len(cfg.ThinkingSources) != 1 {
t.Fatalf("unexpected source defaults: %+v", cfg)
}