Rebuild workspace widgets and behavioral graph views

This commit is contained in:
2026-03-13 16:48:24 +00:00
parent f8a6d1d41c
commit 57269770b5
47 changed files with 2951 additions and 1077 deletions

View File

@@ -119,6 +119,7 @@
const threadController = threadModule.createController({
contactSelect: document.getElementById(panelId + "-contact-select"),
hiddenIdentifier: document.getElementById(panelId + "-input-identifier"),
historyLoader: document.getElementById(panelId + "-history-loader"),
hiddenPerson: document.getElementById(panelId + "-input-person"),
hiddenReplyTo: form.querySelector('input[name="reply_to_message_id"]'),
hiddenService: document.getElementById(panelId + "-input-service"),
@@ -135,6 +136,7 @@
thread: thread,
typingNode: document.getElementById(panelId + "-typing"),
});
state.threadController = threadController;
const sendController = sendModule.createController({
armInput: form.querySelector('input[name="failsafe_arm"]'),
@@ -177,6 +179,25 @@
},
initAll: initAll,
initPanel: initPanel,
scrollWidgetToLatest: function (widgetId) {
const widgetNode = widgetId ? document.getElementById(String(widgetId)) : null;
if (!widgetNode) {
return;
}
const panel = widgetNode.querySelector("[data-compose-panel]");
const panelId = String(panel && panel.id ? panel.id : "").trim();
if (!panelId) {
return;
}
const state = window.giaComposePanels[panelId];
if (
state
&& state.threadController
&& typeof state.threadController.scrollToLatest === "function"
) {
state.threadController.scrollToLatest();
}
},
};
document.addEventListener("DOMContentLoaded", function () {