基于WebView2实现的Win11桌面框架,利用插件自定义
chunhualin1
2026-08-12 97df0fb5ed49e37d1c8e0e62057bb72ba5c9eb6a
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);
      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() {