Previously, there was a checkbox to select placement as MD display.
This was counterintuitive since some users believed MD display
enclosed the other placement options.
Now, add a universal switch to finely tune what parts of a chat should
be excluded with MD formatting. For example a regex with the option
enabled with AI output selected will only format replies from the
character.
This is an improvement since users can now choose what parts of a
chat to format rather than sticking with a global display specifier.
Signed-off-by: kingbri <bdashore3@proton.me>
Through the impersonate function it is possible for the AI to create a text as if it were in the place of the user's character, but the text is randomly generated without the user being able to suggest what he wants to be created. By including this new macro, the user will be able to guide the impersonate generation.
Multiple scripts were not running due to improper variable assingment.
For efficiency's sake, do not do a string comparison before returning
and instead do another variable assignment in the parent function.
Doing this reduces the length of regex hooks in the parent calls,
but also removes the need for unnecessary O(n) complexity of comparing
two string variables.
If there are errors, it would be advisable to add string comparison
and revert back to the old logic in parent function calls.
Signed-off-by: kingbri <bdashore3@proton.me>
Sendas uses a different character's name for messages, so allow
the use of a character name override in the regex match function.
This overrides substituteParams to use a different value.
Signed-off-by: kingbri <bdashore3@proton.me>
If the extension is disabled, don't use any regex formatting. In
addition, wrap all foreach logic into its own function which
reduces the size of all regex injections.
This commit also removes the need for working around static imports
as UI is separate from the engine and is therefore imported at the
same time as other non-static extensions.
Signed-off-by: kingbri <bdashore3@proton.me>