feat(integration): extract SillyTavern event handlers to dedicated module

- Create src/systems/integration/sillytavern.js with all event handlers
- Move commitTrackerData() (deferred from Epic 1)
- Move sendPlotProgression() to plotProgression.js
- Move updateGenerationModeUI() to layout.js
- Add registerAllEvents() and unregisterAllEvents() to events.js
- Centralize event registration in index.js initialization

This completes Epic 6: Integration Layer Extraction
~340 lines extracted from index.js
index.js reduced from ~783 lines to 423 lines
This commit is contained in:
Lucas 'Paperboy' Rose-Winters
2025-10-17 14:20:58 +11:00
parent 175ff9560c
commit 0764bc63a1
5 changed files with 486 additions and 388 deletions
+13
View File
@@ -252,3 +252,16 @@ export function applyPanelPosition() {
// Update collapse toggle icon direction for new position
updateCollapseToggleIcon();
}
/**
* Updates the UI based on generation mode selection.
*/
export function updateGenerationModeUI() {
if (extensionSettings.generationMode === 'together') {
// In "together" mode, manual update button is hidden
$('#rpg-manual-update').hide();
} else {
// In "separate" mode, manual update button is visible
$('#rpg-manual-update').show();
}
}