Use UUIDv4 for profile IDs

0019da260c9662b762e70ddca6c0157262378202

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Ignore whitespace
public/scripts/extensions/connection-manager/index.js+2 -1
@@ -2,6 +2,7 @@ import { main_api, saveSettingsDebounced } from '../../../script.js';
2import { extension_settings, renderExtensionTemplateAsync } from '../../extensions.js';2import { extension_settings, renderExtensionTemplateAsync } from '../../extensions.js';
3import { callGenericPopup, Popup, POPUP_TYPE } from '../../popup.js';3import { callGenericPopup, Popup, POPUP_TYPE } from '../../popup.js';
4import { executeSlashCommandsWithOptions } from '../../slash-commands.js';4import { executeSlashCommandsWithOptions } from '../../slash-commands.js';
5import { uuidv4 } from '../../utils.js';
56
6const MODULE_NAME = 'connection-manager';7const MODULE_NAME = 'connection-manager';
78
@@ -96,7 +97,7 @@ async function readProfileFromCommands(mode, profile, cleanUp = false) {
96 */97 */
97async function createConnectionProfile() {98async function createConnectionProfile() {
98 const mode = main_api === 'openai' ? 'cc' : 'tc';99 const mode = main_api === 'openai' ? 'cc' : 'tc';
99 const id = 'profile-' + Math.random().toString(36).substring(2);100 const id = uuidv4();
100 const profile = {101 const profile = {
101 id,102 id,
102 mode,103 mode,