You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DOC-3526: Document integrator-defined AI reviews and refresh supported models table (#4194)
Add a TINY-14200 release note and expand the tinymceai_reviews option
documentation with the integrator-defined review schema, types, and
examples. Refresh the AI supported models table with the latest models
returned by the models API.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/8.7.0-release-notes.adoc
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,13 @@ The {productname} {release-version} release includes an accompanying release of
73
73
74
74
**TinyMCE AI** includes the following improvements and fixes and additions.
75
75
76
+
==== Integrators can now add custom AI reviews using the `+tinymceai_reviews+` option
77
+
// #TINY-14200
78
+
79
+
Previously, the Review sidebar supported only a fixed set of built-in reviews, selected by ID through the `+tinymceai_reviews+` option. There was no supported way for integrators to add named reviews, parameterized prompts, or menus that mixed built-in and custom reviews. Integrators had to rely on generic flows, such as Custom review, instead of dedicated review actions in the Review sidebar.
80
+
81
+
In {productname} {release-version}, the `+tinymceai_reviews+` option also accepts integrator-defined review objects alongside the existing built-in string IDs. Integrators can define `+simple+`, `+list+`, and `+input+` review types, each with a custom name, description, and prompt. For the full schema and examples, see the xref:tinymceai.adoc#tinymceai_reviews[`+tinymceai_reviews+`] option.
82
+
76
83
==== The AI suggestions preview no longer shows deleted text when content has been replaced
Copy file name to clipboardExpand all lines: modules/ROOT/partials/configuration/tinymceai_options.adoc
+96-2Lines changed: 96 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -516,9 +516,9 @@ These options configure the AI Review sidebar, which provides content quality an
516
516
[[tinymceai_reviews]]
517
517
=== `+tinymceai_reviews+`
518
518
519
-
Array of review command IDs that define which review types appear in the Review sidebar and their order. Only the listed reviews are available to users.
519
+
Array that defines which reviews appear in the Review sidebar and their order. Only the listed reviews are available to users. Each item is either a built-in review command ID (a string) or an xref:#integrator-defined-reviews[integrator-defined review] (an object).
520
520
521
-
*Type:* `+Array+` of `+String+`
521
+
*Type:* `+Array+` of `+String+` or `+Object+`
522
522
523
523
*Valid values:*
524
524
@@ -563,3 +563,97 @@ tinymce.init({
563
563
});
564
564
----
565
565
566
+
[[integrator-defined-reviews]]
567
+
==== Integrator-defined reviews
568
+
569
+
In addition to the built-in review command IDs, the `+tinymceai_reviews+` option accepts integrator-defined review objects. These objects can be interleaved with the built-in string IDs, allowing integrators to add named reviews to the Review sidebar.
570
+
571
+
Each integrator-defined review object has a `+type+` of `+'simple'+`, `+'list'+`, or `+'input'+`, and shares the following properties:
572
+
573
+
* `+type+`: The review type. One of `+'simple'+`, `+'list'+`, or `+'input'+`.
574
+
* `+id+`: A unique identifier for the review. It must not reuse a built-in review command ID.
575
+
* `+name+`: The review name shown in the Review sidebar.
576
+
* `+description+`: A short description shown beneath the name.
577
+
* `+prompt+`: The prompt sent to the model when the review runs.
578
+
* `+model+` (optional): The model used for the review. The value must be a model ID that the configured AI service exposes (see xref:tinymceai-models.adoc[AI Models]). When omitted, the editor default model set by xref:tinymceai.adoc#tinymceai_default_model[`+tinymceai_default_model+`] is used.
579
+
580
+
A `+list+` review adds an `+options+` array, and an `+input+` review adds an optional `+inputPlaceholder+`:
581
+
582
+
* `+options+` (`+list+` only): An array of `+{ label, value }+` objects. The selected `+value+` is substituted into the prompt wherever `+{value}+` appears.
583
+
* `+inputPlaceholder+` (`+input+`, optional): Placeholder text for the input field. {productname} substitutes the text entered by the end user into the prompt wherever `+{input}+` appears.
584
+
585
+
If an integrator-defined review is invalid, for example, if it reuses a built-in review command ID or does not match the expected schema, {productname} falls back to the default reviews list in the Review sidebar.
586
+
587
+
NOTE: The `+model+` ID used in the following examples (`+agent-1+`) selects the recommended automatic model. The available model IDs depend on the configured AI service. See xref:tinymceai-models.adoc[AI Models] for the supported models and how to confirm which are available in an environment.
588
+
589
+
.Simple integrator-defined review
590
+
[source,js]
591
+
----
592
+
tinymceai_reviews: [
593
+
{
594
+
type: 'simple',
595
+
id: 'integrator-simple-review',
596
+
name: 'Simple Integrator Review',
597
+
description: 'This is a simple integrator review',
598
+
prompt: 'Review this document',
599
+
model: 'agent-1'
600
+
}
601
+
]
602
+
----
603
+
604
+
.List integrator-defined review
605
+
[source,js]
606
+
----
607
+
tinymceai_reviews: [
608
+
{
609
+
type: 'list',
610
+
id: 'integrator-list-review',
611
+
name: 'Translate Document',
612
+
description: 'Translate the document to a selected language.',
613
+
prompt: 'Translate this document to {value}',
614
+
model: 'agent-1',
615
+
options: [
616
+
{ label: 'English', value: 'english' },
617
+
{ label: 'Swedish', value: 'swedish' }
618
+
]
619
+
}
620
+
]
621
+
----
622
+
623
+
.Input integrator-defined review
624
+
[source,js]
625
+
----
626
+
tinymceai_reviews: [
627
+
{
628
+
type: 'input',
629
+
id: 'integrator-input-review',
630
+
name: 'Custom Instruction',
631
+
description: 'Apply a custom instruction.',
632
+
prompt: 'Apply the following instruction {input}',
633
+
model: 'agent-1',
634
+
inputPlaceholder: 'Enter an instruction here...'
635
+
}
636
+
]
637
+
----
638
+
639
+
.Built-in and integrator-defined reviews combined
640
+
[source,js]
641
+
----
642
+
tinymceai_reviews: [
643
+
// Built-in reviews
644
+
'ai-reviews-proofread',
645
+
'ai-reviews-improve-clarity',
646
+
'ai-reviews-change-tone',
647
+
'ai-reviews-custom',
648
+
// Integrator-defined review
649
+
{
650
+
type: 'simple',
651
+
id: 'integrator-simple-review',
652
+
name: 'Simple Integrator Review',
653
+
description: 'This is a simple integrator review',
0 commit comments