fix(server): broadcast task:dispatch for mention-triggered tasks

EnqueueTaskForMention was missing the broadcastTaskDispatch call,
so the frontend never received a WebSocket event when an agent was
triggered via @mention in comments. This caused the AgentLiveCard
to not show the running state until page refresh.
This commit is contained in:
Jiang Bohan
2026-04-03 14:14:21 +08:00
parent 978e81a268
commit c95b0135bf

View File

@@ -105,6 +105,7 @@ func (s *TaskService) EnqueueTaskForMention(ctx context.Context, issue db.Issue,
}
slog.Info("mention task enqueued", "task_id", util.UUIDToString(task.ID), "issue_id", util.UUIDToString(issue.ID), "agent_id", util.UUIDToString(agentID))
s.broadcastTaskDispatch(ctx, task)
return task, nil
}