Fix bug of multiples selected message
This commit is contained in:
parent
1e0d345fa4
commit
41eba45872
@ -161,7 +161,7 @@ func GenerateMultipleMessagesHandler(c *fiber.Ctx) error {
|
|||||||
|
|
||||||
var messageID edgedb.UUID
|
var messageID edgedb.UUID
|
||||||
if addMessageFunc != nil {
|
if addMessageFunc != nil {
|
||||||
messageID = addMessageFunc(c, selectedLLMs[idx], idx == 0)
|
messageID = addMessageFunc(c, selectedLLMs[idx], false)
|
||||||
}
|
}
|
||||||
|
|
||||||
var message Message
|
var message Message
|
||||||
@ -199,6 +199,13 @@ func GenerateMultipleMessagesHandler(c *fiber.Ctx) error {
|
|||||||
// Send the index of the completed goroutine to the firstDone channel
|
// Send the index of the completed goroutine to the firstDone channel
|
||||||
select {
|
select {
|
||||||
case firstDone <- idx:
|
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 = <uuid>$0
|
||||||
|
SET {selected := true};
|
||||||
|
`, messageID)
|
||||||
|
|
||||||
// Generate the HTML content
|
// Generate the HTML content
|
||||||
|
|
||||||
outIcon := `<img src="` + selectedLLMs[idx].Model.Company.Icon + `" alt="User Image" id="selectedIcon-` + fmt.Sprintf("%d", message.Area.Position) + `">`
|
outIcon := `<img src="` + selectedLLMs[idx].Model.Company.Icon + `" alt="User Image" id="selectedIcon-` + fmt.Sprintf("%d", message.Area.Position) + `">`
|
||||||
|
7
TODO.md
7
TODO.md
@ -1,11 +1,12 @@
|
|||||||
# Bugs
|
# Bugs
|
||||||
[ ] The SSE event that sometime fails
|
[ ] The SSE event that sometime fails
|
||||||
[ ] 2 icons ?
|
[X] 2 selected messages
|
||||||
[ ] On first response, code block width are too long
|
[ ] On first response, code block width are too long
|
||||||
[X] Change Terms of service to say that I use one cookie
|
[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
|
# Features
|
||||||
|
[X] Add max tokens
|
||||||
[ ] Errors messages to know what happend
|
[ ] Errors messages to know what happend
|
||||||
[ ] Add Deepseek API
|
[ ] Add Deepseek API
|
||||||
[ ] Add Nvidia NIM
|
[X] Add Nvidia NIM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user