tâches planifiées : prompts cron persistés, outil scheduler, conversations liées aux tâches, rattrapage des exécutions manquées au redémarrage (go-cron MissedRunOnce)

This commit is contained in:
fabien committed 2026-10-06 22:15:59 +02:00
1 parent bedb6c98e7
commit 058370830f
71 files changed
+1627 -100

No files matched your search

+7 -1
View File
@@ -52,6 +52,7 @@ func (h *ChatHandler) NewChat(c *echo.Context) error {
userID,
teamID,
request.AgentID,
"",
)
if err != nil {
c.Logger().Error("error creating chat", "error", err.Error())
@@ -120,11 +121,16 @@ func (h *ChatHandler) List(c *echo.Context) error {
page := c.Param("page")
pageInt, _ := strconv.Atoi(page)
query := c.QueryParam("q")
chats, err := h.chatService.ListChats(userID, teamID, pageInt, query)
taskID := c.QueryParam("task")
chats, err := h.chatService.ListChats(userID, teamID, pageInt, query, taskID)
if err != nil {
c.Logger().Error("error listing chats", "error", err)
return echo.NewHTTPError(http.StatusBadRequest, "error listing chats")
}
// évite "null" dans la réponse quand il n'y a pas de conversation
if chats == nil {
chats = []*domain.Chat{}
}
return c.JSON(http.StatusOK, chats)
}