expand agent responses in ALL mode
When detail mode is ALL (expanded), set data-detail-mode on #chat-history in applyModeSteps, so long messages are not collapsed with "Show more / Show less" buttons.
Alessandro committed
Mar 25, 2026 at 14:27 UTC
39dfcbcb274bbaa556cf9ef1002774d66acb98a6
2 files changed
+17
-1
webui/components/messages/process-group/process-group-dom.js
+4
-1
@@ -12,14 +12,17 @@ export function applyModeSteps(detailMode, showUtils) {
12
const chatHistory = document.getElementById("chat-history");
13
if (!chatHistory) return;
14
15
+ chatHistory.dataset.detailMode = mode;
16
+
17
const shouldExpand = mode !== "collapsed";
18
+ const allMode = mode === "expanded";
19
const messages = chatHistory.querySelectorAll(".process-group");
20
for (let i = 0; i < messages.length; i += 1) {
21
messages[i].classList.toggle("expanded", shouldExpand);
22
23
const steps = messages[i].querySelectorAll(".process-step");
24
for (let si = 0; si < steps.length; si += 1) {
22
- steps[si].classList.toggle("expanded", mode === "expanded");
25
+ steps[si].classList.toggle("expanded", allMode);
26
}
27
}
28
}
webui/css/messages.css
+13
@@ -735,6 +735,19 @@
735
opacity: 0;
736
}
737
738
+/* ALL detail mode: force full response bodies and hide the expand control */
739
+#chat-history[data-detail-mode="expanded"] .message.message-collapsible .message-body {
740
+ max-height: none !important;
741
+}
742
+
743
+#chat-history[data-detail-mode="expanded"] .message.message-collapsible .message-body::after {
744
+ opacity: 0;
745
+}
746
+
747
+#chat-history[data-detail-mode="expanded"] .message.message-collapsible .expand-btn {
748
+ display: none !important;
749
+}
750
+
751
/* Smooth Render */
752
.smooth-render-visible,
753
.smooth-render-invisible {