feat: add code and text block types (#609)
This commit is contained in:
parent
3df0fd4c0f
commit
9778631d6f
27 changed files with 1754 additions and 290 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { memo, type SetStateAction } from 'react';
|
||||
|
||||
import type { UIBlock } from './block';
|
||||
import type { BlockKind, UIBlock } from './block';
|
||||
import { FileIcon, LoaderIcon, MessageIcon, PencilEditIcon } from './icons';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ const getActionText = (
|
|||
|
||||
interface DocumentToolResultProps {
|
||||
type: 'create' | 'update' | 'request-suggestions';
|
||||
result: { id: string; title: string };
|
||||
result: { id: string; title: string; kind: BlockKind };
|
||||
block: UIBlock;
|
||||
setBlock: (value: SetStateAction<UIBlock>) => void;
|
||||
isReadonly: boolean;
|
||||
|
|
@ -59,6 +59,7 @@ function PureDocumentToolResult({
|
|||
|
||||
setBlock({
|
||||
documentId: result.id,
|
||||
kind: result.kind,
|
||||
content: '',
|
||||
title: result.title,
|
||||
isVisible: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue