Use UUIDv4 for profile IDs

0019da260c9662b762e70ddca6c0157262378202

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

1 files changed, +2 -1Showing whitespace changes
public/scripts/extensions/connection-manager/index.js+2 -1
@@ -2,6 +2,7 @@ import { main_api, saveSettingsDebounced } from '../../../script.js';
22import { extension_settings, renderExtensionTemplateAsync } from '../../extensions.js';
33import { callGenericPopup, Popup, POPUP_TYPE } from '../../popup.js';
44import { executeSlashCommandsWithOptions } from '../../slash-commands.js';
5+import { uuidv4 } from '../../utils.js';
56
67const MODULE_NAME = 'connection-manager';
78
@@ -96,7 +97,7 @@ async function readProfileFromCommands(mode, profile, cleanUp = false) {
9697 */
9798async function createConnectionProfile() {
9899 const mode = main_api === 'openai' ? 'cc' : 'tc';
99- const id = 'profile-' + Math.random().toString(36).substring(2);
100+ const id = uuidv4();
100101 const profile = {
101102 id,
102103 mode,