feat: US-019 - Enable heartbeat by default in config
- Added HeartbeatConfig struct with Enabled field - Added Heartbeat to Config struct - Set default Heartbeat.Enabled = true in DefaultConfig() - Updated main.go to use cfg.Heartbeat.Enabled instead of hardcoded true - Added config tests verifying heartbeat is enabled by default Acceptance criteria met: - DefaultConfig() Heartbeat.Enabled changed to true - Can override via PICOCLAW_HEARTBEAT_ENABLED=false env var - Config documentation updated showing default enabled - Typecheck passes (go build ./... succeeds) - go test ./pkg/config -run TestDefaultConfig passes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ type Config struct {
|
||||
Providers ProvidersConfig `json:"providers"`
|
||||
Gateway GatewayConfig `json:"gateway"`
|
||||
Tools ToolsConfig `json:"tools"`
|
||||
Heartbeat HeartbeatConfig `json:"heartbeat"`
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
@@ -96,6 +97,10 @@ type SlackConfig struct {
|
||||
AllowFrom []string `json:"allow_from" env:"PICOCLAW_CHANNELS_SLACK_ALLOW_FROM"`
|
||||
}
|
||||
|
||||
type HeartbeatConfig struct {
|
||||
Enabled bool `json:"enabled" env:"PICOCLAW_HEARTBEAT_ENABLED"`
|
||||
}
|
||||
|
||||
type ProvidersConfig struct {
|
||||
Anthropic ProviderConfig `json:"anthropic"`
|
||||
OpenAI ProviderConfig `json:"openai"`
|
||||
@@ -211,6 +216,9 @@ func DefaultConfig() *Config {
|
||||
},
|
||||
},
|
||||
},
|
||||
Heartbeat: HeartbeatConfig{
|
||||
Enabled: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user