mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
feat: surface chat page artifacts
This commit is contained in:
parent
365c8a1088
commit
ec907431d5
1 changed files with 12 additions and 0 deletions
|
|
@ -52,6 +52,7 @@ import {
|
||||||
} from "@/components/assistant-ui/token-usage-context";
|
} from "@/components/assistant-ui/token-usage-context";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Skeleton } from "@/components/ui/skeleton";
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
|
import { useSyncChatArtifacts } from "@/features/chat-artifacts";
|
||||||
import {
|
import {
|
||||||
type HitlDecision,
|
type HitlDecision,
|
||||||
PendingInterruptProvider,
|
PendingInterruptProvider,
|
||||||
|
|
@ -138,6 +139,13 @@ const MobileReportPanel = dynamic(
|
||||||
})),
|
})),
|
||||||
{ ssr: false }
|
{ 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
|
* Generate a synthetic ``toolCallId`` for an action_request that has no
|
||||||
|
|
@ -2501,6 +2509,9 @@ export default function NewChatPage() {
|
||||||
await handleRegenerate(null);
|
await handleRegenerate(null);
|
||||||
}, [handleRegenerate]);
|
}, [handleRegenerate]);
|
||||||
|
|
||||||
|
// Surface the thread's deliverables to the layout-level artifacts sidebar.
|
||||||
|
useSyncChatArtifacts(messages);
|
||||||
|
|
||||||
// Create external store runtime
|
// Create external store runtime
|
||||||
const runtime = useExternalStoreRuntime({
|
const runtime = useExternalStoreRuntime({
|
||||||
messages,
|
messages,
|
||||||
|
|
@ -2560,6 +2571,7 @@ export default function NewChatPage() {
|
||||||
<MobileReportPanel />
|
<MobileReportPanel />
|
||||||
<MobileEditorPanel />
|
<MobileEditorPanel />
|
||||||
<MobileHitlEditPanel />
|
<MobileHitlEditPanel />
|
||||||
|
<MobileArtifactsPanel />
|
||||||
</div>
|
</div>
|
||||||
</PendingInterruptProvider>
|
</PendingInterruptProvider>
|
||||||
<EditMessageDialog
|
<EditMessageDialog
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue