diff --git a/packages/gitbook/src/components/Adaptive/AIPageLinkSummary.tsx b/packages/gitbook/src/components/Adaptive/AIPageLinkSummary.tsx index a7cb3e1a9..11afdec3d 100644 --- a/packages/gitbook/src/components/Adaptive/AIPageLinkSummary.tsx +++ b/packages/gitbook/src/components/Adaptive/AIPageLinkSummary.tsx @@ -10,9 +10,11 @@ import { streamLinkPageSummary } from './server-actions/streamLinkPageSummary'; export function AIPageLinkSummary(props: { currentSpaceId: string; currentPageId: string; + currentPageTitle: string; targetSpaceId: string; targetPageId: string; linkPreview?: string; + linkTitle?: string; showTrademark: boolean; }) { const { @@ -21,6 +23,7 @@ export function AIPageLinkSummary(props: { targetSpaceId, targetPageId, linkPreview, + linkTitle, showTrademark = true, } = props; @@ -38,14 +41,12 @@ export function AIPageLinkSummary(props: { targetSpaceId, targetPageId, linkPreview, + linkTitle, previousPageIds: [], }); for await (const highlight of stream) { if (canceled) return; - - // join the chunk if it's an array of strings or string|undefined - // console.log(summary[0]); setHighlight(highlight ?? ''); } })(); @@ -53,11 +54,11 @@ export function AIPageLinkSummary(props: { return () => { canceled = true; }; - }, [currentSpaceId, currentPageId, targetSpaceId, targetPageId]); + }, [currentSpaceId, currentPageId, targetSpaceId, targetPageId, linkPreview, linkTitle]); return (
{resolved.subText}
@@ -149,57 +161,28 @@ export async function InlineLink(props: InlineProps