Better WI type readability, fixed clone and type opeators.

This commit is contained in:
bmen25124
2025-03-17 00:13:39 +03:00
parent 1593951281
commit 8dc66bd21b
3 changed files with 21 additions and 7 deletions

View File

@ -1992,7 +1992,7 @@ export function fuzzySearchGroups(searchValue, fuzzySearchCaches = null) {
*/
export function renderStoryString(params, { customStoryString = null, customInstructSettings = null } = {}) {
try {
const storyString = customStoryString ?? power_user.context.story_string;
const storyString = structuredClone(customStoryString ?? power_user.context.story_string);
const instructSettings = customInstructSettings ?? power_user.instruct;
// Validate and log possible warnings/errors