Introduce "simple" mode

Created on 20 July 2024, 2 months ago

Problem/Motivation

For configuration of AI automator prompt, often the simplest text or twig mode might suffice.

Proposed resolution

Provide options to choose a way prompt is configured:

  • Text with tokens
  • Twig with variables
  • Full user interface

If user choose "simple" mode:

  • text area would be displayed instead of full UI
  • prompt by default would accept "input" and "parent_entity" arguments and make tokens available based on it

User will be able to switch modes back end forth between text/twig/ui at any time and retain functionality.

Remaining tasks

  1. Introduce most common arguments by default: "user_input" and "parent_entity".
  2. Introduce setting "User interface mode" which will be configured in "settings" tab of Implement horizontal tabs Active
  3. Introduce a method to override "User interface mode" setting in code so developer could also switch the user interface.
  4. Do the same within context of inline_entity_form. How to do that is unclear yet, doing some hooks on this module maybe is enough. Both developer and site builder should be able to pass arguments/settings to the prompt when integrating prompt with inline_entity_form, so setting have to be available in code, as well as, in inline_entity_form form widget.
  5. Create "twig" segment plugin with CK editor like experience as described in [META] Create a reusable "Prompt Entity" and field Active
  6. If user choose simple mode, show the form either from this "twig" or "text" segment plugin. If user switch modes again, switch the form/display to another segment plugin behind the scenes.
  7. If user switch to "full" mode, then display all segments which have been created including 'text' and 'twig'.

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇱🇹Lithuania mindaugasd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024