diff --git a/Request.go b/Request.go index 9d65fbc..8fcf55a 100644 --- a/Request.go +++ b/Request.go @@ -161,7 +161,7 @@ func GenerateMultipleMessagesHandler(c *fiber.Ctx) error { var messageID edgedb.UUID if addMessageFunc != nil { - messageID = addMessageFunc(c, selectedLLMs[idx], idx == 0) + messageID = addMessageFunc(c, selectedLLMs[idx], false) } var message Message @@ -199,6 +199,13 @@ func GenerateMultipleMessagesHandler(c *fiber.Ctx) error { // Send the index of the completed goroutine to the firstDone channel select { case firstDone <- idx: + //Add the message as selected + _ = edgeGlobalClient.WithGlobals(map[string]interface{}{"ext::auth::client_token": c.Cookies("jade-edgedb-auth-token")}).Execute(edgeCtx, ` + UPDATE Message + FILTER .id = $0 + SET {selected := true}; + `, messageID) + // Generate the HTML content outIcon := `User Image` diff --git a/TODO.md b/TODO.md index fa7d1aa..6c17a2d 100644 --- a/TODO.md +++ b/TODO.md @@ -1,11 +1,12 @@ # Bugs [ ] The SSE event that sometime fails -[ ] 2 icons ? +[X] 2 selected messages [ ] On first response, code block width are too long [X] Change Terms of service to say that I use one cookie -[ ] Change the lastSelectedLLMs, 2 users can't use the same time... +[X] Change the lastSelectedLLMs, 2 users can't use the same time... # Features +[X] Add max tokens [ ] Errors messages to know what happend [ ] Add Deepseek API -[ ] Add Nvidia NIM +[X] Add Nvidia NIM