Skip to content

Replace the AI Content module with a version that uses plugins

Paul Smith requested to merge issue/ai-3484358:3484358-ai-content-needs into 1.0.x

This MR creates a new module to replace the AI Content module: this is because that module is named in a strange manner - its label does not match its machine name, and it implies that the module allows an LLM to edit content. The new module makes it clear that in all cases the LLM is just making suggestions. This also makes it easier to refactor the settings to better manage the fact that there may be multiple plugins that we don't know about to store settings for.

The MR also:

  1. Creates a PluginManager and Base Class for plugin versions of the functionality that was previously embedded in the form service.
  2. Creates a formAlter service to replace the previous module's Form service, to make clear what the service is doing.
  3. Creates plugins for each of the suggestion functions offered by the previous module, refactoring to reduce the use of duplicate code.
  4. Adds a settings form to enable/disable and configure the plugins.
  5. Adds a cache context that can be used to identify if new plugins have been enabled.
  6. Removes all functionality from AI Content and marks as deprecated. Also provides an update hook to copy settings to the new module and disable the old.

Closes #3484358

Merge request reports

Loading