fix: message line break display in HypaV3 Data modal

This commit is contained in:
Bo26fhmC5M
2025-01-14 01:10:06 +09:00
parent f3c6278d21
commit 030e802122

View File

@@ -450,7 +450,7 @@
<!-- Message Content Area --> <!-- Message Content Area -->
{#if hypaV3ExpandedChatMemo.summaryChatMemos === summary.chatMemos && hypaV3ExpandedChatMemo.summaryChatMemo !== ""} {#if hypaV3ExpandedChatMemo.summaryChatMemos === summary.chatMemos && hypaV3ExpandedChatMemo.summaryChatMemo !== ""}
<div class="text-sm bg-darkbg/50 rounded border border-darkborderc"> <div class="text-sm bg-darkbg/50 rounded border border-darkborderc">
<div class="p-2 max-h-48 overflow-y-auto"> <div class="p-2 max-h-48 overflow-y-auto" style="white-space: pre-wrap;">
{(() => { {(() => {
const char = DBState.db.characters[$selectedCharID] const char = DBState.db.characters[$selectedCharID]
const chat = char.chats[DBState.db.characters[$selectedCharID].chatPage] const chat = char.chats[DBState.db.characters[$selectedCharID].chatPage]
@@ -459,7 +459,7 @@
if (targetMessage) { if (targetMessage) {
const displayRole = targetMessage.role === "char" ? char.name : targetMessage.role const displayRole = targetMessage.role === "char" ? char.name : targetMessage.role
return `${displayRole}: ${targetMessage.data}` return `${displayRole}:\n${targetMessage.data}`
} }
return "Message not found" return "Message not found"