feat: anchor body tool cards

This commit is contained in:
CREDO23 2026-06-22 22:38:01 +02:00
parent 00082cb1ac
commit 365c8a1088

View file

@ -58,6 +58,7 @@ import {
DrawerTitle, DrawerTitle,
} from "@/components/ui/drawer"; } from "@/components/ui/drawer";
import { DropdownMenuLabel } from "@/components/ui/dropdown-menu"; import { DropdownMenuLabel } from "@/components/ui/dropdown-menu";
import { withArtifactAnchor } from "@/features/chat-artifacts";
import { useComments } from "@/hooks/use-comments"; import { useComments } from "@/hooks/use-comments";
import { useMediaQuery } from "@/hooks/use-media-query"; import { useMediaQuery } from "@/hooks/use-media-query";
import { useElectronAPI } from "@/hooks/use-platform"; import { useElectronAPI } from "@/hooks/use-platform";
@ -433,12 +434,12 @@ const MessageInfoDropdown: FC<{ chatTurnId: string | null | undefined }> = ({ ch
* body and is picked up by the timeline instead. * body and is picked up by the timeline instead.
*/ */
const BODY_TOOLS = { const BODY_TOOLS = {
generate_report: GenerateReportToolUI, generate_report: withArtifactAnchor(GenerateReportToolUI),
generate_resume: GenerateResumeToolUI, generate_resume: withArtifactAnchor(GenerateResumeToolUI),
generate_podcast: GeneratePodcastToolUI, generate_podcast: withArtifactAnchor(GeneratePodcastToolUI),
generate_video_presentation: GenerateVideoPresentationToolUI, generate_video_presentation: withArtifactAnchor(GenerateVideoPresentationToolUI),
display_image: GenerateImageToolUI, display_image: withArtifactAnchor(GenerateImageToolUI),
generate_image: GenerateImageToolUI, generate_image: withArtifactAnchor(GenerateImageToolUI),
} as const; } as const;
const NullBodyTool: ToolCallMessagePartComponent = () => null; const NullBodyTool: ToolCallMessagePartComponent = () => null;