Skip to content

Conversation

YousefED
Copy link
Collaborator

@YousefED YousefED commented Jun 9, 2025

This PR fixes a bug where AI generation would not work properly with an empty document.

The issue was that the empty block would be deleted - after which the LLM would not have any block to use as reference.

(An alternative would be to create a separate create document tool for this scenario. In this fix, I've decided to just keep the empty block)

Copy link

vercel bot commented Jun 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Jun 9, 2025 11:51am
blocknote-website ✅ Ready (Inspect) Visit Preview Jun 9, 2025 11:51am

@YousefED YousefED requested a review from nperez0111 June 9, 2025 11:45
@YousefED YousefED changed the title Fix: ai generation with empty document fix: ai generation with empty document Jun 9, 2025
Copy link

pkg-pr-new bot commented Jun 9, 2025

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@1740

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@1740

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1740

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@1740

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1740

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@1740

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@1740

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@1740

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@1740

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@1740

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@1740

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@1740

commit: 0ad6b85

Copy link
Contributor

@nperez0111 nperez0111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this looks good to me

@YousefED YousefED merged commit 7e5b354 into main Jun 9, 2025
20 checks passed
@YousefED YousefED deleted the fix/ai-empty-doc branch June 9, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants