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:positionChanged event 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 via editor.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 _hash values during editor load and document updates. The hash extensions now only define the _hash attribute.

0.3.8

Patch Changes

  • 99d0172: Ensure tiptapReadChunks repairs 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 tiptapEdit operation reporting around an operationResults array that returns one result per attempted operation, including the target, success state, and any error message.

    Add streamingOptions field to streamTool and tiptapEditWorkflow, 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 tiptapEdit tool output now includes the operationResults property instead of successful and failed.
    • tiptapEditWorkflow now returns operationResults instead of successful and failed.
    • proofreaderWorkflow now returns operationResults instead of operations.
  • 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 markChange suggestion 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 tiptapRead tool is called. Fixes a bug where not all selectable nodes were set up in the returned content of the tiptapRead tool.
  • 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, tiptapRead now 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: tiptapRead now returns a TiptapReadResult
  • Breaking: tiptapRead takes a TiptapReadResult as argument.
  • Breaking: Add global attribute _hash to the document to assist with node selection when layering changes.
  • Breaking: Remove configurable hashTypes and selectableNodeTypes options. All nodes that are not inline are selectable now.
  • Breaking: Rename hash to target in proofreader operation types for consistency with edit operations.

3.0.0-alpha.87

Minor Changes

  • Add invertSuggestions method. 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 expandBlockChanges option to diffUtility and ExternalDiffUtilityOptions. 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 doc content (e.g. listItem nodes without a wrapping bulletList). The rendering now wraps the content in the required parent nodes before applying sub-change marks.

3.0.0-alpha.85

Minor Changes

  • Add preserveSlotAttr option to templateWorkflow and fillTemplate. When enabled, _templateSlot attributes 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 _templateSlot value are treated as a single slot and replaced together with one HTML output.
  • Add requiredSlots, requiredConditions, and requiredAttributes options to createTemplateValuesSchema. When omitted, all fields are required (the default). Pass an empty array to make all fields of a type optional.
  • Add TemplateField Tiptap extension that registers _templateSlot, _templateIf, and _templateAttributes as 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 fillTemplate signature from positional arguments (template, values, schema) to a named options object (options: FillTemplateOptions).
  • Breaking: Change createTemplateValuesSchema signature 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 groupInlineChanges was activated

3.0.0-alpha.83

Minor Changes

  • Add tiptapReadChunks method

3.0.0-alpha.82

Major Changes

  • Breaking: Remove getText, getHtml, getJson, getTextSelection, getHtmlSelection, and getJsonSelection methods. Use the Tiptap Editor API or getTextRange, getHtmlRange, getJsonRange, etc., instead.
  • Breaking: Simplify InsertPosition type from an 8-option union to Range | number. The position now accepts a numeric offset or a Range object. Defaults to the entire document range.
  • Breaking: Remove setHtmlSuggestions method. Use the Proofreader Workflow instead.
  • Breaking: Remove smartInline and smartInlineV2 diff modes. Use the smart mode instead.
  • Breaking: Simplify setSuggestions and addSuggestions to accept Suggestion[] directly instead of SuggestionsFormat[]. The compareDocuments format is no longer accepted. Use the new setSuggestionsFromDiff method instead.
  • Breaking: Simplify ReplacementOption from a discriminated union (SliceReplacementOption | TextReplacementOption) to a single interface with a content property (string | Slice). The type, addSlice, and addText properties are removed.

Minor Changes

  • Add setSuggestionsFromDiff method for comparing two documents and setting suggestions from the diff. This replaces the previous compareDocuments format in setSuggestions.

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 simplifyChanges incorrectly 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 offsetChanges not preserving the isInlineGroup property when mapping changes, which caused inline group information to be lost after offset adjustment.

3.0.0-alpha.75

