mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
@@ -36,7 +36,7 @@ import {
|
||||
textgenerationwebui_presets,
|
||||
textgenerationwebui_settings as textgen_settings,
|
||||
} from './textgen-settings.js';
|
||||
import { download, equalsIgnoreCaseAndAccents, parseJsonFile, waitUntilCondition } from './utils.js';
|
||||
import { download, equalsIgnoreCaseAndAccents, getSanitizedFilename, parseJsonFile, waitUntilCondition } from './utils.js';
|
||||
import { t } from './i18n.js';
|
||||
import { reasoning_templates } from './reasoning.js';
|
||||
|
||||
@@ -891,7 +891,7 @@ export async function initPresetManager() {
|
||||
|
||||
const popupHeader = !presetManager.isAdvancedFormatting() ? t`Rename preset` : t`Rename template`;
|
||||
const oldName = presetManager.getSelectedPresetName();
|
||||
const newName = await Popup.show.input(popupHeader, t`Enter a new name:`, oldName);
|
||||
const newName = await getSanitizedFilename(await Popup.show.input(popupHeader, t`Enter a new name:`, oldName) || '');
|
||||
if (!newName || oldName === newName) {
|
||||
console.debug(!presetManager.isAdvancedFormatting() ? 'Preset rename cancelled' : 'Template rename cancelled');
|
||||
return;
|
||||
|
Reference in New Issue
Block a user