Migrate from AI Assistant to the AI Toolkit
The AI Assistant extension lets you integrate an AI chatbot that can make edits to the document based on a user-defined task.
You can implement the same functionality with the AI Toolkit by following the AI agent chatbot guide.
To review the changes made by the AI chatbot, you can use the review changes guide. The AI Toolkit has a built-in system to display suggestions that users can accept or reject, so it is not necessary to combine it with the AI Changes or the AI Suggestion extensions to implement this feature.
Implementing checkpoints
The AI Assistant extension has a checkpoints system that allows you to store and restore the state of the document and the conversation in a previous point in time.
With Tiptap's editor commands, you can also store a snapshot of the document's content at a specific point in time and restore it later.
// Take a snapshot of the document
const document = editor.getJSON()
// Restore that snapshot later
editor.setContent(document)This system gives you the flexibility to save and restore the document at any point in time. This is an improvement over the AI Assistant extension, where the checkpoints were only created in a few events of the chat conversation.