AI Toolkit Changelog
@tiptap-pro/ai-toolkit
0.5.0
Minor Changes
- 81a6803: Tracked Changes support for the Insert Content workflow
- f41bb00: Add ignoreSuggestions option to the tiptapRead method
Patch Changes
- 81a6803: Preserve other suggestions when the Insert Content workflow generates a new suggestion.
0.4.0
Minor Changes
- b41d288: Add a new
aiCaret:positionChangedevent to the AI Caret extension. The event fires whenever the AI caret's position is updated during streaming or edit operations, with a payload of{ position: number }— a ProseMirror document position. Subscribe viaeditor.on('aiCaret:positionChanged', handler)to react to the AI's writing position, for example to implement auto-scrolling.
Patch Changes
- a8ac0a0: Improve the tiptapReadSelection tool so that it uses less tokens and it does not cause the AI to mistake the selected content with the content of the nodes where the selection is located.
- fd30961: When the AI wants to replace the entire document, prevent it from overwriting user's edits by comparing the current state of the document with the document state when the AI last read it.
- 99f0fde: The hash function used to check that AI does not overwrite user changes is more efficient.
0.3.10
Patch Changes
- 61cfeb6: Avoid rebuilding suggestion tracking state on streamed AI Toolkit updates that immediately replace suggestions.
- fb9430c: Performance optimization: skip unnecessary computations during streaming when no operation in the batch will be applied. This makes the proofreader workflow more performant while streaming.
0.3.9
Patch Changes
- 19c0fb9: Stop assigning
_hashvalues during editor load and document updates. The hash extensions now only define the_hashattribute.
0.3.8
Patch Changes
- 99d0172: Ensure
tiptapReadChunksrepairs missing document hashes before returning chunked content.
0.3.7
Patch Changes
- 0608c46: Minor bugfixes & improvements
0.3.6
Patch Changes
- 3ec3fe2: Preserve inline whitespace in parsed HTML without turning formatting whitespace around block nodes into standalone AI edit blocks.
0.3.5
Patch Changes
- 8d4641c: Revert whitespace preservation when parsing HTML into ProseMirror fragments.
0.3.4
Patch Changes
- a0ef231: Preserve whitespace when parsing HTML into ProseMirror fragments.
0.3.3
Patch Changes
- f09d930: Preserve node hashes across proofreader replacements so sequential corrections continue targeting the same content reliably.
0.3.2
0.3.1
Patch Changes
- edd30dc: Add ResizeObserver to split view that recalculates spacer heights when container width changes (e.g. sidebar toggle), with debounce and cooldown to prevent oscillation.
0.3.0
Patch Changes
- 6fd2db6: Fix split view spacer alignment by sorting inputs by vertical position
- 55562f3: Fix table row hashing when AI Toolkit operations parse standalone table HTML such as
<tr>content. - 35e5476: fix(ai-toolkit): compensate for broken CSS margin collapsing in split view spacers
0.2.3
Patch Changes
- a631995: Fix the proofreader workflow so all valid sequential corrections are applied.
0.2.2
Patch Changes
- daaa0b3: Add support for storing metadata on template fields and expose a helper to read field content plus metadata from Tiptap JSON templates.
- d531d09: fix(split-view): resolve accept/reject issues and improve UX
- 2c96594: Allow AI edit operations to insert and replace valid block content inside documents with fixed surrounding schema slots such as required headers and footers.
0.2.1
Patch Changes
- bb69e24: Improve proofreader replacement matching across punctuation boundaries so replacements can target words adjacent to characters like hyphens and slashes.
0.2.0
Minor Changes
-
e3082aa: Standardize
tiptapEditoperation reporting around anoperationResultsarray that returns one result per attempted operation, including the target, success state, and any error message.Add
streamingOptionsfield tostreamToolandtiptapEditWorkflow, to customize how content is streamed.Show a "typing effect" when streaming content in review mode or in preview mode. This "typing effect" can be disabled by configuring
streamingOptions.disableTypingEffect.Add Tracked Changes support to the Tiptap Edit workflow and the Proofreader workflow.
Add streaming support when using the AI Toolkit with Tracked Changes. When streaming content with tracked changes, streaming support does not show a "typing effect". Instead, it streams content on a per-operation basis.
Breaking changes:
- The
tiptapEdittool output now includes theoperationResultsproperty instead ofsuccessfulandfailed. tiptapEditWorkflownow returnsoperationResultsinstead ofsuccessfulandfailed.proofreaderWorkflownow returnsoperationResultsinstead ofoperations.
- The
-
ecc8c58: Add split-view for side-by-side tracked changes review
Patch Changes
-
df85690: Add compatibility for tracked mark-change suggestions in AI Toolkit tracked-changes readers.
The AI Toolkit tracked-changes read layer now recognizes the
markChangesuggestion type and updated tracked-changes suggestion unions so tracked mark-only suggestions are parsed without being rejected or misclassified.
0.1.4
Patch Changes
- cc227d4: Integrate AI Toolkit Tracked Changes feature with the Comments extension by following the official approach of emmitting events and setting a "suggestionReason" field on the thread.
0.1.3
Patch Changes
- eec70b8: Fix broken table rendering when streaming in review mode. Streaming now applies per-operation instead of per-character in review mode, temporarily removing the typing effect. The typing effect will return in a future release.
0.1.2
Patch Changes
- bdbdab4: Fixed a bug where all node hashes were regenerated instead of only duplicates after the first Yjs sync when using the AiToolkit hash extension with Collaboration.
- 8016488: Fixed suggestions disappearing when undoing or redoing changes with the collaboration extension active.
0.1.1
Patch Changes
- 46addf3: Ensure all selectable nodes are correctly set up when the
tiptapReadtool is called. Fixes a bug where not all selectable nodes were set up in the returned content of thetiptapReadtool. - b95990d: Fixed a bug where empty paragraphs accumulated in the document on every page reload when using the AiToolkit extension with the Collaboration extension and an externally created Yjs provider.
- de48513: Fix tiptapRead returning corrupted content after a preview-mode tiptapEdit that changes the document's node structure
- 27eb52a: Fixed table insertion failing with "Invalid HTML content" error when AI-generated HTML includes standard table wrapper elements like
<tbody>,<thead>, or<tfoot>.
0.1.0
Minor Changes
- e214bc6: Start a new versioning scheme that aligns all AI toolkit and server AI toolkit packages on the same version.
3.0.0-alpha.89
Minor Changes
- Add Tracked Changes review mode to AI Toolkit. When enabled, AI edits are written as tracked changes instead of standard review suggestions, and AI-generated change explanations can be attached as linked comments when the Comments extension is available.
- In tracked changes review mode,
tiptapReadnow returns the document as it looks after applying all tracked changes, so AI tools read the effective document content instead of the tracked-change markup.
Patch Changes
- Fix the diffing process used when rebuilding tracked changes so overlapping later edits are merged correctly and extra suggestions or duplicate tracked changes are not created.
3.0.0-alpha.88
Major Changes
- Suggestions are non-blocking: if the document has suggestions, the AI can keep editing and adding more suggestions on top of the existing ones. The user can review all suggestions at the end.
- Breaking:
tiptapReadnow returns aTiptapReadResult - Breaking:
tiptapReadtakes aTiptapReadResultas argument. - Breaking: Add global attribute
_hashto the document to assist with node selection when layering changes. - Breaking: Remove configurable
hashTypesandselectableNodeTypesoptions. All nodes that are not inline are selectable now. - Breaking: Rename
hashtotargetin proofreader operation types for consistency with edit operations.
3.0.0-alpha.87
Minor Changes
- Add
invertSuggestionsmethod. This method performs a dry run that applies all current suggestions to a copy of the document and returns the resulting document along with inverted suggestions that would undo those changes. The inverted suggestions preserve the metadata of the original suggestions. Preview mode suggestions become review mode in the inverted result, and vice versa.
3.0.0-alpha.86
Minor Changes
- Add
expandBlockChangesoption todiffUtilityandExternalDiffUtilityOptions. When a matched node's type is in the provided list and all of its inline content has changed, the individual inline changes are replaced by a single block-level change spanning the whole node. Defaults to['listItem']. Only applies when mode is 'smart'.
Patch Changes
- Fix crash in replacement decoration rendering when a diff change spans nodes that aren't valid as direct
doccontent (e.g.listItemnodes without a wrappingbulletList). The rendering now wraps the content in the required parent nodes before applying sub-change marks.
3.0.0-alpha.85
Minor Changes
- Add
preserveSlotAttroption totemplateWorkflowandfillTemplate. When enabled,_templateSlotattributes are kept on nodes after filling, allowing identification of AI-filled content and re-filling of template fields. - Add adjacent slot merging to
fillTemplate. Multiple consecutive nodes with the same_templateSlotvalue are treated as a single slot and replaced together with one HTML output. - Add
requiredSlots,requiredConditions, andrequiredAttributesoptions tocreateTemplateValuesSchema. When omitted, all fields are required (the default). Pass an empty array to make all fields of a type optional. - Add
TemplateFieldTiptap extension that registers_templateSlot,_templateIf, and_templateAttributesas global attributes on all node types in the editor schema. This extension provides commands (setTemplateSlot,unsetTemplateSlot,setTemplateIf,unsetTemplateIf,setTemplateAttributes,unsetTemplateAttributes) for setting and unsetting template attributes on the node at the current selection.
Major Changes
- Breaking: Change
fillTemplatesignature from positional arguments(template, values, schema)to a named options object(options: FillTemplateOptions). - Breaking: Change
createTemplateValuesSchemasignature from(template)to(options: CreateTemplateValuesSchemaOptions).
3.0.0-alpha.84
Patch Changes
- Fix bug where changes would show up in completely different places of the document if
groupInlineChangeswas activated
3.0.0-alpha.83
Minor Changes
- Add
tiptapReadChunksmethod
3.0.0-alpha.82
Major Changes
- Breaking: Remove
getText,getHtml,getJson,getTextSelection,getHtmlSelection, andgetJsonSelectionmethods. Use the Tiptap Editor API orgetTextRange,getHtmlRange,getJsonRange, etc., instead. - Breaking: Simplify
InsertPositiontype from an 8-option union toRange | number. The position now accepts a numeric offset or aRangeobject. Defaults to the entire document range. - Breaking: Remove
setHtmlSuggestionsmethod. Use the Proofreader Workflow instead. - Breaking: Remove
smartInlineandsmartInlineV2diff modes. Use thesmartmode instead. - Breaking: Simplify
setSuggestionsandaddSuggestionsto acceptSuggestion[]directly instead ofSuggestionsFormat[]. ThecompareDocumentsformat is no longer accepted. Use the newsetSuggestionsFromDiffmethod instead. - Breaking: Simplify
ReplacementOptionfrom a discriminated union (SliceReplacementOption | TextReplacementOption) to a single interface with acontentproperty (string | Slice). Thetype,addSlice, andaddTextproperties are removed.
Minor Changes
- Add
setSuggestionsFromDiffmethod for comparing two documents and setting suggestions from the diff. This replaces the previouscompareDocumentsformat insetSuggestions.
3.0.0-alpha.81
Patch Changes
- Fix custom node views not rendering when nested inside container nodes like blockquotes or lists.
3.0.0-alpha.80
Patch Changes
- Fix replacement sub-change marks spanning across node boundaries incorrectly.
- Fix
simplifyChangesincorrectly expanding changes across word boundaries. Changes adjacent to non-letter characters (like spaces or punctuation) are no longer absorbed into the change. Both the original and modified document are now checked when determining word boundaries.
3.0.0-alpha.79
Patch Changes
- Improve hash stability for repeated document nodes after edits.
3.0.0-alpha.78
Patch Changes
- Reduce hash collision probability when identifying document nodes.
3.0.0-alpha.77
Patch Changes
- Fix bug where, when the user modified a document, the AI was not able to locate any content below the content that the user had modified, and was forced to read the document again.
3.0.0-alpha.76
Patch Changes
- Fix
offsetChangesnot preserving theisInlineGroupproperty when mapping changes, which caused inline group information to be lost after offset adjustment.
3.0.0-alpha.75
Major Changes
- Breaking: Add new
smartdiff mode and set it as the default. This diff mode adapts intelligently to block and inline content. Changes never cut across block boundaries, producing clean diffs for structural document changes. - Breaking: Rename
detaileddiff mode toinline. - Breaking: Replace
diffModeproperty inReviewOptionswithuseDiffUtility(boolean). UseuseDiffUtility: trueinstead ofdiffMode: 'detailed', anduseDiffUtility: falseinstead ofdiffMode: 'full'. - Breaking: Set the default
changeMergeDistanceto10. - Breaking: Rename
displayOptions.showAsDifftodisplayOptions.showReplacement. - Breaking: Remove
displayOptions.diffPosition. - Breaking: Rename
displayOptions.diffAttributestodisplayOptions.replacementAttributes. - Breaking: Rename
DiffUtilityConfigtype toExternalDiffUtilityOptions. - Breaking: Rename
diffUtilityConfigproperty todiffUtilityOptionsin all methods and options interfaces.
Deprecations
- Deprecate
smartInlineandsmartInlineV2diff modes. Usesmartmode instead.
Minor Changes
- Improve performance of the inline diff mode.
- Fix bug in diff utility where the added content and the deleted content would both end with a space.
- Add
groupInlineChangestodiffUtilityanddiffUtilityOptionsto control when inline edits are grouped into one suggestion. - Add
displayOptions.showSubChanges,displayOptions.subChangeAttributes, anddisplayOptions.replacementSubChangeAttributesto customize grouped inline changes. - Add
isInlineGrouptoSuggestionfor grouped inline changes. - In
proofreaderWorkflow, inline changes are no longer grouped by default. Override withreviewOptions.diffUtilityOptions.groupInlineChangeswhen needed.
3.0.0-alpha.74
Patch Changes
- Fix suggestions not being removed when another user in a collaborative document deletes the content where the suggestion was placed.
3.0.0-alpha.73
Minor Changes
- Add template workflow:
templateWorkflowmethod for filling structured Tiptap templates with AI-generated content. - Add
createHtmlTemplateutility for converting Tiptap JSON templates to HTML.
3.0.0-alpha.72
Patch Changes
- Fix browser compatibility issue with ES2025 Iterator Helpers (
Map.entries().filter(),.map()) that causedTypeErrorin Safari < 18.4, Firefox < 131, and other browsers without Iterator Helpers support.
3.0.0-alpha.71
Patch Changes
- Fix empty paragraphs within a suggestion range not being visually marked.
3.0.0-alpha.70
Minor Changes
- Add
operationMetaoption totoolDefinitions()andtiptapEditTool(). When set, the AI includes ametafield in each edit operation with an explanation of why the change was made.
3.0.0-alpha.69
Minor Changes
- Improve
simplifyChangesbehavior indiffUtility. - When
simplifyChangesis enabled, single-character edits inside a word now expand to the full word boundary. - This now works for single-character insertions, deletions, and replacements, so diffs are easier to read.
3.0.0-alpha.68
Patch Changes
- Fix error that was thrown while streaming the proofreader workflow.
3.0.0-alpha.67
Major Changes
- Use Tiptap position utils for position mapping. This new version requires Tiptap 3.12.0 or higher.
- New implementation of streaming. This new implementation allows other users to modify the document while the AI is streaming. It affects the following operations:
- tiptapEdit tool
- proofreaderWorkflow
- tiptapEditWorkflow
- streamText
- streamHtml
Minor Changes
- Add
AiCaretextension that shows a blinking cursor during AI streaming operations. - Remove unused dependencies:
@tiptap/y-tiptapand@tiptap-pro/extension-comments
Patch Changes
- Fix error where active selection would be incorrectly updated when the document updated.
3.0.0-alpha.66
Patch Changes
- Make
smartInlineV2diff mode handle elements that are neither inline nor block elements, like table cells.
3.0.0-alpha.65
Minor Changes
- Add
smartInlineV2diff mode todiffUtility. This mode improves onsmartInlinemode by displaying changes in block elements (like tables) correctly.
3.0.0-alpha.64
Patch Changes
- Avoid using ProseMirror APIs like
toObjectthat are not supported by older versions.
3.0.0-alpha.63
Minor Changes
- Add
tiptapEditHooksoption toexecuteTool,streamTool, andtiptapEditWorkflowmethods. This allows intercepting, modifying, or rejecting Tiptap Edit operations before they are applied. ThebeforeOperationhook receives context about each operation and returns aBeforeOperationResultthat controls whether and how the operation is applied.
3.0.0-alpha.62
Major Changes
- Update
selectableNodeTypesparameter in Tiptap Edit tool so that, by default, the AI can select and replace any block node in the document.
Patch Changes
- Remove
console.logstatements from comments tool operations.
3.0.0-alpha.61
Patch Changes
- Improve
createThreadoperation to avoid an uncommon edge case that would cause the thread to be created in the wrong location. - Refactor code, reducing bundle size.
3.0.0-alpha.60
Patch Changes
- Fix bug in
editThreadstool and Comments workflow where the thread was sometimes created in the wrong position.
3.0.0-alpha.59
Minor Changes
- Add streaming support to
editThreadstool with operation tracking. Operations are tracked by count in extension storage to prevent duplicate execution during streaming. Storage automatically resets when tool call ID changes. - Add streaming support to the Comments workflow. Add
isStreamingoption toeditThreadsWorkflowmethod. WhenisStreamingis true, operations are executed up to (but not including) the last operation. When false or undefined, all operations including the last one are executed. Operations are tracked to prevent duplicate execution during streaming, and storage automatically resets when workflow ID changes.
Patch Changes
- Do not show trailing
<characters when streaming HTML content.
3.0.0-alpha.58
Major Changes
- In the return type of the
executeToolandstreamToolmethods, theoutputproperty now returns a JSON object instead of a string. This facilitates logging and parsing the tool output.
Minor Changes
- Add
smartInlinediff mode todiffUtility. This mode combines block-level and inline-level comparison for more efficient change detection: it first identifies changed blocks, then performs detailed inline diffing only within those blocks. This is useful for documents where only portions have changed, providing both efficiency and character-level precision.
3.0.0-alpha.57
Major Changes
- Breaking: Refactor Tiptap edit implementation for improved efficiency and accuracy. The new implementation removes the
HashAttributeExtensionand enhances schema handling with better hash generation. - Breaking: Rename
nodeRangetocontentRangeintiptapReadmethod return type for better clarity and consistency. - Breaking: Rename
nodesinput property tocontentin workflow user prompts. This affectstiptapEditWorkflowandeditThreadsWorkflow. Update your workflow calls to usecontentinstead ofnodes.
Minor Changes
- Unify
selectableNodeTypeshandling across all Tiptap methods for consistency. - Relocate
addHashesToDocumentutility totiptap-readdirectory for improved organization.
Patch Changes
- Fix bug in comments tools where comments would be inserted in the wrong places.
- Simplify hash generation in
addHashesToDocumentandshortHashutilities. - Streamline selectable node handling in Tiptap edit functions.
3.0.0-alpha.56
Patch Changes
- Update
getThreadspagination to use an exclusive upper bound inthreadIndexRange.
3.0.0-alpha.55
Patch Changes
- Paginate
getThreadstool output by thread index to respect chunk size limits.
3.0.0-alpha.54
Patch Changes
- Fix 'range out of bounds' error that sometimes occurred when accepting or rejecting all suggestions.
- Fix bug where user feedback was not correct when accepting a change generated by the "Compare Documents" feature.
3.0.0-alpha.53
Minor Changes
- Add
tiptapEditWorkflowmethod. This method executes a workflow that allows the AI to edit the document with precise, efficient operations. - Add
editThreadsWorkflowmethod. This method executes a workflow that allows the AI to manage comments and threads in the document. - Add
getThreadsmethod. This method retrieves all threads in the document with their comments and location information.
3.0.0-alpha.52
Patch Changes
- Fix bug where the position of the other suggestions was not updated correctly when a suggestion was accepted or rejected.
3.0.0-alpha.51
Major Changes
- Breaking: Change
editThreadstool to use a new, more efficient format. The new format is faster, more efficient, uses fewer tokens, and avoids diff mismatch errors completely, significantly improving the accuracy of the tool.
3.0.0-alpha.50
Major Changes
- Simplify the suggestions API by unifying regular suggestions and "Compare Documents" changes into a single set of methods.
- Remove
acceptChange,rejectChange, andrejectAllChangesmethods from the "Compare Documents" feature. UseacceptSuggestion,rejectSuggestion,acceptAllSuggestions, andrejectAllSuggestionsinstead. These methods now handle both regular suggestions and changes from the "Compare Documents" feature. - Rename
applySuggestiontoacceptSuggestionandapplyAllSuggestionstoacceptAllSuggestionsfor clarity and consistency with the newrejectSuggestionandrejectAllSuggestionsmethods.
Minor Changes
- Add
reviewModefield toSuggestioninterface. This field indicates whether a suggestion is in 'preview' mode (preview of a change before applying) or 'review' mode (review of a change that has already been made, allowing the user to undo it). The field is automatically set based onreviewOptions.modewhen suggestions are created. - Add
rejectSuggestionandrejectAllSuggestionsmethods to reject suggestions without applying them. These methods return AI feedback about the rejected changes. - Modify
acceptSuggestionandacceptAllSuggestionsmethods to returnaiFeedbackproperty. TheaiFeedbackcontains events with information about changes that were accepted or rejected by the user, including the deleted content, inserted content, and acceptance status. This feedback can be used to inform the AI about user preferences and improve future suggestions.
3.0.0-alpha.49
Patch Changes
- Replace deprecated dependency
moizewithmicro-memoize. - Remove unused dependency
debounce.
3.0.0-alpha.48
Major Changes
- Requires upgrading to a version of these provider libraries that is equal or higher than:
@tiptap-pro/ai-toolkit-tool-definitions@3.0.0-alpha.19
- Removes
insertFragmentmethod because it is no longer used. - Removes
getActiveNodeRangeandsetActiveNodeRangemethods because they are no longer used.
Minor Changes
- Add
proofreaderWorkflowmethod to the AI Toolkit. This method executes a workflow that allows the AI to proofread the document. - Add
tiptapReadmethod to the AI Toolkit. It reads the document in a format that allows the AI to make fast, efficient edits.
3.0.0-alpha.47
Major Changes
- Add
tiptapEdit,tiptapRead, andtiptapReadSelectiontools and set them as default. RemovereadNodeRange,readSelection,insertContentandapplyPatchtools.
3.0.0-alpha.46
Minor Changes
- Add
tiptapEdit,tiptapRead, andtiptapReadSelectiontools that make edits faster and more efficient. These tools are experimental and opt-in.
3.0.0-alpha.45
Minor Changes
- Add block-level diffing option to
diffUtilitymethod. The newmodeoption allows comparing documents at the block level by settingmode: 'block', treating each top-level node as a single unit. This is useful when you only need to know which paragraphs, headings, or other block-level elements have changed, without character-level detail.
Patch Changes
- Fix bug in
diffUtilitywhere nearby changes in different top-level nodes would incorrectly get merged when usingchangeMergeDistance. Changes are now properly separated when they occur in different blocks, even if they are within the merge distance threshold. - Fix bug in the
editThreadstool where the thread would not be created if the document had not been read before creating the thread. - In
startComparingDocumentsmethod, ensure that the other document has the same schema as the main document before comparing them.
3.0.0-alpha.44
Minor Changes
- Add
setMarkdownSuggestionsmethod to display suggestions by comparing Markdown content with the current document. This method works similarly tosetHtmlSuggestionsbut accepts Markdown input instead of HTML. Requires the Tiptap Markdown extension to be installed and configured. - Add
getMarkdownRangemethod to extract Markdown content from a specific document range. Requires the Tiptap Markdown extension to be installed and configured.
Patch Changes
- Fix bug in
setHtmlSuggestionsandsetMarkdownSuggestionswhere text replacements using thechangesformat would accidentally modify HTML tags. For example, replacing "a" with "an" would incorrectly turn<a>tags into<an>tags. The fix ensures that when the delete text doesn't contain HTML tag characters (<or>), replacements only occur in text content, not inside HTML tags.
3.0.0-alpha.43
Patch Changes
- Fix error where decorations were not updated correctly when a collaborative transaction is applied.
3.0.0-alpha.42
Patch Changes
- Fix error where decorations were not updated correctly when a collaborative transaction is applied.
3.0.0-alpha.41
Major changes
- Replace
changeMergeDistanceoption withdiffUtilityOptions, to provide more customization options for the document comparison utility.
Minor Changes
- Add
diffUtilityOptionsoption tocompareDocumentsformat insetSuggestionsmethod. This allows configuring the document comparison utility. - Add
diffAttributesoption todisplayOptionsofSuggestiontype to allow customizing the attributes of the diff decoration.
3.0.0-alpha.40
Patch Changes
- Fix bug that caused the AI to read the incorrect content of the document after updating the document.
3.0.0-alpha.39
Patch Changes
- Fix bug where new threads and comments were not created in the right position of the document.
3.0.0-alpha.38
Patch Changes
- Fix bug where the
applyPatchandinsertContenttools would not work correctly when streaming.
3.0.0-alpha.37
Major Changes
- New format for the
applyPatchtool. Improves speed and accuracy significantly. - Improved input/output format and tool definitions of all the built-in tools.
- Requires upgrading to a version of these provider libraries that is equal or higher than:
@tiptap-pro/ai-toolkit-tool-definitions@3.0.0-alpha.11@tiptap-pro/ai-toolkit-ai-sdk@3.0.0-alpha.14@tiptap-pro/ai-toolkit-anthropic@3.0.0-alpha.6@tiptap-pro/ai-toolkit-langchain@3.0.0-alpha.10@tiptap-pro/ai-toolkit-openai@3.0.0-alpha.9
3.0.0-alpha.36
Major Changes
- Makes the insertContent tool independent of the format of the content, by renaming the "html" property to "content".
- Requires upgrading to a version of these provider libraries that is equal or higher than:
@tiptap-pro/ai-toolkit-tool-definitions@3.0.0-alpha.10@tiptap-pro/ai-toolkit-ai-sdk@3.0.0-alpha.13@tiptap-pro/ai-toolkit-anthropic@3.0.0-alpha.5@tiptap-pro/ai-toolkit-langchain@3.0.0-alpha.9@tiptap-pro/ai-toolkit-openai@3.0.0-alpha.8
Patch Changes
- Fixes bug in insertContent tool where the activeNodeRange is not a valid value for the position.
- Fixes bug where the insertContent tool would cause the activeNodeRange to always reset to 0.
- Fix boundary errors and formatting loss in
setHtmlSuggestions. Document boundaries now usecontent.sizeinstead ofnodeSize - 1, and HTML formatting (bold, italic, links) is preserved when applying suggestions.
3.0.0-alpha.35
Patch Changes
- Fix bug where the
streamTextandstreamHtmlmethods unnecessarily converted a ReadableStream to an AsyncIterable, making them slower than necessary.
3.0.0-alpha.34
Minor Changes
- Add
changeMergeDistanceoption todiffUtility,startComparingDocuments,setSuggestions(compareDocuments format),setHtmlSuggestions, and all edit methods'reviewOptions. This allows merging nearby changes when comparing documents by specifying the maximum distance (in document positions) between changes to merge them into a single change. - Add
reviewOptionsparameter tosetHtmlSuggestionsmethod. Users can now customize suggestion display options (likediffPosition,showAsDiff, customrenderDecorations) and add custom metadata, following the same pattern as other edit methods. - Fix range offset calculation in
setHtmlSuggestions. Suggestions now correctly highlight the exact text when norangeparameter is provided, fixing a bug where positions were incorrectly shifted by -1. - Fix default
diffPositioninsetHtmlSuggestionsto use 'after' instead of 'before', and make it configurable throughreviewOptions.displayOptions.diffPosition.
3.0.0-alpha.33
Minor Changes
- Add
getSelectedSuggestionmethod to get the currently selected suggestion.
3.0.0-alpha.32
Minor Changes
- Add
setActiveSelectionmethod to set the active selection. When set, this range overrides the current editor selection in tools likereadSelection.
3.0.0-alpha.31
Minor Changes
- Add
commentsOptionsproperty toexecuteToolandstreamToolmethods. This allows passing custom data to thread and comment operations. Thedataproperty is used for thread data (ineditor.commands.setThread), whilecommentDatais used for comment data (ineditor.commands.createCommentandeditor.commands.setThread).
3.0.0-alpha.30
Patch Changes
- Fix a bug where changes in node attributes were not being detected correctly.
- When comparing documents, ignore the changes made by the Unique ID extension.
- When comparing documents, ignore the changes made by the Comments extension.
3.0.0-alpha.29
Minor Changes
- Add
setHtmlSuggestionsmethod to display suggestions by comparing HTML content with the current document
3.0.0-alpha.28
Patch Changes
- Fix incorrect import in library code that caused bundler to fail.
3.0.0-alpha.27
Patch Changes
- Fix issue in
createThreadoperation where the thread was sometimes created in the wrong position. - Improve error messages that the AI receives when a
createThreadoperation fails.
3.0.0-alpha.26
Major Changes
- Add new
editThreadsandgetThreadstools for AI-powered comment and thread management - Requires upgrading to a version of these provider libraries that is equal or higher than:
@tiptap-pro/ai-toolkit-tool-definitions@3.0.0-alpha.9@tiptap-pro/ai-toolkit-ai-sdk@3.0.0-alpha.12@tiptap-pro/ai-toolkit-anthropic@3.0.0-alpha.4@tiptap-pro/ai-toolkit-langchain@3.0.0-alpha.8@tiptap-pro/ai-toolkit-openai@3.0.0-alpha.7
3.0.0-alpha.25
Patch Changes
- Fix issue (regression) in
applyPatchtool where the last operation was not being parsed correctly when streaming. This caused the text to gradually disappear during streaming.
3.0.0-alpha.24
Major Changes
- Rename
applyDifftool toapplyPatch - Rename
applyHtmlDiffmethod toapplyHtmlPatch. - Improve format and tool definition of the
applyDifftool (now calledapplyPatch) so that the AI generates a list of patch operations. This improves accuracy (because the AI is not tempted to do unnecessary jumps) and reduces token usage significantly - Requires upgrading to a version of these provider libraries that is equal or higher than:
@tiptap-pro/ai-toolkit-tool-definitions@3.0.0-alpha.8@tiptap-pro/ai-toolkit-ai-sdk@3.0.0-alpha.11@tiptap-pro/ai-toolkit-langchain@3.0.0-alpha.7@tiptap-pro/ai-toolkit-openai@3.0.0-alpha.6@tiptap-pro/ai-toolkit-anthropic@3.0.0-alpha.3
3.0.0-alpha.23
Minor Changes
- Add
activeNodeRangeposition to theinsertContenttool to allow the AI to insert content at the active node range. This improves the accuracy of the edits when theapplyDifftool is disabled. - Requires upgrading to a version of these provider libraries that is equal or higher than:
@tiptap-pro/ai-toolkit-tool-definitions@3.0.0-alpha.7@tiptap-pro/ai-toolkit-ai-sdk@3.0.0-alpha.10@tiptap-pro/ai-toolkit-langchain@3.0.0-alpha.6@tiptap-pro/ai-toolkit-openai@3.0.0-alpha.5@tiptap-pro/ai-toolkit-anthropic@3.0.0-alpha.2
3.0.0-alpha.22
Minor Changes
- Add
addHtmlSchemaAwarenessmethod to the extension configuration to provide the schema awareness data of a custom Node or Mark extension.
3.0.0-alpha.21
Patch Changes
- Fix issue where the detailed diff was shown during streaming, which caused the diff to constantly update. Now, the detailed diff is only shown when the streaming is finished.
- Fix issue that caused extra paragraphs to be inserted during streaming, at the beginning of the streamed content.
3.0.0-alpha.20
Major Changes
- Rename
getSchemaAwarenessmethod togetHtmlSchemaAwareness - Improve the prompt generated by the schema awareness methods to be more accurate for the AI models
3.0.0-alpha.19
Minor Changes
- Experimental implementation of the AI Toolkit + Pages extension integration. Introduces the
readPagetool.
3.0.0-alpha.18
Patch Changes
- Make
streamHtmlandstreamTextmethods return a promise that resolves when the stream is finished
3.0.0-alpha.17
Major Changes
- Improve tool definitions of
readSelectionandinsertContenttools to fix a bug where the AI inserts the content in the wrong place if the user changes the selection after the AI reads the selection.
Patch Changes
- Fix issue in
streamHtmlandstreamTextmethods where aReadableStreamwas not accepted as a parameter
3.0.0-alpha.16
Major Changes
- Renamed
detailedDifftodiffModein review options to control how to display the difference between the original and the modified content
3.0.0-alpha.15
Major Changes
- Add
detailedDiffoption to review options to control whether to display the change as a detailed diff. RenameshowDiffoption todetailedDifffor clarity - Add
detailedDiffoption to tool execution and streaming options to control whether to display the change as a detailed diff, and set it totrueby default so that the changes are displayed as a detailed diff by default
3.0.0-alpha.14
Major Changes
- Requires upgrading to a version of these provider libraries that is equal or higher than:
@tiptap-pro/ai-toolkit-tool-definitions@3.0.0-alpha.4@tiptap-pro/ai-toolkit-ai-sdk@3.0.0-alpha.7@tiptap-pro/ai-toolkit-langchain@3.0.0-alpha.3@tiptap-pro/ai-toolkit-openai@3.0.0-alpha.2
- Remove
currentChunkparameter and return value from theexecuteToolmethod- The
executeToolmethod no longer acceptscurrentChunkparameter - The
executeToolmethod no longer returnscurrentChunkfield
- The
- Add
getActiveNodeRangemethod to get the active node range. The active node range is the range of top-level nodes that can be edited in the next tool call, it helps the AI make more precise edits when editing the document with theapplyDifftool. It replaces thecurrentChunkparameter. - Add
setActiveNodeRangemethod to set the active node range - Remove tools
readFirstChunk,readNextChunkandreadPreviousChunk. - Add
readNodeRangetool. This tool allows the AI to read any range of top-level nodes in the document. It is much more flexible than the previous chunk-based reading tools.
Minor Changes
- Add
streamToolmethod to stream a tool call into the editor
3.0.0-alpha.13
Minor Changes
- Add
metadataoption to review options to add custom metadata and properties to the suggestions that are generated during review mode - Add
streamTextandstreamHtmlmethods to stream text and HTML content into the editor
Patch Changes
- Fix issue in
insertJsonwhere it did not support Tiptap JSON of a ProseMirror Fragment - Fix issue in suggestions diff view where extra elements like paragraphs were displayed in the suggestion diff content
3.0.0-alpha.12
Patch Changes
- Show a warning when
getAiToolkitis called but the Editor does not have the AiToolkit extension - Fix issue in
getJsonChunkswhere the JSON chunks were not being returned in the correct format - Improve
readFirstChunktool response format
3.0.0-alpha.11
Patch Changes
- Fix issue in
diffUtilitywhere identical empty documents were considered different
3.0.0-alpha.10
Major Changes
- Add
replaceDocumentWhereChangedmethod to replace the entire document in an efficient way, so that not all the document is marked as replaced, but only the parts of the document that have changed - Re-implement
applyHtmlDiffandrejectAllChangesmethods to usereplaceDocumentWhereChanged
3.0.0-alpha.9
Major Changes
- Add
rejectAllChangesmethod to reject all changes when comparing documents in real-time
3.0.0-alpha.8
Major Changes
- Add
acceptChangeandrejectChangemethods to accept and reject changes when comparing documents in real-time - Remove
applySuggestionToOtherDocmethod because it's equivalent toacceptChangebut with a more confusing name
3.0.0-alpha.7
Major Changes
- Improved chunk format: now it includes the range of the chunk in the document
- Improve accuracy of
getHtmlRange,getJsonRange, andgetTextRangemethods when returning the chunk index
3.0.0-alpha.6
Patch Changes
- Fix issue with incorrect import
3.0.0-alpha.5
Minor Changes
- Add
applySuggestionToOtherDocmethod to apply a suggestion to the other document when comparing documents in real-time - Ignore the debounce timeout on the first run of
startComparingDocumentsso that the suggestions show up immediately and the app feels responsive
3.0.0-alpha.4
Major Changes
- Remove
needsReviewoption from return type ofexecuteTooland usedocChangedinstead - The
docChangedoption is nowtruewhen the tool call modifies the document
3.0.0-alpha.3
Minor Changes
- Add
needsReviewoption to return type ofexecuteToolto know when the tool call needs user review - Add
applyAllSuggestionsmethod to apply all suggestions at once - Improve error messages when tool calls fail
3.1.0-alpha.2
Patch Changes
- Fix types of
inputparameter in theexecuteToolmethod parameters so that it is compatible with the AI SDK by Vercel
3.1.0-alpha.1
Major changes
- Initial alpha release of the AI Toolkit