Skip to content

Commit 57f951a

Browse files
authored
Remove AI page link summaries (#3418)
1 parent 2800866 commit 57f951a

File tree

16 files changed

+2
-414
lines changed

16 files changed

+2
-414
lines changed

packages/gitbook/src/components/AIPageLinkSummary/AIPageLinkSummary.tsx

Lines changed: 0 additions & 190 deletions
This file was deleted.

packages/gitbook/src/components/AIPageLinkSummary/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/gitbook/src/components/AIPageLinkSummary/server-actions/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/gitbook/src/components/AIPageLinkSummary/server-actions/streamLinkPageSummary.ts

Lines changed: 0 additions & 157 deletions
This file was deleted.

packages/gitbook/src/components/DocumentView/InlineLink/InlineLink.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -108,37 +108,11 @@ function InlineLinkTooltipWrapper(props: {
108108
resolved.subText = undefined;
109109
}
110110

111-
const aiSummary: { pageId: string; spaceId: string } | undefined = (() => {
112-
if (isExternal) {
113-
return;
114-
}
115-
116-
if (isSamePage) {
117-
return;
118-
}
119-
120-
if (!('customization' in context) || !context.customization.ai?.pageLinkSummaries.enabled) {
121-
return;
122-
}
123-
124-
if (!('page' in context) || !('page' in inline.data.ref)) {
125-
return;
126-
}
127-
128-
if (inline.data.ref.kind === 'page' || inline.data.ref.kind === 'anchor') {
129-
return {
130-
pageId: resolved.page?.id ?? inline.data.ref.page ?? context.page.id,
131-
spaceId: inline.data.ref.space ?? context.space.id,
132-
};
133-
}
134-
})();
135-
136111
return (
137112
<InlineLinkTooltip
138113
breadcrumbs={breadcrumbs}
139114
isExternal={isExternal}
140115
isSamePage={isSamePage}
141-
aiSummary={aiSummary}
142116
openInNewTabLabel={tString(language, 'open_in_new_tab')}
143117
target={{
144118
href: resolved.href,

packages/gitbook/src/components/DocumentView/InlineLink/InlineLinkTooltip.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const InlineLinkTooltipImpl = dynamic(
3535
export function InlineLinkTooltip(props: {
3636
isSamePage: boolean;
3737
isExternal: boolean;
38-
aiSummary?: { pageId: string; spaceId: string };
3938
breadcrumbs: Array<{ href?: string; label: string; icon?: React.ReactNode }>;
4039
target: {
4140
href: string;

0 commit comments

Comments
 (0)