From 803e1a8f7e89090989f60b524db6872b63b7332e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Fri, 27 Mar 2026 14:47:58 +0100 Subject: [PATCH] Associate questions asked in the embeddable assistant to the proper channel --- .changeset/bumpy-bees-cover.md | 5 +++++ packages/gitbook/src/components/AI/server-actions/chat.ts | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/bumpy-bees-cover.md diff --git a/.changeset/bumpy-bees-cover.md b/.changeset/bumpy-bees-cover.md new file mode 100644 index 0000000000..09227a2dd4 --- /dev/null +++ b/.changeset/bumpy-bees-cover.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Associate questions asked in the embeddable assistant to the proper channel. diff --git a/packages/gitbook/src/components/AI/server-actions/chat.ts b/packages/gitbook/src/components/AI/server-actions/chat.ts index eaf4bcded4..685f923751 100644 --- a/packages/gitbook/src/components/AI/server-actions/chat.ts +++ b/packages/gitbook/src/components/AI/server-actions/chat.ts @@ -9,6 +9,7 @@ import { AIModel, type AIToolCallResult, type AIToolDefinition, + SiteCoreChannelType, type SiteInsightsSession, } from '@gitbook/api'; import { streamRenderAIMessage } from './api'; @@ -61,6 +62,11 @@ export async function* streamAIChatResponse({ toolCall, tools, session, + channel: { + type: options?.asEmbeddable + ? SiteCoreChannelType.Embed + : SiteCoreChannelType.Site, + }, } );