feat(settings): KEEL_AW_URL with localhost default

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 19:39:49 -04:00
parent 3a4f498f86
commit 67f91442a4
2 changed files with 24 additions and 3 deletions
+7 -1
View File
@@ -17,11 +17,12 @@ import (
var ErrInvalidBackend = errors.New("settings: invalid ai backend")
// Settings is the user-editable configuration. Field names mirror the env vars
// they replace: KEEL_AI_BACKEND, KEEL_MARVIN_CMD, KEEL_KNOWLEDGE_FILE.
// they replace: KEEL_AI_BACKEND, KEEL_MARVIN_CMD, KEEL_KNOWLEDGE_FILE, KEEL_AW_URL.
type Settings struct {
AIBackend string `json:"ai_backend"`
MarvinCmd string `json:"marvin_cmd"`
KnowledgePath string `json:"knowledge_path"`
AWURL string `json:"aw_url"`
}
// DefaultPath returns ~/.keel/settings.json.
@@ -72,9 +73,14 @@ func SeedFromEnv() Settings {
if backend == "" {
backend = "claude"
}
awURL := os.Getenv("KEEL_AW_URL")
if awURL == "" {
awURL = "http://localhost:5600"
}
return Settings{
AIBackend: backend,
MarvinCmd: os.Getenv("KEEL_MARVIN_CMD"),
KnowledgePath: os.Getenv("KEEL_KNOWLEDGE_FILE"),
AWURL: awURL,
}
}