feat: Add preset management system for tracker configurations

- Add preset selector dropdown in tracker editor modal
- Support creating, loading, and deleting presets
- Add per-character/group preset associations with auto-switch
- Add default preset functionality with star button
- Update import to offer 'Apply to Current' or 'Create New Preset' options
- Add preset management UI styles and import dialog styles
This commit is contained in:
tomt610
2026-01-09 10:38:57 +00:00
parent ddc02d9bbc
commit f6733f87a2
6 changed files with 829 additions and 19 deletions
+7 -1
View File
@@ -22,7 +22,7 @@ import {
updateCommittedTrackerData,
$musicPlayerContainer
} from '../../core/state.js';
import { saveChatData, loadChatData } from '../../core/persistence.js';
import { saveChatData, loadChatData, autoSwitchPresetForEntity } from '../../core/persistence.js';
import { i18n } from '../../core/i18n.js';
// Generation & Parsing
@@ -297,6 +297,12 @@ export function onCharacterChanged() {
$(window).off('resize.thoughtPanel');
$(document).off('click.thoughtPanel');
// Auto-switch to the preset associated with this character/group (if any)
const presetSwitched = autoSwitchPresetForEntity();
// if (presetSwitched) {
// console.log('[RPG Companion] Auto-switched preset for character');
// }
// Load chat-specific data when switching chats
loadChatData();