diff --git a/src/ifcchat/app.js b/src/ifcchat/app.js
index ef0e9bce5b..8f2b1f3b97 100644
--- a/src/ifcchat/app.js
+++ b/src/ifcchat/app.js
@@ -75,14 +75,16 @@ function addMessage(role, text) {
const wrap = document.createElement("div");
wrap.className = `msg ${role}`;
wrap.innerHTML = `
-
${role}
+ ${role}${role === "tool" ? '▶' : ''}
`;
const bubble = wrap.querySelector(".bubble");
bubble.textContent = text;
bubble.onclick = function () {
if (bubble.scrollHeight > 100 && role === "tool") {
- bubble.style.maxHeight = bubble.style.maxHeight == 'none' ? '' : 'none';
- bubble.style.borderBottom = bubble.style.borderBottom == '' ? 'dotted 2px gray' : '';
+ const expanded = bubble.style.maxHeight === 'none';
+ bubble.style.maxHeight = expanded ? '' : 'none';
+ bubble.style.borderBottom = expanded ? '' : 'dotted 2px gray';
+ wrap.querySelector(".chevron").style.transform = expanded ? '' : 'rotate(90deg)';
}
}
msgsEl.appendChild(wrap);
diff --git a/src/ifcchat/style.css b/src/ifcchat/style.css
index 6c3af2f56e..90fd417501 100644
--- a/src/ifcchat/style.css
+++ b/src/ifcchat/style.css
@@ -82,6 +82,15 @@ main {
font-size: 60%;
max-height: 100px;
overflow: hidden;
+ cursor: pointer;
+}
+
+.chevron {
+ display: inline-block;
+ font-size: 10px;
+ margin-left: 6px;
+ transition: transform 0.2s;
+ vertical-align: middle;
}
.composer {