Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): update chat session after session created or reused (#9613)

akumatusc2d8c23f13c9
diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/setup-provider.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/setup-provider.tsx
index ed56943ed0..123c82553d 100644
--- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/setup-provider.tsx
+++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/ai/setup-provider.tsx
@@ -80,6 +80,12 @@ export function setupAIProvider(
workspaceId,
docId,
promptName,
+ }).then(sessionId => {
+ return updateChatSession({
+ sessionId,
+ client,
+ promptName,
+ });
}),
promptName,
});