Rework getSegments() to return objects instead of data, introduce getSegmentsData() for data

Created on 1 August 2024, 5 months ago
Updated 18 August 2024, 4 months ago

Problem/Motivation

Improve existing architecture before implementing advanced inheritance feature ( Inheriting segments of parent prompt in user interface Active ).

Proposed resolution

Repeat same architecture like was done with new arguments feature ( Allow to pass variables to aiprompt programatically Active ), enabling to cleanly load segments of the parent prompt.

Make getSegments() return plugin instances instead of segments data, while new getSegmentsData() return the data instead.

Move getSegments() from entity classes to a common trait (same like getArguments() already is).

Redo all places which use getSegments().

Result will also be less and simpler code where objects are already instantiated, or in other places setter methods being used instead of processing raw data.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

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