fix: many model chat actions not working

This commit is contained in:
Timothy J. Baek
2024-08-21 22:54:56 +02:00
parent 4a21c5c5e7
commit f3f6941205
2 changed files with 12 additions and 0 deletions

View File

@@ -386,6 +386,15 @@
{continueGeneration}
{mergeResponses}
{regenerateResponse}
on:action={async (e) => {
console.log('action', e);
if (typeof e.detail === 'string') {
await chatActionHandler(chatId, e.detail, message.model, message.id);
} else {
const { id, event } = e.detail;
await chatActionHandler(chatId, id, message.model, message.id, event);
}
}}
on:change={async () => {
await updateChatById(localStorage.token, chatId, {
messages: messages,