@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.cjs CHANGED
@@ -1570,10 +1570,12 @@ var AGENT_PANEL_STYLES = `
1570
1570
  border-radius: 10px;
1571
1571
  padding: 8px 30px 8px 10px;
1572
1572
  color: #e8ebf2;
1573
+ color-scheme: dark;
1573
1574
  background: var(--spotpatch-bg-raised);
1574
1575
  font-size: 15px;
1575
1576
  outline: none;
1576
1577
  }
1578
+ .spotpatch-agent select option { color: #e8ebf2; background: #10151e; }
1577
1579
  .spotpatch-agent select:focus-visible,
1578
1580
  .spotpatch-consent input:focus-visible {
1579
1581
  outline: 2px solid #8b7cf7;
@@ -1796,8 +1798,7 @@ function createAgentPanel(document, ai, localizer) {
1796
1798
  resetButton.hidden = true;
1797
1799
  }
1798
1800
  };
1799
- populateModels();
1800
- providerSelect.addEventListener("change", () => {
1801
+ function handleProviderChange() {
1801
1802
  populateModels();
1802
1803
  consentCheckbox.checked = false;
1803
1804
  capability.dataset.state = "idle";
@@ -1807,8 +1808,8 @@ function createAgentPanel(document, ai, localizer) {
1807
1808
  latestCapabilityErrorCode = void 0;
1808
1809
  capabilityReady = false;
1809
1810
  refreshActions();
1810
- });
1811
- modelSelect.addEventListener("change", () => {
1811
+ }
1812
+ function handleModelChange() {
1812
1813
  capability.dataset.state = "idle";
1813
1814
  capability.textContent = messages.agent.connectionNotTested;
1814
1815
  latestCapabilityState = "idle";
@@ -1816,7 +1817,10 @@ function createAgentPanel(document, ai, localizer) {
1816
1817
  latestCapabilityErrorCode = void 0;
1817
1818
  capabilityReady = false;
1818
1819
  refreshActions();
1819
- });
1820
+ }
1821
+ populateModels();
1822
+ providerSelect.addEventListener("change", handleProviderChange);
1823
+ modelSelect.addEventListener("change", handleModelChange);
1820
1824
  consentCheckbox.addEventListener("change", refreshActions);
1821
1825
  function renderCurrentJob() {
1822
1826
  if (latestSnapshot === void 0) {
@@ -1990,6 +1994,9 @@ function createAgentPanel(document, ai, localizer) {
1990
1994
  },
1991
1995
  dispose() {
1992
1996
  unsubscribeLocale();
1997
+ providerSelect.removeEventListener("change", handleProviderChange);
1998
+ modelSelect.removeEventListener("change", handleModelChange);
1999
+ consentCheckbox.removeEventListener("change", refreshActions);
1993
2000
  }
1994
2001
  });
1995
2002
  }