mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 02:47:52 +01:00
Fix being unable to save instruct templates
This commit is contained in:
parent
d0657161a1
commit
88c47fccdf
@ -62,7 +62,10 @@ export async function loadSystemPrompts(data) {
|
||||
* @param {object} template Instruct template object
|
||||
*/
|
||||
export async function checkForSystemPromptInInstructTemplate(name, template) {
|
||||
if ('system_prompt' in template && name && template.system_prompt && !system_prompts.some(x => x.name === name)) {
|
||||
if (!template || !name || typeof name !== 'string' || typeof template !== 'object') {
|
||||
return;
|
||||
}
|
||||
if ('system_prompt' in template && template.system_prompt && !system_prompts.some(x => x.name === name)) {
|
||||
const html = await renderTemplateAsync('migrateInstructPrompt', { prompt: template.system_prompt });
|
||||
const confirm = await callGenericPopup(html, POPUP_TYPE.CONFIRM);
|
||||
if (confirm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user