diff --git a/public/script.js b/public/script.js index a4906fcf3..a87e3f104 100644 --- a/public/script.js +++ b/public/script.js @@ -2491,8 +2491,8 @@ function getExtensionPrompt(position = extension_prompt_types.IN_PROMPT, depth = .sort() .map((x) => extension_prompts[x]) .filter(x => x.position == position && x.value) - .filter(x => x.depth === undefined || x.depth === depth) - .filter(x => x.role === undefined || x.role === role) + .filter(x => depth === undefined || x.depth === undefined || x.depth === depth) + .filter(x => role === undefined || x.role === undefined || x.role === role) .map(x => x.value.trim()) .join(separator); if (extension_prompt.length && !extension_prompt.startsWith(separator)) { diff --git a/public/scripts/authors-note.js b/public/scripts/authors-note.js index 24e73b278..773f2ebc8 100644 --- a/public/scripts/authors-note.js +++ b/public/scripts/authors-note.js @@ -115,13 +115,13 @@ async function onExtensionFloatingDepthInput() { } async function onExtensionFloatingPositionInput(e) { - chat_metadata[metadata_keys.position] = e.target.value; + chat_metadata[metadata_keys.position] = Number(e.target.value); updateSettings(); saveMetadataDebounced(); } async function onDefaultPositionInput(e) { - extension_settings.note.defaultPosition = e.target.value; + extension_settings.note.defaultPosition = Number(e.target.value); saveSettingsDebounced(); }