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, + }, } );