Field Widget Action for llm_summary Automator on text_textarea_with_summary widget
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3534675. -->
Reported by: [anjaliprasannan](https://www.drupal.org/user/3637917)
Related to !724
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The Field Widget Action module is merged into 1.2.x, however we need to start adding Automators plugins to it. The parent issue #3534445: Parent Issue: Create Field Widget Actions plugins for Automators. is a parent issue for all the implementations of the Automators plugins. Read more in the parent issue.</p>
<p>This issue implements the Field Widget Action plugin for the **Text with Summary** field using the **Textarea with Summary widget** (`text_textarea_with_summary`) and the `llm_summary` AI Automator. This allows automatic generation of summary text (teasers, intros) based on the main body content.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ul>
<li>In the <code>AI Automators</code> module, create a new Field Widget Action plugin under <code>src/Plugin/FieldWidgetAction</code>.</li>
<li>Name the plugin file <code>LlmSummaryTextareaWithSummary.php</code>.</li>
<li>Use the <code>FieldWidgetAction</code> attribute and connect it to:
<ul>
<li><code>field_types</code>: <code>text_with_summary</code></li>
<li><code>widget_types</code>: <code>text_textarea_with_summary</code></li>
</ul>
</li>
<li>Set the <code>formElementProperty</code> to <code>summary</code> and configure <code>aiAutomatorsAjax</code> to populate the summary text.</li>
<li>Manually test that the Automator correctly generates the summary text from body content, and attach a video of this working to the issue (or request a reviewer to do so).</li>
<li>(optional) Add a kernel test to validate the AJAX response.</li>
<li>(optional) Add a functional JavaScript test to verify the UI integration.</li>
</ul>
> Related issue: [Issue #3534445](https://www.drupal.org/node/3534445)
issue