From 0019da260c9662b762e70ddca6c0157262378202 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 7 Sep 2024 01:12:53 +0300 Subject: [PATCH] Use UUIDv4 for profile IDs --- public/scripts/extensions/connection-manager/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts/extensions/connection-manager/index.js b/public/scripts/extensions/connection-manager/index.js index 91c0f459d..75819d2fb 100644 --- a/public/scripts/extensions/connection-manager/index.js +++ b/public/scripts/extensions/connection-manager/index.js @@ -2,6 +2,7 @@ import { main_api, saveSettingsDebounced } from '../../../script.js'; import { extension_settings, renderExtensionTemplateAsync } from '../../extensions.js'; import { callGenericPopup, Popup, POPUP_TYPE } from '../../popup.js'; import { executeSlashCommandsWithOptions } from '../../slash-commands.js'; +import { uuidv4 } from '../../utils.js'; const MODULE_NAME = 'connection-manager'; @@ -96,7 +97,7 @@ async function readProfileFromCommands(mode, profile, cleanUp = false) { */ async function createConnectionProfile() { const mode = main_api === 'openai' ? 'cc' : 'tc'; - const id = 'profile-' + Math.random().toString(36).substring(2); + const id = uuidv4(); const profile = { id, mode,