diff --git a/frontend/src/modules/dashboard/BotDashboardModule.css b/frontend/src/modules/dashboard/BotDashboardModule.css
index 945fd79..5d165e1 100644
--- a/frontend/src/modules/dashboard/BotDashboardModule.css
+++ b/frontend/src/modules/dashboard/BotDashboardModule.css
@@ -390,7 +390,7 @@
}
.ops-chat-text {
- white-space: pre-wrap;
+ white-space: normal;
word-break: break-word;
overflow-wrap: anywhere;
line-height: 1.58;
@@ -398,6 +398,10 @@
color: var(--text);
}
+.ops-chat-text .whitespace-pre-wrap {
+ white-space: pre-wrap;
+}
+
.ops-chat-text.is-collapsed {
max-height: 220px;
overflow: hidden;
@@ -429,6 +433,10 @@
margin: 8px 0;
}
+.ops-chat-text p:empty {
+ margin: 0;
+}
+
.ops-chat-text pre {
margin: 8px 0;
overflow: auto;
diff --git a/frontend/src/modules/dashboard/messageParser.ts b/frontend/src/modules/dashboard/messageParser.ts
index cee7faa..9f4afc6 100644
--- a/frontend/src/modules/dashboard/messageParser.ts
+++ b/frontend/src/modules/dashboard/messageParser.ts
@@ -51,6 +51,10 @@ export function normalizeAssistantMessageText(input: string) {
// Remove dashboard wrapper if channel accidentally outputs raw marker line.
text = text.replace(/__DASHBOARD_DATA_START__/g, '').replace(/__DASHBOARD_DATA_END__/g, '').trim();
+ // Keep HTML-enabled markdown readable: cap excessive HTML line breaks/empty paragraphs.
+ text = text.replace(/(?:
\s*){4,}/gi, '
');
+ text = text.replace(/(?:
(?:\s| |
)*<\/p>\s*){3,}/gi, '