mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-12 16:15:24 +00:00
fix(config): overlay cron command flag from system configs (#1285)
This commit is contained in:
1 parent
23ddc0858c
commit
226e33ddfb
2 files changed
+5
No files matched your search
@@ -283,6 +283,7 @@ func TestApplySystemConfigs(t *testing.T) {
|
||||
"tools.browser.enabled": "false",
|
||||
"tools.browser.remote_url": "ws://chrome:9222",
|
||||
"tools.browser.max_pages": "9",
|
||||
"cron.command_enabled": "true",
|
||||
})
|
||||
|
||||
if cfg.Agents.Defaults.Provider != "openai" {
|
||||
@@ -306,6 +307,9 @@ func TestApplySystemConfigs(t *testing.T) {
|
||||
if cfg.Tools.Browser.MaxPages != 9 {
|
||||
t.Errorf("tools.browser.max_pages: got %d", cfg.Tools.Browser.MaxPages)
|
||||
}
|
||||
if !cfg.Cron.CommandEnabled {
|
||||
t.Error("cron.command_enabled: got false, want true")
|
||||
}
|
||||
}
|
||||
|
||||
// --- Save / Load round-trip ---
|
||||
|
||||
@@ -95,6 +95,7 @@ func (c *Config) ApplySystemConfigs(configs map[string]string) {
|
||||
// Cron
|
||||
integer("cron.max_retries", &c.Cron.MaxRetries)
|
||||
str("cron.default_timezone", &c.Cron.DefaultTimezone)
|
||||
boolValue("cron.command_enabled", &c.Cron.CommandEnabled)
|
||||
|
||||
// Pending message compaction
|
||||
if _, ok := configs["compaction.threshold"]; ok {
|
||||
|
||||
Reference in new issue
Block a user