refactor: replace message.content with message.parts (#868)
This commit is contained in:
parent
553a3d825a
commit
47a630fd53
25 changed files with 1311 additions and 311 deletions
|
|
@ -25,18 +25,8 @@ import {
|
|||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '@/components/ui/tooltip';
|
||||
import { sanitizeUIMessages } from '@/lib/utils';
|
||||
|
||||
import {
|
||||
ArrowUpIcon,
|
||||
CodeIcon,
|
||||
LogsIcon,
|
||||
MessageIcon,
|
||||
PenIcon,
|
||||
SparklesIcon,
|
||||
StopIcon,
|
||||
SummarizeIcon,
|
||||
} from './icons';
|
||||
import { ArrowUpIcon, StopIcon, SummarizeIcon } from './icons';
|
||||
import { artifactDefinitions, ArtifactKind } from './artifact';
|
||||
import { ArtifactToolbarItem } from './create-artifact';
|
||||
import { UseChatHelpers } from '@ai-sdk/react';
|
||||
|
|
@ -442,7 +432,7 @@ const PureToolbar = ({
|
|||
className="p-3"
|
||||
onClick={() => {
|
||||
stop();
|
||||
setMessages((messages) => sanitizeUIMessages(messages));
|
||||
setMessages((messages) => messages);
|
||||
}}
|
||||
>
|
||||
<StopIcon />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue