fix: prevent insertion of empty message results
This commit is contained in:
parent
03c0cc54b5
commit
2dcc2967e4
|
|
@ -180,6 +180,9 @@ class AIPersistServiceStatic {
|
|||
|
||||
return acc
|
||||
}, [])
|
||||
if (results.length === 0) {
|
||||
return
|
||||
}
|
||||
await db
|
||||
.insert(aiChatMessagesTable)
|
||||
.values(results)
|
||||
|
|
|
|||
Loading…
Reference in New Issue