From ec907431d5c41b88f4323a736ab4656d5924b6ce Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Mon, 22 Jun 2026 22:38:15 +0200 Subject: [PATCH] feat: surface chat page artifacts --- .../new-chat/[[...chat_id]]/page.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx index 3594e15eb..e8e24d1e8 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsx @@ -52,6 +52,7 @@ import { } from "@/components/assistant-ui/token-usage-context"; import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; +import { useSyncChatArtifacts } from "@/features/chat-artifacts"; import { type HitlDecision, PendingInterruptProvider, @@ -138,6 +139,13 @@ const MobileReportPanel = dynamic( })), { ssr: false } ); +const MobileArtifactsPanel = dynamic( + () => + import("@/features/chat-artifacts/ui/artifacts-panel").then((m) => ({ + default: m.MobileArtifactsPanel, + })), + { ssr: false } +); /** * Generate a synthetic ``toolCallId`` for an action_request that has no @@ -2501,6 +2509,9 @@ export default function NewChatPage() { await handleRegenerate(null); }, [handleRegenerate]); + // Surface the thread's deliverables to the layout-level artifacts sidebar. + useSyncChatArtifacts(messages); + // Create external store runtime const runtime = useExternalStoreRuntime({ messages, @@ -2560,6 +2571,7 @@ export default function NewChatPage() { +