fix: prevent repeated off-hours handoff notices

This commit is contained in:
mlogclub
2026-05-09 23:46:56 +08:00
parent af8ec71bb8
commit 59b3509ca9
4 changed files with 42 additions and 2 deletions
@@ -52,6 +52,9 @@ func (g *HandoffGraph) Run(ctx context.Context, argumentsInJSON string) (string,
}
handled, err := services.ConversationService.TryOffHoursHandoffByAI(g.conversation.ID, g.aiAgent, reason)
if err != nil || handled {
if handled && err == nil {
return services.HandoffOffHoursMessage, nil
}
return "", err
}
info := HandoffGraphInterruptInfo{