Major Changes

  • Breaking: Add new smart diff 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 detailed diff mode to inline.
  • Breaking: Replace diffMode property in ReviewOptions with useDiffUtility (boolean). Use useDiffUtility: true instead of diffMode: 'detailed', and useDiffUtility: false instead of diffMode: 'full'.
  • Breaking: Set the default changeMergeDistance to 10.
  • Breaking: Rename displayOptions.showAsDiff to displayOptions.showReplacement.
  • Breaking: Remove displayOptions.diffPosition.
  • Breaking: Rename displayOptions.diffAttributes to displayOptions.replacementAttributes.
  • Breaking: Rename DiffUtilityConfig type to ExternalDiffUtilityOptions.
  • Breaking: Rename diffUtilityConfig property to diffUtilityOptions in all methods and options interfaces.

Deprecations

  • Deprecate smartInline and smartInlineV2 diff modes. Use smart mode 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 groupInlineChanges to diffUtility and diffUtilityOptions to control when inline edits are grouped into one suggestion.
  • Add displayOptions.showSubChanges, displayOptions.subChangeAttributes, and displayOptions.replacementSubChangeAttributes to customize grouped inline changes.
  • Add isInlineGroup to Suggestion for grouped inline changes.
  • In proofreaderWorkflow, inline changes are no longer grouped by default. Override with reviewOptions.diffUtilityOptions.groupInlineChanges when 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: templateWorkflow method for filling structured Tiptap templates with AI-generated content.
  • Add createHtmlTemplate utility 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 caused TypeError in 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 operationMeta option to toolDefinitions() and tiptapEditTool(). When set, the AI includes a meta field in each edit operation with an explanation of why the change was made.

3.0.0-alpha.69

Minor Changes

  • Improve simplifyChanges behavior in diffUtility.
  • When simplifyChanges is 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 AiCaret extension that shows a blinking cursor during AI streaming operations.
  • Remove unused dependencies: @tiptap/y-tiptap and @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 smartInlineV2 diff mode handle elements that are neither inline nor block elements, like table cells.

3.0.0-alpha.65

Minor Changes

  • Add smartInlineV2 diff mode to diffUtility. This mode improves on smartInline mode by displaying changes in block elements (like tables) correctly.

3.0.0-alpha.64

Patch Changes

  • Avoid using ProseMirror APIs like toObject that are not supported by older versions.

3.0.0-alpha.63

Minor Changes

  • Add tiptapEditHooks option to executeTool, streamTool, and tiptapEditWorkflow methods. This allows intercepting, modifying, or rejecting Tiptap Edit operations before they are applied. The beforeOperation hook receives context about each operation and returns a BeforeOperationResult that controls whether and how the operation is applied.

3.0.0-alpha.62

Major Changes

  • Update selectableNodeTypes parameter in Tiptap Edit tool so that, by default, the AI can select and replace any block node in the document.

Patch Changes

  • Remove console.log statements from comments tool operations.

3.0.0-alpha.61

Patch Changes

  • Improve createThread operation 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 editThreads tool and Comments workflow where the thread was sometimes created in the wrong position.

3.0.0-alpha.59

Minor Changes

  • Add streaming support to editThreads tool 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 isStreaming option to editThreadsWorkflow method. When isStreaming is 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 executeTool and streamTool methods, the output property now returns a JSON object instead of a string. This facilitates logging and parsing the tool output.

Minor Changes

  • Add smartInline diff mode to diffUtility. 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 HashAttributeExtension and enhances schema handling with better hash generation.
  • Breaking: Rename nodeRange to contentRange in tiptapRead method return type for better clarity and consistency.
  • Breaking: Rename nodes input property to content in workflow user prompts. This affects tiptapEditWorkflow and editThreadsWorkflow. Update your workflow calls to use content instead of nodes.

Minor Changes

  • Unify selectableNodeTypes handling across all Tiptap methods for consistency.
  • Relocate addHashesToDocument utility to tiptap-read directory for improved organization.

Patch Changes

  • Fix bug in comments tools where comments would be inserted in the wrong places.
  • Simplify hash generation in addHashesToDocument and shortHash utilities.
  • Streamline selectable node handling in Tiptap edit functions.

3.0.0-alpha.56

Patch Changes

  • Update getThreads pagination to use an exclusive upper bound in threadIndexRange.

3.0.0-alpha.55

