Update Messages.svelte

This commit is contained in:
Timothy J. Baek 2024-02-22 17:58:18 -08:00
parent 9c1aa92451
commit a2e2dd89a5

View file

@ -329,28 +329,28 @@
{/if} {/if}
{:else} {:else}
<ResponseMessage <ResponseMessage
{message} {message}
modelfiles={selectedModelfiles} modelfiles={selectedModelfiles}
siblings={history.messages[message.parentId]?.childrenIds ?? []} siblings={history.messages[message.parentId]?.childrenIds ?? []}
isLastMessage={messageIdx + 1 === messages.length} isLastMessage={messageIdx + 1 === messages.length}
{confirmEditResponseMessage} {confirmEditResponseMessage}
{showPreviousMessage} {showPreviousMessage}
{showNextMessage} {showNextMessage}
{rateMessage} {rateMessage}
{copyToClipboard} {copyToClipboard}
{continueGeneration} {continueGeneration}
{regenerateResponse} {regenerateResponse}
on:save={async (e) => { on:save={async (e) => {
console.log('save', e); console.log('save', e);
const message = e.detail; const message = e.detail;
history.messages[message.id] = message; history.messages[message.id] = message;
await updateChatById(localStorage.token, chatId, { await updateChatById(localStorage.token, chatId, {
messages: messages, messages: messages,
history: history history: history
}); });
}} }}
/> />
{/if} {/if}
</div> </div>
</div> </div>