Use UUIDv4 for profile IDs
| @@ -2,6 +2,7 @@ import { main_api, saveSettingsDebounced } from '../../../script.js'; | |||
| 2 | import { extension_settings, renderExtensionTemplateAsync } from '../../extensions.js'; | 2 | import { extension_settings, renderExtensionTemplateAsync } from '../../extensions.js'; |
| 3 | import { callGenericPopup, Popup, POPUP_TYPE } from '../../popup.js'; | 3 | import { callGenericPopup, Popup, POPUP_TYPE } from '../../popup.js'; |
| 4 | import { executeSlashCommandsWithOptions } from '../../slash-commands.js'; | 4 | import { executeSlashCommandsWithOptions } from '../../slash-commands.js'; |
| 5 | import { uuidv4 } from '../../utils.js'; | ||
| 5 | 6 | ||
| 6 | const MODULE_NAME = 'connection-manager'; | 7 | const MODULE_NAME = 'connection-manager'; |
| 7 | 8 | ||
| @@ -96,7 +97,7 @@ async function readProfileFromCommands(mode, profile, cleanUp = false) { | |||
| 96 | */ | 97 | */ |
| 97 | async function createConnectionProfile() { | 98 | async 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, |