From df6a437518d89eebfa1a583e09ec99c462e64e47 Mon Sep 17 00:00:00 2001
From: Moli <13026959681@163.com>
Date: 星期三, 12 八月 2026 20:42:12 +0800
Subject: [PATCH] 移除发布文件的跟踪
---
samples/plugins/sample.llm-command-palette/index.html | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/samples/plugins/sample.llm-command-palette/index.html b/samples/plugins/sample.llm-command-palette/index.html
index 569f80b..6057f32 100644
--- a/samples/plugins/sample.llm-command-palette/index.html
+++ b/samples/plugins/sample.llm-command-palette/index.html
@@ -529,6 +529,8 @@
config: {}
};
+ let _resizeTimer;
+
const els = {
statusMark: document.getElementById("statusMark"),
projectSelect: document.getElementById("projectSelect"),
@@ -653,7 +655,15 @@
const screenHeight = window.screen && window.screen.availHeight ? window.screen.availHeight : 900;
const heightLimit = Math.floor(screenHeight * 0.5) + 88;
const height = explicitHeight || Math.min(Math.ceil(document.body.scrollHeight + 2), heightLimit);
- bridge.requestResize({ width: Math.ceil(document.body.scrollWidth), height }).catch(() => {});
+ if (explicitHeight != null) {
+ clearTimeout(_resizeTimer);
+ bridge.requestResize({ width: Math.ceil(document.body.scrollWidth), height }).catch(() => {});
+ return;
+ }
+ clearTimeout(_resizeTimer);
+ _resizeTimer = setTimeout(function() {
+ bridge.requestResize({ width: Math.ceil(document.body.scrollWidth), height }).catch(() => {});
+ }, 50);
}
function updatePanelLimits() {
--
Gitblit v1.9.1