feat(settings): KEEL_AW_URL with localhost default
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user