Update sillytavern.js

This commit is contained in:
Spicy_Marinara
2026-01-17 21:34:53 +01:00
parent c5a9c8631f
commit 2a48c30808
+5 -4
View File
@@ -397,10 +397,11 @@ export function onMessageSwiped(messageIndex) {
lastGeneratedData.infoBox = swipeData.infoBox || null; lastGeneratedData.infoBox = swipeData.infoBox || null;
lastGeneratedData.characterThoughts = swipeData.characterThoughts || null; lastGeneratedData.characterThoughts = swipeData.characterThoughts || null;
// Parse user stats if available // DON'T parse user stats when loading swipe data
if (swipeData.userStats) { // This would overwrite manually edited fields (like Conditions) with old swipe data
parseUserStats(swipeData.userStats); // The lastGeneratedData is loaded for display purposes only
} // parseUserStats() updates extensionSettings.userStats which should only be modified
// by new generations or manual edits, not by swipe navigation
// console.log('[RPG Companion] 🔄 Loaded swipe data into lastGeneratedData for display:', currentSwipeId); // console.log('[RPG Companion] 🔄 Loaded swipe data into lastGeneratedData for display:', currentSwipeId);
} else { } else {