diff --git a/README.md b/README.md index b75d8e7..d427e91 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ An immersive RPG extension for browsers that tracks character stats, scene infor ## 🆕 What's New +### v3.0.1 + +- Small bug fix where you couldn't edit the thought bubble. + ### v3.0.0 **What's new?** diff --git a/manifest.json b/manifest.json index d907c59..fc1b264 100644 --- a/manifest.json +++ b/manifest.json @@ -6,6 +6,6 @@ "js": "index.js", "css": "style.css", "author": "Marinara", - "version": "3.0.0", + "version": "3.0.1", "homePage": "https://github.com/SpicyMarinara/rpg-companion-sillytavern" } diff --git a/settings.html b/settings.html index 491da56..9564b89 100644 --- a/settings.html +++ b/settings.html @@ -39,7 +39,7 @@
- v3.0.0 + v3.0.1
diff --git a/src/systems/rendering/thoughts.js b/src/systems/rendering/thoughts.js index 40eef84..839412d 100644 --- a/src/systems/rendering/thoughts.js +++ b/src/systems/rendering/thoughts.js @@ -850,16 +850,50 @@ export function updateCharacterField(characterName, field, value) { } saveChatData(); - renderThoughts(); + // Re-render the sidebar thoughts panel, but skip updating chat bubbles if editing thoughts const thoughtsFieldName = presentCharsConfig?.thoughts?.name || 'Thoughts'; - if (field === thoughtsFieldName) { - setTimeout(() => updateChatThoughts(), 100); + const isEditingThoughts = field === thoughtsFieldName || field === 'thoughts'; + + if (!isEditingThoughts) { + renderThoughts(); } else { - updateChatThoughts(); + // Only update sidebar, don't trigger chat bubble refresh + $thoughtsContainer.find('.rpg-editable').off('blur'); + renderThoughtsSidebarOnly(); + $thoughtsContainer.find('.rpg-editable').on('blur', function() { + const char = $(this).data('character'); + const fld = $(this).data('field'); + const val = $(this).text().trim(); + updateCharacterField(char, fld, val); + }); } } +/** + * Renders only the sidebar thoughts panel without updating chat bubbles + */ +function renderThoughtsSidebarOnly() { + if (!extensionSettings.showCharacterThoughts || !$thoughtsContainer) { + return; + } + + // This is a simplified version that only updates the sidebar + // Copy the rendering logic from renderThoughts but skip the updateChatThoughts call + const thoughtsData = lastGeneratedData.characterThoughts || committedTrackerData.characterThoughts; + if (!thoughtsData) { + $thoughtsContainer.html('
No character data generated yet
'); + return; + } + + // Re-render sidebar content (this would be the full logic from renderThoughts) + // For now, just call renderThoughts but set a flag + const originalShowInChat = extensionSettings.showThoughtsInChat; + extensionSettings.showThoughtsInChat = false; + renderThoughts(); + extensionSettings.showThoughtsInChat = originalShowInChat; +} + /** * Updates or removes thought overlays in the chat. * Creates floating thought bubbles positioned near character avatars. diff --git a/src/systems/ui/modals.js b/src/systems/ui/modals.js index d6297e0..8602d4f 100644 --- a/src/systems/ui/modals.js +++ b/src/systems/ui/modals.js @@ -587,7 +587,7 @@ export function getSettingsModal() { * Checks if user has already seen this version's welcome screen */ export function showWelcomeModalIfNeeded() { - const WELCOME_VERSION = '3.0.0'; + const WELCOME_VERSION = '3.0.1'; const STORAGE_KEY = 'rpg_companion_welcome_seen'; try {