chore: update to ai sdk v5 beta (#1074)
This commit is contained in:
parent
7d8e71383f
commit
4c281fe09d
54 changed files with 1372 additions and 1060 deletions
|
|
@ -88,7 +88,10 @@ export const DocumentToolResult = memo(PureDocumentToolResult, () => true);
|
|||
|
||||
interface DocumentToolCallProps {
|
||||
type: 'create' | 'update' | 'request-suggestions';
|
||||
args: { title: string };
|
||||
args:
|
||||
| { title: string; kind: ArtifactKind } // for create
|
||||
| { id: string; description: string } // for update
|
||||
| { documentId: string }; // for request-suggestions
|
||||
isReadonly: boolean;
|
||||
}
|
||||
|
||||
|
|
@ -139,7 +142,15 @@ function PureDocumentToolCall({
|
|||
</div>
|
||||
|
||||
<div className="text-left">
|
||||
{`${getActionText(type, 'present')} ${args.title ? `"${args.title}"` : ''}`}
|
||||
{`${getActionText(type, 'present')} ${
|
||||
type === 'create' && 'title' in args && args.title
|
||||
? `"${args.title}"`
|
||||
: type === 'update' && 'description' in args
|
||||
? `"${args.description}"`
|
||||
: type === 'request-suggestions'
|
||||
? 'for document'
|
||||
: ''
|
||||
}`}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue