Skip to content

✨ Blocknote AI#1847

Open
AntoLC wants to merge 13 commits intomainfrom
feat/blocknote-ai
Open

✨ Blocknote AI#1847
AntoLC wants to merge 13 commits intomainfrom
feat/blocknote-ai

Conversation

@AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Jan 30, 2026

Purpose

New AI feature powered by Blocknote. 🚀

Proposal

  • Better UI
  • Possibility to revert what the AI made
  • Collaborative friendly - Other collaborators will see the AI changes only when changes are accepted

New Settings:

AI_BOT = values.DictValue(
       default={
           "name": _("Docs AI"),
           "color": "#8bc6ff",
       },
       environ_name="AI_BOT",
       environ_prefix=None,
   )
AI_MODEL = values.Value(None, environ_name="AI_MODEL", environ_prefix=None)
AI_STREAM = values.BooleanValue(
       default=True, environ_name="AI_STREAM", environ_prefix=None
)

AI_STREAM is a setting because not all model support the stream mode.

Careful

⚠️ This feature is under AGPL license.
You can still use the previous AI feature that is under MIT license.

Demo

Enregistrement.2026-02-03.113122.mp4

@socket-security
Copy link

socket-security bot commented Jan 30, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​html-to/​text-cli@​0.5.4781009976100
Addedzod@​3.25.28981007695100
Added@​blocknote/​xl-ai@​0.46.280100799870
Added@​ai-sdk/​openai@​3.0.19991008698100
Addedmjml@​4.18.099999797100
Addedai@​6.0.499810010099100

View full report

@socket-security
Copy link

socket-security bot commented Jan 30, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm js-beautify is 100.0% likely obfuscated

Confidence: 1.00

Location: Package overview

From: ?npm/mjml@4.18.0npm/js-beautify@1.15.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/js-beautify@1.15.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Size Change: -352 B (-0.01%)

Total Size: 4.2 MB

Filename Size Change
apps/impress/out/_next/static/74e6b132/_buildManifest.js 893 B +893 B (new file) 🆕
apps/impress/out/_next/static/483071a3/_buildManifest.js 0 B -896 B (removed) 🏆
apps/impress/out/_next/static/chunks/6605.js 0 B -780 kB (removed) 🏆
apps/impress/out/_next/static/chunks/6961.js 778 kB +778 kB (new file) 🆕
apps/impress/out/_next/static/chunks/8495.js 66.2 kB +997 B (+1.53%)
apps/impress/out/_next/static/css/1e509c66bde71be8.css 34.3 kB +34.3 kB (new file) 🆕
apps/impress/out/_next/static/css/baacd4c537066d47.css 0 B -34.1 kB (removed) 🏆

compressed-size-action

@AntoLC AntoLC self-assigned this Jan 30, 2026
@github-actions
Copy link

github-actions bot commented Jan 30, 2026

🚀 Preview will be available at https://docs-ia.beta.numerique.gouv.fr/

You must create a access with yopmail.

Once this Pull Request is merged, the preview will be destroyed.

@AntoLC AntoLC changed the title Feat/blocknote ai ✨ Blocknote AI Jan 30, 2026
@AntoLC AntoLC force-pushed the feat/blocknote-ai branch 4 times, most recently from 7d5fed3 to 85ae764 Compare February 2, 2026 16:30
@AntoLC AntoLC marked this pull request as ready for review February 2, 2026 16:31
@AntoLC AntoLC force-pushed the feat/blocknote-ai branch 3 times, most recently from a899b5d to b617394 Compare February 3, 2026 09:50
@AntoLC AntoLC requested review from Ovgodd and lunika February 3, 2026 09:54
@AntoLC AntoLC linked an issue Feb 3, 2026 that may be closed by this pull request
@AntoLC AntoLC force-pushed the feat/blocknote-ai branch 5 times, most recently from 352dbd0 to d53583f Compare February 11, 2026 11:31
@AntoLC AntoLC mentioned this pull request Feb 12, 2026
3 tasks
Add AI proxy to handle AI related requests
to the AI service.
AntoLC and others added 12 commits February 18, 2026 17:12
We make the AI bot configurable with settings.
We will be able to have different AI bot name
per instance.
We want to handle both streaming or not when interacting with the AI
backend service.
Standard can vary depending on the AI service used.
To work with Albert API:
- a description field is required in the payload
  for every tools call.
- if stream is set to false, stream_options must
  be omitted from the payload.
- the response from Albert sometimes didn't respect
  the format expected by Blocknote, so we added a
  system prompt to enforce it.
We integrate the new Blocknote AI feature
into Docs, enhancing the document editing experience
with AI capabilities.
AI feature is under AGPL license, so it is removed
when the project is under MIT license.
NEXT_PUBLIC_PUBLISH_AS_MIT manage this.
Bind ai_proxy abilities to the AI feature.
If ai_proxy is false, the AI feature will
not be available.
notify screen readers about ai thinking, writing, ready, or error
This is a naive first switch from sync to async.
This enables the backend to still answer to incomming requests
while streaming LLM results to the user.

For sure there is room for code cleaning and improvements, but
this provides a nice improvement out of the box.
The frontend application is using Vercel AI SDK and it's data stream
protocol. We decided to use the pydantic AI library to use it's vercel
ai adapter. It will make the payload validation, use AsyncIterator and
deal with vercel specification.
When the tool applyDocumentOperations is used, we have to force the
usage of a system prompt in order to force the model to use it the right
without inventing different actions. The pydantic Agent class can use a
system prompt but this noe is ignoried when a UI adapter is used like
the VercelAiAdapter.
We don't need anymore the AI_STREAM settings, we use the stream all the
time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚡️Improve AI requests

3 participants

Comments