An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
chore: apply code formatting
Yoshiki Miurab8d860becf36
diff --git a/components/chat.tsx b/components/chat.tsxindex 3242d0bf..61a3303a 100644--- a/components/chat.tsx+++ b/components/chat.tsx@@ -65,7 +65,10 @@ export function Chat({chatId: id,messageId,// Include the message if it's a user message (for edit cases)- message: messageToRegenerate?.role === 'user' ? messageToRegenerate : undefined+ message:+ messageToRegenerate?.role === 'user'+ ? messageToRegenerate+ : undefined}}diff --git a/lib/streaming/create-chat-stream-response.ts b/lib/streaming/create-chat-stream-response.tsindex 596afbd4..84b3e6ff 100644--- a/lib/streaming/create-chat-stream-response.ts+++ b/lib/streaming/create-chat-stream-response.ts@@ -84,13 +84,17 @@ export async function createChatStreamResponse(await saveMessage(chatId, message)}// Delete everything after this user message- const messagesToDelete = currentChat.messages.slice(messageIndex + 1)+ const messagesToDelete = currentChat.messages.slice(+ messageIndex + 1+ )if (messagesToDelete.length > 0) {await deleteMessagesFromIndex(chatId, messagesToDelete[0].id)}// Get updated messages including the edited oneconst updatedChat = await getChatAction(chatId, userId)- messagesToModel = updatedChat?.messages || currentChat.messages.slice(0, messageIndex + 1)+ messagesToModel =+ updatedChat?.messages ||+ currentChat.messages.slice(0, messageIndex + 1)}} else {// Handle normal message submission