refactor: implement off-hours handoff logic and enhance related tests

This commit is contained in:
mlogclub
2026-05-08 23:26:25 +08:00
parent 6f4c026320
commit 664e418115
6 changed files with 254 additions and 4 deletions
@@ -50,6 +50,10 @@ func (g *HandoffGraph) Run(ctx context.Context, argumentsInJSON string) (string,
if err != nil {
return "", err
}
handled, err := services.ConversationService.TryOffHoursHandoffByAI(g.conversation.ID, g.aiAgent, reason)
if err != nil || handled {
return "", err
}
info := HandoffGraphInterruptInfo{
Type: InterruptTypeHandoffConfirmation,
Message: g.buildConfirmationPrompt(reason),