diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index 38d26cb4d..efb190770 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -10,11 +10,13 @@ import { appendImageToMessage, generateQuietPrompt, this_chid, + getCurrentChatId, } from "../../../script.js"; -import { getApiUrl, getContext, extension_settings, doExtrasFetch, modules } from "../../extensions.js"; +import { getApiUrl, getContext, extension_settings, doExtrasFetch, modules, renderExtensionTemplate } from "../../extensions.js"; import { selected_group } from "../../group-chats.js"; import { stringFormat, initScrollHeight, resetScrollHeight, timestampToMoment, getCharaFilename, saveBase64AsFile } from "../../utils.js"; import { getMessageTimeStamp, humanizedDateTime } from "../../RossAscends-mods.js"; +import { SECRET_KEYS, secret_state } from "../../secrets.js"; export { MODULE_NAME }; // Wraps a string into monospace font-face span @@ -27,10 +29,12 @@ const p = a => `
${a}
` const MODULE_NAME = 'sd'; const UPDATE_INTERVAL = 1000; -const postHeaders = { - 'Content-Type': 'application/json', - 'Bypass-Tunnel-Reminder': 'bypass', -}; +const sources = { + extras: 'extras', + horde: 'horde', + auto: 'auto', + novel: 'novel', +} const generationMode = { CHARACTER: 0, @@ -116,6 +120,8 @@ const helpString = [ ].join('