Add preset switching feature and clean up console logs

- Add 'Use separate preset for tracker generation' setting
- Implement automatic preset switching using /preset slash command
- Import getCurrentPresetName() from SillyTavern's regex engine
- Automatically import 'RPG Companion Trackers' preset on first load
- Comment out non-essential console.log statements
- Keep initialization, error, and migration logs for debugging
This commit is contained in:
Spicy_Marinara
2025-10-19 20:05:17 +02:00
parent 4a3170c661
commit f5418841cb
10 changed files with 410 additions and 8 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import { getThumbnailUrl } from '../../../../../../script.js';
export function getSafeThumbnailUrl(type, filename) {
// Return null if no filename provided
if (!filename || filename === 'none') {
console.log(`[RPG Companion] No valid filename provided for ${type} thumbnail`);
// console.log(`[RPG Companion] No valid filename provided for ${type} thumbnail`);
return null;
}
@@ -30,7 +30,7 @@ export function getSafeThumbnailUrl(type, filename) {
return null;
}
console.log(`[RPG Companion] Successfully generated ${type} thumbnail URL for: ${filename}`);
// console.log(`[RPG Companion] Successfully generated ${type} thumbnail URL for: ${filename}`);
return url;
} catch (error) {
// Log detailed error information for debugging