autonomy notify: remove notify_channel/chat_id config and always derive target from enabled channel allow_from

This commit is contained in:
DBT
2026-03-01 03:16:27 +00:00
parent c5cf134b79
commit 189516d817
3 changed files with 2 additions and 15 deletions

View File

@@ -938,14 +938,7 @@ func buildHeartbeatService(cfg *config.Config, msgBus *bus.MessageBus) *heartbea
func buildAutonomyEngine(cfg *config.Config, msgBus *bus.MessageBus) *autonomy.Engine {
a := cfg.Agents.Defaults.Autonomy
notifyChannel := strings.ToLower(strings.TrimSpace(a.NotifyChannel))
notifyChatID := strings.TrimSpace(a.NotifyChatID)
if notifyChannel == "" || notifyChatID == "" {
if ch, chat := inferAutonomyNotifyTarget(cfg); ch != "" && chat != "" {
notifyChannel = ch
notifyChatID = chat
}
}
notifyChannel, notifyChatID := inferAutonomyNotifyTarget(cfg)
notifyAllowFrom := []string{}
switch notifyChannel {
case "telegram":