diff --git a/.changeset/khaki-waves-give.md b/.changeset/khaki-waves-give.md new file mode 100644 index 000000000..9cc481c90 --- /dev/null +++ b/.changeset/khaki-waves-give.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Fix an issue where links were not rendering properly in Ask AI answers diff --git a/packages/gitbook/src/components/Search/server-actions.tsx b/packages/gitbook/src/components/Search/server-actions.tsx index 8b356f2cb..2fd0ae786 100644 --- a/packages/gitbook/src/components/Search/server-actions.tsx +++ b/packages/gitbook/src/components/Search/server-actions.tsx @@ -338,7 +338,7 @@ async function transformAnswer( document={answer.answer.document} context={{ mode: 'default', - contentContext: undefined, + contentContext: context, wrapBlocksInSuspense: false, shouldRenderLinkPreviews: false, // We don't want to render link previews in the AI answer. }}