fix: tweak styles (#645)

This commit is contained in:
Jeremy 2024-12-20 23:07:23 +05:30 committed by GitHub
parent 8d6eb09454
commit 50fbc0dab2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 43 additions and 31 deletions

View file

@ -123,7 +123,8 @@ export async function POST(request: Request) {
},
},
createDocument: {
description: 'Create a document for a writing activity.',
description:
'Create a document for a writing activity. This tool will call other functions that will generate the contents of the document based on the title and kind.',
parameters: z.object({
title: z.string(),
kind: z.enum(['text', 'code']),
@ -226,7 +227,7 @@ export async function POST(request: Request) {
},
},
updateDocument: {
description: 'Update a document with the given description',
description: 'Update a document with the given description.',
parameters: z.object({
id: z.string().describe('The ID of the document to update'),
description: z

View file

@ -6,6 +6,7 @@ import { Chat } from '@/components/chat';
import { DEFAULT_MODEL_NAME, models } from '@/lib/ai/models';
import { getChatById, getMessagesByChatId } from '@/lib/db/queries';
import { convertToUIMessages } from '@/lib/utils';
import { DataStreamHandler } from '@/components/data-stream-handler';
export default async function Page(props: { params: Promise<{ id: string }> }) {
const params = await props.params;
@ -39,12 +40,15 @@ export default async function Page(props: { params: Promise<{ id: string }> }) {
DEFAULT_MODEL_NAME;
return (
<Chat
id={chat.id}
initialMessages={convertToUIMessages(messagesFromDb)}
selectedModelId={selectedModelId}
selectedVisibilityType={chat.visibility}
isReadonly={session?.user?.id !== chat.userId}
/>
<>
<Chat
id={chat.id}
initialMessages={convertToUIMessages(messagesFromDb)}
selectedModelId={selectedModelId}
selectedVisibilityType={chat.visibility}
isReadonly={session?.user?.id !== chat.userId}
/>
<DataStreamHandler id={id} />
</>
);
}