Patch Changes

  • Paginate getThreads tool 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 tiptapEditWorkflow method. This method executes a workflow that allows the AI to edit the document with precise, efficient operations.
  • Add editThreadsWorkflow method. This method executes a workflow that allows the AI to manage comments and threads in the document.
  • Add getThreads method. 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 editThreads tool 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, and rejectAllChanges methods from the "Compare Documents" feature. Use acceptSuggestion, rejectSuggestion, acceptAllSuggestions, and rejectAllSuggestions instead. These methods now handle both regular suggestions and changes from the "Compare Documents" feature.
  • Rename applySuggestion to acceptSuggestion and applyAllSuggestions to acceptAllSuggestions for clarity and consistency with the new rejectSuggestion and rejectAllSuggestions methods.

Minor Changes

  • Add reviewMode field to Suggestion interface. 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 on reviewOptions.mode when suggestions are created.
  • Add rejectSuggestion and rejectAllSuggestions methods to reject suggestions without applying them. These methods return AI feedback about the rejected changes.
  • Modify acceptSuggestion and acceptAllSuggestions methods to return aiFeedback property. The aiFeedback contains 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 moize with micro-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 insertFragment method because it is no longer used.
  • Removes getActiveNodeRange and setActiveNodeRange methods because they are no longer used.

Minor Changes

  • Add proofreaderWorkflow method to the AI Toolkit. This method executes a workflow that allows the AI to proofread the document.
  • Add tiptapRead method 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, and tiptapReadSelection tools and set them as default. Remove readNodeRange, readSelection, insertContent and applyPatch tools.

3.0.0-alpha.46

Minor Changes

  • Add tiptapEdit, tiptapRead, and tiptapReadSelection tools 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 diffUtility method. The new mode option allows comparing documents at the block level by setting mode: '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 diffUtility where nearby changes in different top-level nodes would incorrectly get merged when using changeMergeDistance. Changes are now properly separated when they occur in different blocks, even if they are within the merge distance threshold.
  • Fix bug in the editThreads tool where the thread would not be created if the document had not been read before creating the thread.
  • In startComparingDocuments method, ensure that the other document has the same schema as the main document before comparing them.

3.0.0-alpha.44

Minor Changes

  • Add setMarkdownSuggestions method to display suggestions by comparing Markdown content with the current document. This method works similarly to setHtmlSuggestions but accepts Markdown input instead of HTML. Requires the Tiptap Markdown extension to be installed and configured.
  • Add getMarkdownRange method to extract Markdown content from a specific document range. Requires the Tiptap Markdown extension to be installed and configured.

Patch Changes

  • Fix bug in setHtmlSuggestions and setMarkdownSuggestions where text replacements using the changes format 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 changeMergeDistance option with diffUtilityOptions, to provide more customization options for the document comparison utility.

Minor Changes

  • Add diffUtilityOptions option to compareDocuments format in setSuggestions method. This allows configuring the document comparison utility.
  • Add diffAttributes option to displayOptions of Suggestion type 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 applyPatch and insertContent tools would not work correctly when streaming.

3.0.0-alpha.37

Major Changes

  • New format for the applyPatch tool. 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 use content.size instead of nodeSize - 1, and HTML formatting (bold, italic, links) is preserved when applying suggestions.

3.0.0-alpha.35

Patch Changes

  • Fix bug where the streamText and streamHtml methods unnecessarily converted a ReadableStream to an AsyncIterable, making them slower than necessary.

3.0.0-alpha.34

Minor Changes

  • Add changeMergeDistance option to diffUtility, 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 reviewOptions parameter to setHtmlSuggestions method. Users can now customize suggestion display options (like diffPosition, showAsDiff, custom renderDecorations) 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 no range parameter is provided, fixing a bug where positions were incorrectly shifted by -1.
  • Fix default diffPosition in setHtmlSuggestions to use 'after' instead of 'before', and make it configurable through reviewOptions.displayOptions.diffPosition.

3.0.0-alpha.33

Minor Changes

  • Add getSelectedSuggestion method to get the currently selected suggestion.

3.0.0-alpha.32

Minor Changes

  • Add setActiveSelection method to set the active selection. When set, this range overrides the current editor selection in tools like readSelection.

