From da97410f48a1e94d7e1fe019c69a7c847fe67ddf Mon Sep 17 00:00:00 2001
From: chunhualin1 <chunhualin1@lenovo.com>
Date: 星期三, 12 八月 2026 17:42:02 +0800
Subject: [PATCH] 修复LLM工具无法点击的问题
---
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