fix(plugins): key plugin center layout off container width
This commit is contained in:
1 parent
497d7c9e1e
commit
ebc9fcc098
4 files changed
+98
-16
No files matched your search
@@ -5033,16 +5033,21 @@ function dismissAwayUpdates() {
|
||||
|
||||
onMounted(async () => {
|
||||
assistantViewMounted = true;
|
||||
// Size handling has to be live before the first `await`: the bootstrap below
|
||||
// Register the resize/drop wiring before the first `await`: the bootstrap below
|
||||
// can take several frames (persisted runs plus the dynamic import of the code
|
||||
// highlighter), and a panel drag or window resize during that window would
|
||||
// otherwise be dropped, leaving the composer on a stale compact/expanded state.
|
||||
// highlighter), and a panel drag, window resize, or file/table drop during that
|
||||
// window would otherwise be dropped, leaving the composer on a stale
|
||||
// compact/expanded state — and the listeners of a panel closed mid-load were
|
||||
// added after onUnmounted had already run, leaking them.
|
||||
window.addEventListener("resize", handleWindowResize);
|
||||
document.addEventListener("dbx:tauri-file-drop", onTauriFileDrop as EventListener);
|
||||
window.addEventListener(DBX_TABLE_REFERENCE_DROP_EVENT, onTableReferenceDropEvent);
|
||||
if (typeof ResizeObserver !== "undefined" && assistantRootRef.value) {
|
||||
promptPanelResizeObserver = new ResizeObserver(handleObservedPanelResize);
|
||||
promptPanelResizeObserver.observe(assistantRootRef.value);
|
||||
if (promptPanelRef.value) promptPanelResizeObserver.observe(promptPanelRef.value);
|
||||
}
|
||||
scheduleResponsiveControlMeasurement(true);
|
||||
const savedHeight = localStorage.getItem(AI_TEXTAREA_HEIGHT_STORAGE_KEY);
|
||||
if (savedHeight) {
|
||||
const height = parseInt(savedHeight, 10);
|
||||
@@ -5147,10 +5152,6 @@ onMounted(async () => {
|
||||
shikiCodeHighlighter.value = await createAiShikiCodeHighlighter({
|
||||
appearance: () => aiCodeAppearance.value,
|
||||
}).catch(() => undefined);
|
||||
|
||||
document.addEventListener("dbx:tauri-file-drop", onTauriFileDrop as EventListener);
|
||||
window.addEventListener(DBX_TABLE_REFERENCE_DROP_EVENT, onTableReferenceDropEvent);
|
||||
scheduleResponsiveControlMeasurement(true);
|
||||
});
|
||||
|
||||
function maxTextareaHeight() {
|
||||
|
||||
Reference in new issue
Block a user