3.0.0-alpha.31

Minor Changes

  • Add commentsOptions property to executeTool and streamTool methods. This allows passing custom data to thread and comment operations. The data property is used for thread data (in editor.commands.setThread), while commentData is used for comment data (in editor.commands.createComment and editor.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 setHtmlSuggestions method 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 createThread operation where the thread was sometimes created in the wrong position.
  • Improve error messages that the AI receives when a createThread operation fails.

3.0.0-alpha.26

Major Changes

  • Add new editThreads and getThreads tools 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 applyPatch tool 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 applyDiff tool to applyPatch
  • Rename applyHtmlDiff method to applyHtmlPatch.
  • Improve format and tool definition of the applyDiff tool (now called applyPatch) 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 activeNodeRange position to the insertContent tool to allow the AI to insert content at the active node range. This improves the accuracy of the edits when the applyDiff tool 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 addHtmlSchemaAwareness method 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 getSchemaAwareness method to getHtmlSchemaAwareness
  • 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 readPage tool.

3.0.0-alpha.18

Patch Changes

  • Make streamHtml and streamText methods return a promise that resolves when the stream is finished

3.0.0-alpha.17

Major Changes

  • Improve tool definitions of readSelection and insertContent tools 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 streamHtml and streamText methods where a ReadableStream was not accepted as a parameter

3.0.0-alpha.16

Major Changes

  • Renamed detailedDiff to diffMode in review options to control how to display the difference between the original and the modified content

3.0.0-alpha.15

Major Changes

  • Add detailedDiff option to review options to control whether to display the change as a detailed diff. Rename showDiff option to detailedDiff for clarity
  • Add detailedDiff option to tool execution and streaming options to control whether to display the change as a detailed diff, and set it to true by 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 currentChunk parameter and return value from the executeTool method
    • The executeTool method no longer accepts currentChunk parameter
    • The executeTool method no longer returns currentChunk field
  • Add getActiveNodeRange method 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 the applyDiff tool. It replaces the currentChunk parameter.
  • Add setActiveNodeRange method to set the active node range
  • Remove tools readFirstChunk, readNextChunk and readPreviousChunk.
  • Add readNodeRange tool. 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 streamTool method to stream a tool call into the editor

3.0.0-alpha.13

Minor Changes

  • Add metadata option to review options to add custom metadata and properties to the suggestions that are generated during review mode
  • Add streamText and streamHtml methods to stream text and HTML content into the editor

Patch Changes

  • Fix issue in insertJson where 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 getAiToolkit is called but the Editor does not have the AiToolkit extension
  • Fix issue in getJsonChunks where the JSON chunks were not being returned in the correct format
  • Improve readFirstChunk tool response format

3.0.0-alpha.11

Patch Changes

  • Fix issue in diffUtility where identical empty documents were considered different

3.0.0-alpha.10

Major Changes

  • Add replaceDocumentWhereChanged method 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 applyHtmlDiff and rejectAllChanges methods to use replaceDocumentWhereChanged

3.0.0-alpha.9

Major Changes

  • Add rejectAllChanges method to reject all changes when comparing documents in real-time

3.0.0-alpha.8

Major Changes

  • Add acceptChange and rejectChange methods to accept and reject changes when comparing documents in real-time
  • Remove applySuggestionToOtherDoc method because it's equivalent to acceptChange but 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, and getTextRange methods 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 applySuggestionToOtherDoc method to apply a suggestion to the other document when comparing documents in real-time
  • Ignore the debounce timeout on the first run of startComparingDocuments so that the suggestions show up immediately and the app feels responsive

3.0.0-alpha.4

Major Changes

  • Remove needsReview option from return type of executeTool and use docChanged instead
  • The docChanged option is now true when the tool call modifies the document

3.0.0-alpha.3

Minor Changes

  • Add needsReview option to return type of executeTool to know when the tool call needs user review
  • Add applyAllSuggestions method to apply all suggestions at once
  • Improve error messages when tool calls fail

3.1.0-alpha.2

Patch Changes

  • Fix types of input parameter in the executeTool method 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