diff --git a/public/scripts/welcome-screen.js b/public/scripts/welcome-screen.js index 09ecee035..8c193b838 100644 --- a/public/scripts/welcome-screen.js +++ b/public/scripts/welcome-screen.js @@ -72,6 +72,11 @@ async function openRecentChat(avatarId, fileName) { try { await selectCharacterById(characterId); + const currentChatId = getCurrentChatId(); + if (currentChatId === fileName) { + console.debug(`Chat ${fileName} is already open.`); + return; + } await openCharacterChat(fileName); } catch (error) { console.error('Error opening recent chat:', error);