Make document call component clickable (#558)

This commit is contained in:
Jeremy 2024-11-19 15:46:09 +03:00 committed by GitHub
parent f360ff96cc
commit 9dcdb7b50b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 51 additions and 15 deletions

View file

@ -104,13 +104,22 @@ export const PreviewMessage = ({
{toolName === 'getWeather' ? (
<Weather />
) : toolName === 'createDocument' ? (
<DocumentToolCall type="create" args={args} />
<DocumentToolCall
type="create"
args={args}
setBlock={setBlock}
/>
) : toolName === 'updateDocument' ? (
<DocumentToolCall type="update" args={args} />
<DocumentToolCall
type="update"
args={args}
setBlock={setBlock}
/>
) : toolName === 'requestSuggestions' ? (
<DocumentToolCall
type="request-suggestions"
args={args}
setBlock={setBlock}
/>
) : null}
</div>