@spotpatch/runtime 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1566,10 +1566,12 @@ var AGENT_PANEL_STYLES = `
1566
1566
  border-radius: 10px;
1567
1567
  padding: 8px 30px 8px 10px;
1568
1568
  color: #e8ebf2;
1569
+ color-scheme: dark;
1569
1570
  background: var(--spotpatch-bg-raised);
1570
1571
  font-size: 15px;
1571
1572
  outline: none;
1572
1573
  }
1574
+ .spotpatch-agent select option { color: #e8ebf2; background: #10151e; }
1573
1575
  .spotpatch-agent select:focus-visible,
1574
1576
  .spotpatch-consent input:focus-visible {
1575
1577
  outline: 2px solid #8b7cf7;
@@ -1792,8 +1794,7 @@ function createAgentPanel(document, ai, localizer) {
1792
1794
  resetButton.hidden = true;
1793
1795
  }
1794
1796
  };
1795
- populateModels();
1796
- providerSelect.addEventListener("change", () => {
1797
+ function handleProviderChange() {
1797
1798
  populateModels();
1798
1799
  consentCheckbox.checked = false;
1799
1800
  capability.dataset.state = "idle";
@@ -1803,8 +1804,8 @@ function createAgentPanel(document, ai, localizer) {
1803
1804
  latestCapabilityErrorCode = void 0;
1804
1805
  capabilityReady = false;
1805
1806
  refreshActions();
1806
- });
1807
- modelSelect.addEventListener("change", () => {
1807
+ }
1808
+ function handleModelChange() {
1808
1809
  capability.dataset.state = "idle";
1809
1810
  capability.textContent = messages.agent.connectionNotTested;
1810
1811
  latestCapabilityState = "idle";
@@ -1812,7 +1813,10 @@ function createAgentPanel(document, ai, localizer) {
1812
1813
  latestCapabilityErrorCode = void 0;
1813
1814
  capabilityReady = false;
1814
1815
  refreshActions();
1815
- });
1816
+ }
1817
+ populateModels();
1818
+ providerSelect.addEventListener("change", handleProviderChange);
1819
+ modelSelect.addEventListener("change", handleModelChange);
1816
1820
  consentCheckbox.addEventListener("change", refreshActions);
1817
1821
  function renderCurrentJob() {
1818
1822
  if (latestSnapshot === void 0) {
@@ -1986,6 +1990,9 @@ function createAgentPanel(document, ai, localizer) {
1986
1990
  },
1987
1991
  dispose() {
1988
1992
  unsubscribeLocale();
1993
+ providerSelect.removeEventListener("change", handleProviderChange);
1994
+ modelSelect.removeEventListener("change", handleModelChange);
1995
+ consentCheckbox.removeEventListener("change", refreshActions);
1989
1996
  }
1990
1997
  });
1991
1998
  }