feat: edit and resubmit messages (#592)

This commit is contained in:
Jeremy 2024-12-05 15:29:33 +03:00 committed by GitHub
parent 2e479ccce7
commit 64d1aad2bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 302 additions and 25 deletions

View file

@ -36,8 +36,10 @@ export function Chat({
append,
isLoading,
stop,
reload,
data: streamingData,
} = useChat({
id,
body: { id, modelId: selectedModelId },
initialMessages,
onFinish: () => {
@ -81,6 +83,8 @@ export function Chat({
isLoading={isLoading}
votes={votes}
messages={messages}
setMessages={setMessages}
reload={reload}
/>
<form className="flex mx-auto px-4 bg-background pb-4 md:pb-6 gap-2 w-full md:max-w-3xl">
@ -116,6 +120,7 @@ export function Chat({
setBlock={setBlock}
messages={messages}
setMessages={setMessages}
reload={reload}
votes={votes}
/>
)}