fix: A2UI surfaces

This commit is contained in:
2026-05-01 22:41:10 +02:00
parent a5193240ad
commit 11df11dbdb
4 changed files with 87 additions and 7 deletions

View File

@@ -780,6 +780,14 @@ document.addEventListener("DOMContentLoaded", () => {
}
};
this.syncExpandedSurfaces = () => {
this.el
.querySelectorAll(".chat-inline-surface[data-expanded='true']")
.forEach((surface) => {
surface.open = true;
});
};
this.handleScroll = () => {
if (!this.scrollContainer) {
this.stickToBottom = true;
@@ -823,12 +831,14 @@ document.addEventListener("DOMContentLoaded", () => {
this.el.addEventListener("keydown", this.handleKeyDown);
this.syncScrollContainer();
this.syncExpandedSurfaces();
this.autoResize();
window.requestAnimationFrame(() => this.scrollToBottom(true));
},
updated() {
this.syncScrollContainer();
this.syncExpandedSurfaces();
this.autoResize();
window.requestAnimationFrame(() => this.scrollToBottom());
},