@quanta-intellect/vessel-browser 0.1.58 → 0.1.61

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.
@@ -1088,11 +1088,11 @@ function render(code, element, init2, options = {}) {
1088
1088
  function template(html2, isImportNode, isSVG, isMathML) {
1089
1089
  let node;
1090
1090
  const create2 = () => {
1091
- const t = document.createElement("template");
1091
+ const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
1092
1092
  t.innerHTML = html2;
1093
- return t.content.firstChild;
1093
+ return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
1094
1094
  };
1095
- const fn = () => (node || (node = create2())).cloneNode(true);
1095
+ const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create2()), true)) : () => (node || (node = create2())).cloneNode(true);
1096
1096
  fn.cloneNode = fn;
1097
1097
  return fn;
1098
1098
  }
@@ -1433,7 +1433,7 @@ function Dynamic(props) {
1433
1433
  const [, others] = splitProps(props, ["component"]);
1434
1434
  return createDynamic(() => props.component, others);
1435
1435
  }
1436
- var _tmpl$$e = /* @__PURE__ */ template(`<div class=title-bar><div class=title-bar-drag></div><div class=mcp-status-area><button class=mcp-status-indicator><span class=mcp-dot></span><span class=mcp-label>MCP</span></button></div><div class=window-controls><button class=window-btn data-tooltip=Minimize><svg width=10 height=10 viewBox="0 0 10 10"><rect x=1 y=5 width=8 height=1 fill=currentColor></rect></svg></button><button class=window-btn data-tooltip=Maximize><svg width=10 height=10 viewBox="0 0 10 10"><rect x=1 y=1 width=8 height=8 fill=none stroke=currentColor stroke-width=1></rect></svg></button><button class="window-btn window-btn-close"data-tooltip=Close><svg width=10 height=10 viewBox="0 0 10 10"><line x1=1 y1=1 x2=9 y2=9 stroke=currentColor stroke-width=1.2></line><line x1=9 y1=1 x2=1 y2=9 stroke=currentColor stroke-width=1.2>`);
1436
+ var _tmpl$$h = /* @__PURE__ */ template(`<div class=title-bar><div class=title-bar-drag></div><div class=mcp-status-area><button class=mcp-status-indicator><span class=mcp-dot></span><span class=mcp-label>MCP</span></button></div><div class=window-controls><button class=window-btn data-tooltip=Minimize><svg width=10 height=10 viewBox="0 0 10 10"><rect x=1 y=5 width=8 height=1 fill=currentColor></rect></svg></button><button class=window-btn data-tooltip=Maximize><svg width=10 height=10 viewBox="0 0 10 10"><rect x=1 y=1 width=8 height=8 fill=none stroke=currentColor stroke-width=1></rect></svg></button><button class="window-btn window-btn-close"data-tooltip=Close><svg width=10 height=10 viewBox="0 0 10 10"><line x1=1 y1=1 x2=9 y2=9 stroke=currentColor stroke-width=1.2></line><line x1=9 y1=1 x2=1 y2=9 stroke=currentColor stroke-width=1.2>`);
1437
1437
  const TitleBar = () => {
1438
1438
  const [mcpStatus, setMcpStatus] = createSignal("starting");
1439
1439
  const [mcpTooltip, setMcpTooltip] = createSignal("MCP: starting...");
@@ -1464,7 +1464,7 @@ const TitleBar = () => {
1464
1464
  window.vessel.ui.setSettingsVisibility(true);
1465
1465
  };
1466
1466
  return (() => {
1467
- var _el$ = _tmpl$$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling;
1467
+ var _el$ = _tmpl$$h(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling;
1468
1468
  _el$4.$$click = handleMcpClick;
1469
1469
  _el$6.$$click = () => window.vessel.window.minimize();
1470
1470
  _el$7.$$click = () => window.vessel.window.maximize();
@@ -1488,34 +1488,46 @@ const TitleBar = () => {
1488
1488
  delegateEvents(["click"]);
1489
1489
  const [tabs, setTabs] = createSignal([]);
1490
1490
  const [activeTabId, setActiveTabId] = createSignal("");
1491
- let initialized$3 = false;
1492
- let initPromise$2 = null;
1493
- function init$3() {
1494
- if (initPromise$2) return initPromise$2;
1495
- if (initialized$3) return;
1496
- initialized$3 = true;
1497
- initPromise$2 = (async () => {
1498
- try {
1499
- window.vessel.tabs.onStateUpdate(
1500
- (newTabs, newActiveId) => {
1501
- setTabs(newTabs);
1502
- setActiveTabId(newActiveId);
1503
- }
1504
- );
1505
- const initialState = await window.vessel.tabs.getState();
1506
- setTabs(initialState.tabs);
1507
- setActiveTabId(initialState.activeId);
1508
- } catch (error) {
1509
- initialized$3 = false;
1510
- console.error("Failed to initialize tabs store", error);
1511
- } finally {
1512
- initPromise$2 = null;
1513
- }
1514
- })();
1515
- return initPromise$2;
1491
+ let initialized$4 = false;
1492
+ let initPromise$3 = null;
1493
+ let unsubscribeStateUpdate = null;
1494
+ async function doInit() {
1495
+ try {
1496
+ if (unsubscribeStateUpdate) {
1497
+ unsubscribeStateUpdate();
1498
+ unsubscribeStateUpdate = null;
1499
+ }
1500
+ unsubscribeStateUpdate = window.vessel.tabs.onStateUpdate(
1501
+ (newTabs, newActiveId) => {
1502
+ setTabs(newTabs);
1503
+ setActiveTabId(newActiveId);
1504
+ }
1505
+ );
1506
+ const initialState = await window.vessel.tabs.getState();
1507
+ setTabs(initialState.tabs);
1508
+ setActiveTabId(initialState.activeId);
1509
+ } catch (error) {
1510
+ initialized$4 = false;
1511
+ console.error("Failed to initialize tabs store", error);
1512
+ throw error;
1513
+ }
1516
1514
  }
1515
+ function init$4() {
1516
+ if (initPromise$3) return initPromise$3;
1517
+ if (initialized$4) return;
1518
+ initialized$4 = true;
1519
+ initPromise$3 = doInit().finally(() => {
1520
+ initPromise$3 = null;
1521
+ });
1522
+ return initPromise$3;
1523
+ }
1524
+ const patchTab = (id, patch) => {
1525
+ setTabs(
1526
+ (prev) => prev.map((t) => t.id === id ? { ...t, ...patch } : t)
1527
+ );
1528
+ };
1517
1529
  function useTabs() {
1518
- init$3();
1530
+ init$4();
1519
1531
  return {
1520
1532
  tabs,
1521
1533
  activeTabId,
@@ -1538,6 +1550,13 @@ function useTabs() {
1538
1550
  reload: () => {
1539
1551
  const id = activeTabId();
1540
1552
  if (id) window.vessel.tabs.reload(id);
1553
+ },
1554
+ toggleAdBlock: async (id) => {
1555
+ const newState = await window.vessel.tabs.toggleAdBlock(id);
1556
+ if (newState !== null && newState !== void 0) {
1557
+ patchTab(id, { adBlockingEnabled: newState });
1558
+ }
1559
+ return newState;
1541
1560
  }
1542
1561
  };
1543
1562
  }
@@ -1568,13 +1587,13 @@ const DEFAULT_RUNTIME_STATE = {
1568
1587
  const [runtimeState, setRuntimeState] = createSignal(
1569
1588
  DEFAULT_RUNTIME_STATE
1570
1589
  );
1571
- let initialized$2 = false;
1572
- let initPromise$1 = null;
1573
- async function init$2() {
1574
- if (initPromise$1) return initPromise$1;
1575
- if (initialized$2) return;
1576
- initialized$2 = true;
1577
- initPromise$1 = (async () => {
1590
+ let initialized$3 = false;
1591
+ let initPromise$2 = null;
1592
+ async function init$3() {
1593
+ if (initPromise$2) return initPromise$2;
1594
+ if (initialized$3) return;
1595
+ initialized$3 = true;
1596
+ initPromise$2 = (async () => {
1578
1597
  try {
1579
1598
  const initial = await window.vessel.ai.getRuntime();
1580
1599
  setRuntimeState(initial);
@@ -1582,16 +1601,16 @@ async function init$2() {
1582
1601
  setRuntimeState(state);
1583
1602
  });
1584
1603
  } catch (error) {
1585
- initialized$2 = false;
1604
+ initialized$3 = false;
1586
1605
  console.error("Failed to initialize runtime store", error);
1587
1606
  } finally {
1588
- initPromise$1 = null;
1607
+ initPromise$2 = null;
1589
1608
  }
1590
1609
  })();
1591
- return initPromise$1;
1610
+ return initPromise$2;
1592
1611
  }
1593
1612
  function useRuntime() {
1594
- void init$2();
1613
+ void init$3();
1595
1614
  return {
1596
1615
  runtimeState,
1597
1616
  pause: () => window.vessel.ai.pause(),
@@ -1712,7 +1731,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
1712
1731
  }
1713
1732
  return "idle";
1714
1733
  }
1715
- var _tmpl$$d = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$b = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$9 = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list><button class=tab-new data-tooltip="New Tab">+`), _tmpl$4$9 = /* @__PURE__ */ template(`<div role=tab><span class=tab-title></span><button class=tab-close>×`), _tmpl$5$7 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$6$7 = /* @__PURE__ */ template(`<span class=tab-loading>`);
1734
+ var _tmpl$$g = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$e = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$b = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list><button class=tab-new data-tooltip="New Tab">+`), _tmpl$4$b = /* @__PURE__ */ template(`<div role=tab><span class=tab-title></span><button class=tab-close>×`), _tmpl$5$a = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$6$9 = /* @__PURE__ */ template(`<span class=tab-loading>`);
1716
1735
  const TAB_CLOSE_MS = 200;
1717
1736
  function stringToHue(str) {
1718
1737
  let hash = 0;
@@ -1739,14 +1758,14 @@ const TabFavicon = (props) => {
1739
1758
  },
1740
1759
  get fallback() {
1741
1760
  return (() => {
1742
- var _el$2 = _tmpl$2$b();
1761
+ var _el$2 = _tmpl$2$e();
1743
1762
  insert(_el$2, letter);
1744
1763
  createRenderEffect((_$p) => setStyleProperty(_el$2, "--favicon-hue", `${hue()}`));
1745
1764
  return _el$2;
1746
1765
  })();
1747
1766
  },
1748
1767
  get children() {
1749
- var _el$ = _tmpl$$d();
1768
+ var _el$ = _tmpl$$g();
1750
1769
  _el$.addEventListener("error", () => setFailed(true));
1751
1770
  createRenderEffect(() => setAttribute(_el$, "src", props.favicon));
1752
1771
  return _el$;
@@ -1779,13 +1798,13 @@ const TabBar = () => {
1779
1798
  }, TAB_CLOSE_MS);
1780
1799
  };
1781
1800
  return (() => {
1782
- var _el$3 = _tmpl$3$9(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
1801
+ var _el$3 = _tmpl$3$b(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
1783
1802
  insert(_el$4, createComponent(For, {
1784
1803
  get each() {
1785
1804
  return tabs2();
1786
1805
  },
1787
1806
  children: (tab) => (() => {
1788
- var _el$6 = _tmpl$4$9(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
1807
+ var _el$6 = _tmpl$4$b(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
1789
1808
  _el$6.addEventListener("auxclick", (e) => {
1790
1809
  if (e.button === 1) handleClose(tab.id);
1791
1810
  });
@@ -1803,12 +1822,12 @@ const TabBar = () => {
1803
1822
  }), _el$7);
1804
1823
  insert(_el$6, (() => {
1805
1824
  var _c$ = memo(() => !!modelActiveTabIds().has(tab.id));
1806
- return () => _c$() && _tmpl$5$7();
1825
+ return () => _c$() && _tmpl$5$a();
1807
1826
  })(), _el$7);
1808
1827
  insert(_el$7, () => tab.title || "New Tab");
1809
1828
  insert(_el$6, (() => {
1810
1829
  var _c$2 = memo(() => !!tab.isLoading);
1811
- return () => _c$2() && _tmpl$6$7();
1830
+ return () => _c$2() && _tmpl$6$9();
1812
1831
  })(), _el$8);
1813
1832
  _el$8.$$click = (e) => {
1814
1833
  e.stopPropagation();
@@ -1850,29 +1869,8 @@ const [focusMode, setFocusMode] = createSignal(false);
1850
1869
  const [commandBarOpen, setCommandBarOpen] = createSignal(false);
1851
1870
  const [settingsOpen, setSettingsOpen] = createSignal(false);
1852
1871
  const [devtoolsPanelOpen, setDevtoolsPanelOpen] = createSignal(false);
1853
- let pendingWidth = null;
1854
- let resizeInFlight = null;
1855
- async function flushResize() {
1856
- if (resizeInFlight) {
1857
- await resizeInFlight;
1858
- if (pendingWidth !== null) {
1859
- return flushResize();
1860
- }
1861
- return;
1862
- }
1863
- resizeInFlight = (async () => {
1864
- while (pendingWidth !== null) {
1865
- const nextWidth = pendingWidth;
1866
- pendingWidth = null;
1867
- await window.vessel.ui.resizeSidebar(nextWidth);
1868
- }
1869
- })();
1870
- try {
1871
- await resizeInFlight;
1872
- } finally {
1873
- resizeInFlight = null;
1874
- }
1875
- }
1872
+ let lastIpcTime = 0;
1873
+ const IPC_THROTTLE_MS = 8;
1876
1874
  function useUI() {
1877
1875
  return {
1878
1876
  sidebarOpen,
@@ -1892,12 +1890,13 @@ function useUI() {
1892
1890
  Math.min(MAX_SIDEBAR, Math.round(width))
1893
1891
  );
1894
1892
  setSidebarWidth(clamped);
1895
- pendingWidth = clamped;
1896
- void flushResize();
1893
+ const now2 = performance.now();
1894
+ if (now2 - lastIpcTime >= IPC_THROTTLE_MS) {
1895
+ lastIpcTime = now2;
1896
+ void window.vessel.ui.resizeSidebar(clamped);
1897
+ }
1897
1898
  },
1898
1899
  commitResize: async () => {
1899
- pendingWidth = sidebarWidth();
1900
- await flushResize();
1901
1900
  await window.vessel.ui.commitSidebarResize();
1902
1901
  },
1903
1902
  toggleFocusMode: async () => {
@@ -2034,14 +2033,16 @@ function buildPageSnapshotKey(rawUrl) {
2034
2033
  function matchesPageSnapshotUrl(left, right) {
2035
2034
  return buildPageSnapshotKey(left) === buildPageSnapshotKey(right);
2036
2035
  }
2037
- var _tmpl$$c = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Page content has changed since your last visit"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>Changed`), _tmpl$2$a = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$3$8 = /* @__PURE__ */ template(`<div class=page-diff-burst-history><div class=page-diff-burst-history-label>Changed recently`), _tmpl$4$8 = /* @__PURE__ */ template(`<div class=page-diff-popup><div class=page-diff-popup-header><div class=page-diff-popup-header-copy><span>What changed since </span></div><button class=page-diff-popup-close>&times;`), _tmpl$5$6 = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$6$6 = /* @__PURE__ */ template(`<div class=address-bar><div class=nav-controls><button class=nav-btn data-tooltip=Back><svg width=14 height=14 viewBox="0 0 14 14"><path d="M9 2L4 7l5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Forward><svg width=14 height=14 viewBox="0 0 14 14"><path d="M5 2l5 5-5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Reload><svg width=14 height=14 viewBox="0 0 14 14"><path d="M2.5 7a4.5 4.5 0 1 1 1 3"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M2 4v3.5h3.5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button></div><div class=url-shell><form class=url-form><input class=url-input type=text placeholder="Search or enter URL"></form><div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text></span></div></div><div class=toolbar-actions><button class=nav-btn data-tooltip="Reader Mode"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=2 y=1 width=10 height=12 rx=1 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=4 y1=4 x2=10 y2=4 stroke=currentColor stroke-width=1></line><line x1=4 y1=6.5 x2=10 y2=6.5 stroke=currentColor stroke-width=1></line><line x1=4 y1=9 x2=8 y2=9 stroke=currentColor stroke-width=1></line></svg></button><button class=nav-btn data-tooltip="Dev Tools"><svg width=14 height=14 viewBox="0 0 14 14"><polyline points="3,5 1,7 3,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><polyline points="11,5 13,7 11,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><line x1=8.5 y1=2 x2=5.5 y2=12 stroke=currentColor stroke-width=1.2 stroke-linecap=round></line></svg></button><button class="nav-btn nav-btn-sidebar"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=1 y=1 width=12 height=12 rx=1.5 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=9 y1=1 x2=9 y2=13 stroke=currentColor stroke-width=1.2></line></svg></button><button class=nav-btn data-tooltip=Settings><svg width=14 height=14 viewBox="0 0 14 14"><circle cx=7 cy=7 r=2 fill=none stroke=currentColor stroke-width=1.2></circle><path d="M7 1v2M7 11v2M1 7h2M11 7h2M2.8 2.8l1.4 1.4M9.8 9.8l1.4 1.4M11.2 2.8l-1.4 1.4M4.2 9.8l-1.4 1.4"stroke=currentColor stroke-width=1 stroke-linecap=round>`), _tmpl$7$4 = /* @__PURE__ */ template(`<div class=page-diff-burst-row><span class=page-diff-burst-time></span><span class=page-diff-burst-summary>`), _tmpl$8$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>Before</span><span class=page-diff-snippet-text>`), _tmpl$9$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>After</span><span class=page-diff-snippet-text>`), _tmpl$0$4 = /* @__PURE__ */ template(`<div class=page-diff-snippets>`), _tmpl$1$4 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Added</span><ul class=page-diff-list>`), _tmpl$10$4 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Removed</span><ul class=page-diff-list>`), _tmpl$11$4 = /* @__PURE__ */ template(`<div><div class=page-diff-item-header><span class=page-diff-section></span><span class=page-diff-summary>`), _tmpl$12$4 = /* @__PURE__ */ template(`<li>`);
2036
+ var _tmpl$$f = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Page content has changed since your last visit"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>Changed`), _tmpl$2$d = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$3$a = /* @__PURE__ */ template(`<div class=page-diff-burst-history><div class=page-diff-burst-history-label>Changed recently`), _tmpl$4$a = /* @__PURE__ */ template(`<div class=page-diff-popup><div class=page-diff-popup-header><div class=page-diff-popup-header-copy><span>What changed since </span></div><button class=page-diff-popup-close>&times;`), _tmpl$5$9 = /* @__PURE__ */ template(`<svg><path d="M3 3 L11 3 L11 9 Q7 13 3 9 Z"fill=none stroke=currentColor stroke-width=1.2 stroke-linejoin=round></svg>`, false, true, false), _tmpl$6$8 = /* @__PURE__ */ template(`<svg><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.4 stroke-linecap=round></svg>`, false, true, false), _tmpl$7$6 = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$8$4 = /* @__PURE__ */ template(`<div class=address-bar><div class=nav-controls><button class=nav-btn data-tooltip=Back><svg width=14 height=14 viewBox="0 0 14 14"><path d="M9 2L4 7l5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Forward><svg width=14 height=14 viewBox="0 0 14 14"><path d="M5 2l5 5-5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Reload><svg width=14 height=14 viewBox="0 0 14 14"><path d="M2.5 7a4.5 4.5 0 1 1 1 3"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M2 4v3.5h3.5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button></div><div class=url-shell><form class=url-form><input class=url-input type=text placeholder="Search or enter URL"></form><div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text></span></div></div><div class=toolbar-actions><button class=nav-btn><svg width=14 height=14 viewBox="0 0 14 14"></svg></button><button class=nav-btn data-tooltip="Reader Mode"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=2 y=1 width=10 height=12 rx=1 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=4 y1=4 x2=10 y2=4 stroke=currentColor stroke-width=1></line><line x1=4 y1=6.5 x2=10 y2=6.5 stroke=currentColor stroke-width=1></line><line x1=4 y1=9 x2=8 y2=9 stroke=currentColor stroke-width=1></line></svg></button><button class=nav-btn data-tooltip="Dev Tools"><svg width=14 height=14 viewBox="0 0 14 14"><polyline points="3,5 1,7 3,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><polyline points="11,5 13,7 11,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><line x1=8.5 y1=2 x2=5.5 y2=12 stroke=currentColor stroke-width=1.2 stroke-linecap=round></line></svg></button><button class="nav-btn nav-btn-sidebar"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=1 y=1 width=12 height=12 rx=1.5 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=9 y1=1 x2=9 y2=13 stroke=currentColor stroke-width=1.2></line></svg></button><button class=nav-btn data-tooltip=Settings><svg width=14 height=14 viewBox="0 0 14 14"><circle cx=7 cy=7 r=2 fill=none stroke=currentColor stroke-width=1.2></circle><path d="M7 1v2M7 11v2M1 7h2M11 7h2M2.8 2.8l1.4 1.4M9.8 9.8l1.4 1.4M11.2 2.8l-1.4 1.4M4.2 9.8l-1.4 1.4"stroke=currentColor stroke-width=1 stroke-linecap=round>`), _tmpl$9$4 = /* @__PURE__ */ template(`<div class=page-diff-burst-row><span class=page-diff-burst-time></span><span class=page-diff-burst-summary>`), _tmpl$0$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>Before</span><span class=page-diff-snippet-text>`), _tmpl$1$4 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>After</span><span class=page-diff-snippet-text>`), _tmpl$10$4 = /* @__PURE__ */ template(`<div class=page-diff-snippets>`), _tmpl$11$4 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Added</span><ul class=page-diff-list>`), _tmpl$12$4 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Removed</span><ul class=page-diff-list>`), _tmpl$13$3 = /* @__PURE__ */ template(`<div><div class=page-diff-item-header><span class=page-diff-section></span><span class=page-diff-summary>`), _tmpl$14$3 = /* @__PURE__ */ template(`<li>`);
2038
2037
  const AddressBar = () => {
2039
2038
  const {
2040
2039
  activeTab,
2040
+ activeTabId: activeTabId2,
2041
2041
  navigate,
2042
2042
  goBack,
2043
2043
  goForward,
2044
- reload
2044
+ reload,
2045
+ toggleAdBlock
2045
2046
  } = useTabs();
2046
2047
  const {
2047
2048
  runtimeState: runtimeState2
@@ -2146,9 +2147,9 @@ const AddressBar = () => {
2146
2147
  };
2147
2148
  const formatSectionLabel = (section) => section === "title" ? "Title" : section === "headings" ? "Headings" : "Content";
2148
2149
  return (() => {
2149
- var _el$ = _tmpl$6$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$24 = _el$6.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.nextSibling;
2150
- _el$27.firstChild;
2151
- var _el$30 = _el$27.nextSibling;
2150
+ var _el$ = _tmpl$8$4(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$24 = _el$6.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$30 = _el$25.nextSibling, _el$31 = _el$30.nextSibling, _el$32 = _el$31.nextSibling;
2151
+ _el$32.firstChild;
2152
+ var _el$35 = _el$32.nextSibling;
2152
2153
  addEventListener(_el$3, "click", goBack, true);
2153
2154
  addEventListener(_el$4, "click", goForward, true);
2154
2155
  addEventListener(_el$5, "click", reload, true);
@@ -2164,7 +2165,7 @@ const AddressBar = () => {
2164
2165
  return pageDiff();
2165
2166
  },
2166
2167
  get children() {
2167
- var _el$10 = _tmpl$$c();
2168
+ var _el$10 = _tmpl$$f();
2168
2169
  _el$10.$$click = () => setDiffExpanded(!diffExpanded());
2169
2170
  return _el$10;
2170
2171
  }
@@ -2174,7 +2175,7 @@ const AddressBar = () => {
2174
2175
  return memo(() => !!pageDiff())() && diffExpanded();
2175
2176
  },
2176
2177
  get children() {
2177
- var _el$11 = _tmpl$4$8(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild;
2178
+ var _el$11 = _tmpl$4$a(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild;
2178
2179
  _el$14.firstChild;
2179
2180
  var _el$21 = _el$13.nextSibling;
2180
2181
  insert(_el$14, () => formatRelativeTime(pageDiff().oldSnapshot.capturedAt), null);
@@ -2183,7 +2184,7 @@ const AddressBar = () => {
2183
2184
  return memo(() => !!((pageDiff().burstCount || 0) > 1 && pageDiff().firstDetectedAt))() && pageDiff().lastDetectedAt;
2184
2185
  },
2185
2186
  get children() {
2186
- var _el$16 = _tmpl$2$a(), _el$17 = _el$16.firstChild, _el$20 = _el$17.nextSibling;
2187
+ var _el$16 = _tmpl$2$d(), _el$17 = _el$16.firstChild, _el$20 = _el$17.nextSibling;
2187
2188
  _el$20.nextSibling;
2188
2189
  insert(_el$16, () => pageDiff().burstCount, _el$20);
2189
2190
  insert(_el$16, () => formatElapsed(pageDiff().firstDetectedAt, pageDiff().lastDetectedAt), null);
@@ -2196,17 +2197,17 @@ const AddressBar = () => {
2196
2197
  return memo(() => !!pageDiff().recentBursts?.length)() && (pageDiff().recentBursts?.length || 0) > 1;
2197
2198
  },
2198
2199
  get children() {
2199
- var _el$22 = _tmpl$3$8();
2200
+ var _el$22 = _tmpl$3$a();
2200
2201
  _el$22.firstChild;
2201
2202
  insert(_el$22, createComponent(For, {
2202
2203
  get each() {
2203
2204
  return pageDiff().recentBursts;
2204
2205
  },
2205
2206
  children: (burst) => (() => {
2206
- var _el$31 = _tmpl$7$4(), _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling;
2207
- insert(_el$32, () => formatRelativeTime(burst.detectedAt));
2208
- insert(_el$33, () => burst.summary);
2209
- return _el$31;
2207
+ var _el$36 = _tmpl$9$4(), _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
2208
+ insert(_el$37, () => formatRelativeTime(burst.detectedAt));
2209
+ insert(_el$38, () => burst.summary);
2210
+ return _el$36;
2210
2211
  })()
2211
2212
  }), null);
2212
2213
  return _el$22;
@@ -2217,108 +2218,132 @@ const AddressBar = () => {
2217
2218
  return pageDiff().changes;
2218
2219
  },
2219
2220
  children: (change) => (() => {
2220
- var _el$34 = _tmpl$11$4(), _el$35 = _el$34.firstChild, _el$36 = _el$35.firstChild, _el$37 = _el$36.nextSibling;
2221
- insert(_el$36, () => formatSectionLabel(change.section));
2222
- insert(_el$37, () => change.summary);
2223
- insert(_el$34, createComponent(Show, {
2221
+ var _el$39 = _tmpl$13$3(), _el$40 = _el$39.firstChild, _el$41 = _el$40.firstChild, _el$42 = _el$41.nextSibling;
2222
+ insert(_el$41, () => formatSectionLabel(change.section));
2223
+ insert(_el$42, () => change.summary);
2224
+ insert(_el$39, createComponent(Show, {
2224
2225
  get when() {
2225
2226
  return change.before || change.after;
2226
2227
  },
2227
2228
  get children() {
2228
- var _el$38 = _tmpl$0$4();
2229
- insert(_el$38, createComponent(Show, {
2229
+ var _el$43 = _tmpl$10$4();
2230
+ insert(_el$43, createComponent(Show, {
2230
2231
  get when() {
2231
2232
  return change.before;
2232
2233
  },
2233
2234
  get children() {
2234
- var _el$39 = _tmpl$8$4(), _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
2235
- insert(_el$41, () => change.before);
2236
- return _el$39;
2235
+ var _el$44 = _tmpl$0$4(), _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
2236
+ insert(_el$46, () => change.before);
2237
+ return _el$44;
2237
2238
  }
2238
2239
  }), null);
2239
- insert(_el$38, createComponent(Show, {
2240
+ insert(_el$43, createComponent(Show, {
2240
2241
  get when() {
2241
2242
  return change.after;
2242
2243
  },
2243
2244
  get children() {
2244
- var _el$42 = _tmpl$9$4(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling;
2245
- insert(_el$44, () => change.after);
2246
- return _el$42;
2245
+ var _el$47 = _tmpl$1$4(), _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
2246
+ insert(_el$49, () => change.after);
2247
+ return _el$47;
2247
2248
  }
2248
2249
  }), null);
2249
- return _el$38;
2250
+ return _el$43;
2250
2251
  }
2251
2252
  }), null);
2252
- insert(_el$34, createComponent(Show, {
2253
+ insert(_el$39, createComponent(Show, {
2253
2254
  get when() {
2254
2255
  return change.addedItems?.length;
2255
2256
  },
2256
2257
  get children() {
2257
- var _el$45 = _tmpl$1$4(), _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling;
2258
- insert(_el$47, createComponent(For, {
2258
+ var _el$50 = _tmpl$11$4(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling;
2259
+ insert(_el$52, createComponent(For, {
2259
2260
  get each() {
2260
2261
  return change.addedItems;
2261
2262
  },
2262
2263
  children: (item) => (() => {
2263
- var _el$51 = _tmpl$12$4();
2264
- insert(_el$51, item);
2265
- return _el$51;
2264
+ var _el$56 = _tmpl$14$3();
2265
+ insert(_el$56, item);
2266
+ return _el$56;
2266
2267
  })()
2267
2268
  }));
2268
- return _el$45;
2269
+ return _el$50;
2269
2270
  }
2270
2271
  }), null);
2271
- insert(_el$34, createComponent(Show, {
2272
+ insert(_el$39, createComponent(Show, {
2272
2273
  get when() {
2273
2274
  return change.removedItems?.length;
2274
2275
  },
2275
2276
  get children() {
2276
- var _el$48 = _tmpl$10$4(), _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
2277
- insert(_el$50, createComponent(For, {
2277
+ var _el$53 = _tmpl$12$4(), _el$54 = _el$53.firstChild, _el$55 = _el$54.nextSibling;
2278
+ insert(_el$55, createComponent(For, {
2278
2279
  get each() {
2279
2280
  return change.removedItems;
2280
2281
  },
2281
2282
  children: (item) => (() => {
2282
- var _el$52 = _tmpl$12$4();
2283
- insert(_el$52, item);
2284
- return _el$52;
2283
+ var _el$57 = _tmpl$14$3();
2284
+ insert(_el$57, item);
2285
+ return _el$57;
2285
2286
  })()
2286
2287
  }));
2287
- return _el$48;
2288
+ return _el$53;
2288
2289
  }
2289
2290
  }), null);
2290
- createRenderEffect(() => className(_el$34, `page-diff-item page-diff-${change.kind}`));
2291
- return _el$34;
2291
+ createRenderEffect(() => className(_el$39, `page-diff-item page-diff-${change.kind}`));
2292
+ return _el$39;
2292
2293
  })()
2293
2294
  }), null);
2294
2295
  return _el$11;
2295
2296
  }
2296
2297
  }), _el$24);
2297
- _el$25.$$click = () => window.vessel.content.toggleReader();
2298
- addEventListener(_el$26, "click", toggleDevTools, true);
2299
- addEventListener(_el$27, "click", toggleSidebar, true);
2300
- insert(_el$27, createComponent(Show, {
2298
+ _el$25.$$click = async () => {
2299
+ const id = activeTabId2();
2300
+ if (!id) return;
2301
+ await toggleAdBlock(id);
2302
+ };
2303
+ insert(_el$26, createComponent(Show, {
2304
+ get when() {
2305
+ return activeTab()?.adBlockingEnabled;
2306
+ },
2307
+ get children() {
2308
+ return _tmpl$5$9();
2309
+ }
2310
+ }), null);
2311
+ insert(_el$26, createComponent(Show, {
2312
+ get when() {
2313
+ return !activeTab()?.adBlockingEnabled;
2314
+ },
2315
+ get children() {
2316
+ return [_tmpl$5$9(), _tmpl$6$8()];
2317
+ }
2318
+ }), null);
2319
+ _el$30.$$click = () => window.vessel.content.toggleReader();
2320
+ addEventListener(_el$31, "click", toggleDevTools, true);
2321
+ addEventListener(_el$32, "click", toggleSidebar, true);
2322
+ insert(_el$32, createComponent(Show, {
2301
2323
  get when() {
2302
2324
  return pendingApprovalCount() > 0;
2303
2325
  },
2304
2326
  get children() {
2305
- var _el$29 = _tmpl$5$6();
2306
- insert(_el$29, pendingApprovalCount);
2307
- createRenderEffect(() => setAttribute(_el$29, "aria-label", `${pendingApprovalCount()} pending`));
2308
- return _el$29;
2327
+ var _el$34 = _tmpl$7$6();
2328
+ insert(_el$34, pendingApprovalCount);
2329
+ createRenderEffect(() => setAttribute(_el$34, "aria-label", `${pendingApprovalCount()} pending`));
2330
+ return _el$34;
2309
2331
  }
2310
2332
  }), null);
2311
- addEventListener(_el$30, "click", openSettings, true);
2333
+ addEventListener(_el$35, "click", openSettings, true);
2312
2334
  createRenderEffect((_p$) => {
2313
- var _v$ = !activeTab()?.canGoBack, _v$2 = !activeTab()?.canGoForward, _v$3 = `agent-status-badge ${agentPresence()}`, _v$4 = agentStatusMessage() || (agentPresence() === "active" ? "Agent is actively using the browser" : agentPresence() === "recent" ? "Agent is connected" : "No agent connection detected"), _v$5 = !!activeTab()?.isReaderMode, _v$6 = !!devtoolsPanelOpen2(), _v$7 = !!(pendingApprovalCount() > 0), _v$8 = pendingApprovalCount() > 0 ? `AI Sidebar — ${pendingApprovalCount()} pending approval${pendingApprovalCount() > 1 ? "s" : ""}` : "AI Sidebar (Ctrl+Shift+L)";
2335
+ var _v$ = !activeTab()?.canGoBack, _v$2 = !activeTab()?.canGoForward, _v$3 = `agent-status-badge ${agentPresence()}`, _v$4 = agentStatusMessage() || (agentPresence() === "active" ? "Agent is actively using the browser" : agentPresence() === "recent" ? "Agent is connected" : "No agent connection detected"), _v$5 = !!activeTab()?.adBlockingEnabled, _v$6 = !activeTab()?.adBlockingEnabled, _v$7 = activeTab()?.adBlockingEnabled ? "Ad Block: On (click to disable)" : "Ad Block: Off (click to enable)", _v$8 = !!activeTab()?.isReaderMode, _v$9 = !!devtoolsPanelOpen2(), _v$0 = !!(pendingApprovalCount() > 0), _v$1 = pendingApprovalCount() > 0 ? `AI Sidebar — ${pendingApprovalCount()} pending approval${pendingApprovalCount() > 1 ? "s" : ""}` : "AI Sidebar (Ctrl+Shift+L)";
2314
2336
  _v$ !== _p$.e && (_el$3.disabled = _p$.e = _v$);
2315
2337
  _v$2 !== _p$.t && (_el$4.disabled = _p$.t = _v$2);
2316
2338
  _v$3 !== _p$.a && className(_el$9, _p$.a = _v$3);
2317
2339
  _v$4 !== _p$.o && setAttribute(_el$9, "title", _p$.o = _v$4);
2318
2340
  _v$5 !== _p$.i && _el$25.classList.toggle("active", _p$.i = _v$5);
2319
- _v$6 !== _p$.n && _el$26.classList.toggle("active", _p$.n = _v$6);
2320
- _v$7 !== _p$.s && _el$27.classList.toggle("has-approvals", _p$.s = _v$7);
2321
- _v$8 !== _p$.h && setAttribute(_el$27, "title", _p$.h = _v$8);
2341
+ _v$6 !== _p$.n && _el$25.classList.toggle("nav-btn-muted", _p$.n = _v$6);
2342
+ _v$7 !== _p$.s && setAttribute(_el$25, "title", _p$.s = _v$7);
2343
+ _v$8 !== _p$.h && _el$30.classList.toggle("active", _p$.h = _v$8);
2344
+ _v$9 !== _p$.r && _el$31.classList.toggle("active", _p$.r = _v$9);
2345
+ _v$0 !== _p$.d && _el$32.classList.toggle("has-approvals", _p$.d = _v$0);
2346
+ _v$1 !== _p$.l && setAttribute(_el$32, "title", _p$.l = _v$1);
2322
2347
  return _p$;
2323
2348
  }, {
2324
2349
  e: void 0,
@@ -2328,16 +2353,19 @@ const AddressBar = () => {
2328
2353
  i: void 0,
2329
2354
  n: void 0,
2330
2355
  s: void 0,
2331
- h: void 0
2356
+ h: void 0,
2357
+ r: void 0,
2358
+ d: void 0,
2359
+ l: void 0
2332
2360
  });
2333
2361
  createRenderEffect(() => _el$8.value = inputValue());
2334
2362
  return _el$;
2335
2363
  })();
2336
2364
  };
2337
2365
  delegateEvents(["click", "input"]);
2338
- var _tmpl$$b = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite aria-atomic=true>`), _tmpl$2$9 = /* @__PURE__ */ template(`<div class=bookmark-toast role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
2366
+ var _tmpl$$e = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite aria-atomic=true>`), _tmpl$2$c = /* @__PURE__ */ template(`<div class=bookmark-toast role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
2339
2367
  const TOAST_DURATION_MS$1 = 4200;
2340
- const TOAST_EXIT_MS$1 = 300;
2368
+ const TOAST_EXIT_MS$2 = 300;
2341
2369
  function isBookmarkToastCandidate(action) {
2342
2370
  return (action.source === "ai" || action.source === "mcp") && action.status === "completed" && (action.name === "create_bookmark_folder" || action.name === "save_bookmark");
2343
2371
  }
@@ -2361,7 +2389,7 @@ const BookmarkNotifications = () => {
2361
2389
  } : t));
2362
2390
  window.setTimeout(() => {
2363
2391
  setToasts((current) => current.filter((t) => t.id !== toastId));
2364
- }, TOAST_EXIT_MS$1);
2392
+ }, TOAST_EXIT_MS$2);
2365
2393
  };
2366
2394
  createEffect(() => {
2367
2395
  const actions = runtimeState2().actions;
@@ -2395,13 +2423,13 @@ const BookmarkNotifications = () => {
2395
2423
  timeoutIds.clear();
2396
2424
  });
2397
2425
  return (() => {
2398
- var _el$ = _tmpl$$b();
2426
+ var _el$ = _tmpl$$e();
2399
2427
  insert(_el$, createComponent(For, {
2400
2428
  get each() {
2401
2429
  return toasts();
2402
2430
  },
2403
2431
  children: (toast) => (() => {
2404
- var _el$2 = _tmpl$2$9(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2432
+ var _el$2 = _tmpl$2$c(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2405
2433
  insert(_el$3, () => toast.title);
2406
2434
  insert(_el$4, () => toast.message);
2407
2435
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!toast.leaving));
@@ -2411,9 +2439,9 @@ const BookmarkNotifications = () => {
2411
2439
  return _el$;
2412
2440
  })();
2413
2441
  };
2414
- var _tmpl$$a = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite><div class="bookmark-toast highlight-toast"role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
2442
+ var _tmpl$$d = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite><div class="bookmark-toast highlight-toast"role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
2415
2443
  const TOAST_DURATION_MS = 3e3;
2416
- const TOAST_EXIT_MS = 300;
2444
+ const TOAST_EXIT_MS$1 = 300;
2417
2445
  const HighlightNotifications = (props) => {
2418
2446
  const [visible, setVisible] = createSignal(false);
2419
2447
  const [leaving, setLeaving] = createSignal(false);
@@ -2428,7 +2456,7 @@ const HighlightNotifications = (props) => {
2428
2456
  setLeaving(false);
2429
2457
  setCurrent(null);
2430
2458
  props.onDismiss();
2431
- }, TOAST_EXIT_MS);
2459
+ }, TOAST_EXIT_MS$1);
2432
2460
  };
2433
2461
  createEffect(() => {
2434
2462
  const toast = props.toast;
@@ -2450,7 +2478,7 @@ const HighlightNotifications = (props) => {
2450
2478
  return memo(() => !!visible())() && current();
2451
2479
  },
2452
2480
  get children() {
2453
- var _el$ = _tmpl$$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2481
+ var _el$ = _tmpl$$d(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2454
2482
  insert(_el$3, () => current().title);
2455
2483
  insert(_el$4, () => current().message);
2456
2484
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!leaving()));
@@ -2458,6 +2486,371 @@ const HighlightNotifications = (props) => {
2458
2486
  }
2459
2487
  });
2460
2488
  };
2489
+ var _tmpl$$c = /* @__PURE__ */ template(`<div class=download-toast-stack aria-live=polite>`), _tmpl$2$b = /* @__PURE__ */ template(`<span class=download-toast-done>&#10003;`), _tmpl$3$9 = /* @__PURE__ */ template(`<span class=download-toast-failed>!`), _tmpl$4$9 = /* @__PURE__ */ template(`<div class=download-toast-bar-track><div class=download-toast-bar-fill>`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=download-toast-size>`), _tmpl$6$7 = /* @__PURE__ */ template(`<div class="download-toast-size download-toast-size-done"> downloaded`), _tmpl$7$5 = /* @__PURE__ */ template(`<div class=download-toast role=status><div class=download-toast-header><span class=download-toast-filename>`);
2490
+ const TOAST_DONE_DURATION_MS = 4200;
2491
+ const TOAST_EXIT_MS = 300;
2492
+ function formatBytes(bytes) {
2493
+ if (bytes <= 0) return "";
2494
+ const units = ["B", "KB", "MB", "GB"];
2495
+ let i = 0;
2496
+ let val = bytes;
2497
+ while (val >= 1024 && i < units.length - 1) {
2498
+ val /= 1024;
2499
+ i++;
2500
+ }
2501
+ return `${val.toFixed(i === 0 ? 0 : 1)} ${units[i]}`;
2502
+ }
2503
+ const DownloadToast = () => {
2504
+ const [downloads, setDownloads] = createSignal([]);
2505
+ const downloadMap = /* @__PURE__ */ new Map();
2506
+ const timeoutIds = /* @__PURE__ */ new Map();
2507
+ let idCounter = 0;
2508
+ const scheduleRemoval = (id) => {
2509
+ const timeoutId = window.setTimeout(() => dismissDownload(id), TOAST_EXIT_MS);
2510
+ timeoutIds.set(id, timeoutId);
2511
+ setDownloads((current) => current.map((d) => d.id === id ? {
2512
+ ...d,
2513
+ leaving: true
2514
+ } : d));
2515
+ };
2516
+ const dismissDownload = (id) => {
2517
+ setDownloads((current) => {
2518
+ const item = current.find((d) => d.id === id);
2519
+ if (item) downloadMap.delete(item.savePath);
2520
+ return current.filter((d) => d.id !== id);
2521
+ });
2522
+ };
2523
+ const scheduleDoneRemoval = (id) => {
2524
+ const tid = window.setTimeout(() => scheduleRemoval(id), TOAST_DONE_DURATION_MS);
2525
+ timeoutIds.set(id, tid);
2526
+ };
2527
+ onMount(() => {
2528
+ const cleanupStarted = window.vessel.downloads.onStarted((info) => {
2529
+ const id = `dl-${++idCounter}`;
2530
+ const item = {
2531
+ id,
2532
+ savePath: info.savePath,
2533
+ filename: info.filename,
2534
+ totalBytes: info.totalBytes,
2535
+ receivedBytes: info.receivedBytes,
2536
+ state: "progressing",
2537
+ leaving: false
2538
+ };
2539
+ downloadMap.set(info.savePath, item);
2540
+ setDownloads((current) => [...current.slice(-4), item]);
2541
+ });
2542
+ const cleanupProgress = window.vessel.downloads.onProgress((info) => {
2543
+ const item = downloadMap.get(info.savePath);
2544
+ if (!item) return;
2545
+ item.receivedBytes = info.receivedBytes;
2546
+ item.totalBytes = info.totalBytes;
2547
+ setDownloads((current) => current.map((d) => d.id === item.id ? {
2548
+ ...d,
2549
+ receivedBytes: info.receivedBytes,
2550
+ totalBytes: info.totalBytes
2551
+ } : d));
2552
+ });
2553
+ const cleanupDone = window.vessel.downloads.onDone((info) => {
2554
+ const item = downloadMap.get(info.savePath);
2555
+ if (!item) return;
2556
+ const finalState = info.state === "completed" ? "completed" : info.state === "cancelled" ? "cancelled" : "interrupted";
2557
+ item.state = finalState;
2558
+ setDownloads((current) => current.map((d) => d.id === item.id ? {
2559
+ ...d,
2560
+ state: finalState,
2561
+ receivedBytes: info.receivedBytes
2562
+ } : d));
2563
+ scheduleDoneRemoval(item.id);
2564
+ });
2565
+ onCleanup(() => {
2566
+ cleanupStarted();
2567
+ cleanupProgress();
2568
+ cleanupDone();
2569
+ for (const tid of timeoutIds.values()) {
2570
+ window.clearTimeout(tid);
2571
+ }
2572
+ timeoutIds.clear();
2573
+ });
2574
+ });
2575
+ const progressPercent = (d) => {
2576
+ if (d.totalBytes <= 0) return 0;
2577
+ return Math.min(100, Math.round(d.receivedBytes / d.totalBytes * 100));
2578
+ };
2579
+ return (() => {
2580
+ var _el$ = _tmpl$$c();
2581
+ insert(_el$, createComponent(For, {
2582
+ get each() {
2583
+ return downloads();
2584
+ },
2585
+ children: (dl) => (() => {
2586
+ var _el$2 = _tmpl$7$5(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
2587
+ insert(_el$4, () => dl.filename);
2588
+ insert(_el$3, createComponent(Show, {
2589
+ get when() {
2590
+ return dl.state === "completed";
2591
+ },
2592
+ get children() {
2593
+ return _tmpl$2$b();
2594
+ }
2595
+ }), null);
2596
+ insert(_el$3, createComponent(Show, {
2597
+ get when() {
2598
+ return dl.state === "cancelled" || dl.state === "interrupted";
2599
+ },
2600
+ get children() {
2601
+ return _tmpl$3$9();
2602
+ }
2603
+ }), null);
2604
+ insert(_el$2, createComponent(Show, {
2605
+ get when() {
2606
+ return dl.state === "progressing";
2607
+ },
2608
+ get children() {
2609
+ return [(() => {
2610
+ var _el$7 = _tmpl$4$9(), _el$8 = _el$7.firstChild;
2611
+ createRenderEffect((_$p) => setStyleProperty(_el$8, "width", `${progressPercent(dl)}%`));
2612
+ return _el$7;
2613
+ })(), (() => {
2614
+ var _el$9 = _tmpl$5$8();
2615
+ insert(_el$9, () => formatBytes(dl.receivedBytes), null);
2616
+ insert(_el$9, createComponent(Show, {
2617
+ get when() {
2618
+ return dl.totalBytes > 0;
2619
+ },
2620
+ get children() {
2621
+ return [" / ", memo(() => formatBytes(dl.totalBytes))];
2622
+ }
2623
+ }), null);
2624
+ return _el$9;
2625
+ })()];
2626
+ }
2627
+ }), null);
2628
+ insert(_el$2, createComponent(Show, {
2629
+ get when() {
2630
+ return dl.state === "completed";
2631
+ },
2632
+ get children() {
2633
+ var _el$0 = _tmpl$6$7(), _el$1 = _el$0.firstChild;
2634
+ insert(_el$0, () => formatBytes(dl.receivedBytes), _el$1);
2635
+ return _el$0;
2636
+ }
2637
+ }), null);
2638
+ createRenderEffect(() => _el$2.classList.toggle("download-toast-leaving", !!dl.leaving));
2639
+ return _el$2;
2640
+ })()
2641
+ }));
2642
+ return _el$;
2643
+ })();
2644
+ };
2645
+ var _tmpl$$b = /* @__PURE__ */ template(`<div class=find-bar><input class=find-bar-input type=text placeholder="Find in page..."><button class=find-bar-btn title="Previous (Shift+Enter)">&#9650;</button><button class=find-bar-btn title="Next (Enter)">&#9660;</button><button class="find-bar-btn find-bar-close"title="Close (Escape)">&times;`), _tmpl$2$a = /* @__PURE__ */ template(`<span class=find-bar-count>`);
2646
+ const FindBar = () => {
2647
+ const [open, setOpen] = createSignal(false);
2648
+ const [query, setQuery] = createSignal("");
2649
+ const [result, setResult] = createSignal(null);
2650
+ let inputRef;
2651
+ const startFind = (text2) => {
2652
+ if (!text2) {
2653
+ window.vessel.find.stop();
2654
+ setResult(null);
2655
+ return;
2656
+ }
2657
+ window.vessel.find.start(text2, {
2658
+ forward: true
2659
+ });
2660
+ };
2661
+ const findNext = (forward = true) => {
2662
+ const q = query();
2663
+ if (!q) return;
2664
+ window.vessel.find.next(forward);
2665
+ };
2666
+ const close = () => {
2667
+ setOpen(false);
2668
+ setQuery("");
2669
+ setResult(null);
2670
+ window.vessel.find.stop();
2671
+ };
2672
+ onMount(() => {
2673
+ const cleanupResult = window.vessel.find.onResult((r) => {
2674
+ if (r.finalUpdate) {
2675
+ setResult(r);
2676
+ }
2677
+ });
2678
+ const listener = (e) => {
2679
+ const ctrl = e.ctrlKey || e.metaKey;
2680
+ if (ctrl && e.key === "f") {
2681
+ e.preventDefault();
2682
+ if (!open()) {
2683
+ setOpen(true);
2684
+ setTimeout(() => inputRef?.focus(), 0);
2685
+ } else {
2686
+ inputRef?.focus();
2687
+ inputRef?.select();
2688
+ }
2689
+ return;
2690
+ }
2691
+ if (!open()) return;
2692
+ if (e.key === "Escape") {
2693
+ e.preventDefault();
2694
+ close();
2695
+ return;
2696
+ }
2697
+ if (e.key === "Enter") {
2698
+ e.preventDefault();
2699
+ findNext(!e.shiftKey);
2700
+ return;
2701
+ }
2702
+ };
2703
+ document.addEventListener("keydown", listener);
2704
+ onCleanup(() => {
2705
+ document.removeEventListener("keydown", listener);
2706
+ cleanupResult();
2707
+ });
2708
+ });
2709
+ createEffect(() => {
2710
+ if (open() && inputRef) {
2711
+ inputRef.focus();
2712
+ }
2713
+ });
2714
+ const handleInput = (value) => {
2715
+ setQuery(value);
2716
+ startFind(value);
2717
+ };
2718
+ return createComponent(Show, {
2719
+ get when() {
2720
+ return open();
2721
+ },
2722
+ get children() {
2723
+ var _el$ = _tmpl$$b(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
2724
+ _el$2.$$input = (e) => handleInput(e.currentTarget.value);
2725
+ var _ref$ = inputRef;
2726
+ typeof _ref$ === "function" ? use(_ref$, _el$2) : inputRef = _el$2;
2727
+ setAttribute(_el$2, "spellcheck", false);
2728
+ insert(_el$, createComponent(Show, {
2729
+ get when() {
2730
+ return result();
2731
+ },
2732
+ children: (r) => (() => {
2733
+ var _el$6 = _tmpl$2$a();
2734
+ insert(_el$6, (() => {
2735
+ var _c$ = memo(() => r().matches > 0);
2736
+ return () => _c$() ? `${r().activeMatchOrdinal} / ${r().matches}` : "No results";
2737
+ })());
2738
+ return _el$6;
2739
+ })()
2740
+ }), _el$3);
2741
+ _el$3.$$click = () => findNext(false);
2742
+ _el$4.$$click = () => findNext(true);
2743
+ _el$5.$$click = close;
2744
+ createRenderEffect(() => _el$2.value = query());
2745
+ return _el$;
2746
+ }
2747
+ });
2748
+ };
2749
+ delegateEvents(["input", "click"]);
2750
+ var _tmpl$$a = /* @__PURE__ */ template(`<div class=flow-progress>`), _tmpl$2$9 = /* @__PURE__ */ template(`<div class=flow-progress-hint>Last: `), _tmpl$3$8 = /* @__PURE__ */ template(`<div class=flow-progress-hint>Next: `), _tmpl$4$8 = /* @__PURE__ */ template(`<div class=flow-progress-section><div class=flow-progress-header><span class=flow-progress-goal></span><span class=flow-progress-pct>%</span></div><div class=flow-progress-bar-track><div class=flow-progress-bar-fill></div></div><div class=flow-steps>`), _tmpl$5$7 = /* @__PURE__ */ template(`<div><span class=flow-step-dot></span><span class=flow-step-label>`);
2751
+ const FlowProgress = () => {
2752
+ const {
2753
+ runtimeState: runtimeState2
2754
+ } = useRuntime();
2755
+ const flow = createMemo(() => runtimeState2().flowState);
2756
+ const tracker = createMemo(() => runtimeState2().taskTracker);
2757
+ const stepStatusClass = (status) => {
2758
+ switch (status) {
2759
+ case "done":
2760
+ return "flow-step-done";
2761
+ case "active":
2762
+ return "flow-step-active";
2763
+ case "failed":
2764
+ return "flow-step-failed";
2765
+ case "skipped":
2766
+ return "flow-step-skipped";
2767
+ default:
2768
+ return "flow-step-pending";
2769
+ }
2770
+ };
2771
+ const progressPercent = (steps) => {
2772
+ if (steps.length === 0) return 0;
2773
+ const done = steps.filter((s) => s.status === "done" || s.status === "skipped").length;
2774
+ return Math.round(done / steps.length * 100);
2775
+ };
2776
+ return createComponent(Show, {
2777
+ get when() {
2778
+ return flow() || tracker();
2779
+ },
2780
+ get children() {
2781
+ var _el$ = _tmpl$$a();
2782
+ insert(_el$, createComponent(Show, {
2783
+ get when() {
2784
+ return tracker();
2785
+ },
2786
+ children: (t) => (() => {
2787
+ var _el$2 = _tmpl$4$8(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling;
2788
+ insert(_el$4, () => t().goal);
2789
+ insert(_el$5, () => progressPercent(t().steps), _el$6);
2790
+ insert(_el$9, createComponent(For, {
2791
+ get each() {
2792
+ return t().steps;
2793
+ },
2794
+ children: (step) => (() => {
2795
+ var _el$12 = _tmpl$5$7(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
2796
+ insert(_el$14, () => step.label);
2797
+ createRenderEffect(() => className(_el$12, `flow-step ${stepStatusClass(step.status)}`));
2798
+ return _el$12;
2799
+ })()
2800
+ }));
2801
+ insert(_el$2, createComponent(Show, {
2802
+ get when() {
2803
+ return t().lastAction;
2804
+ },
2805
+ get children() {
2806
+ var _el$0 = _tmpl$2$9();
2807
+ _el$0.firstChild;
2808
+ insert(_el$0, () => t().lastAction, null);
2809
+ return _el$0;
2810
+ }
2811
+ }), null);
2812
+ insert(_el$2, createComponent(Show, {
2813
+ get when() {
2814
+ return memo(() => !!t().nextHint)() && !t().steps.every((s) => s.status === "done");
2815
+ },
2816
+ get children() {
2817
+ var _el$10 = _tmpl$3$8();
2818
+ _el$10.firstChild;
2819
+ insert(_el$10, () => t().nextHint, null);
2820
+ return _el$10;
2821
+ }
2822
+ }), null);
2823
+ createRenderEffect((_$p) => setStyleProperty(_el$8, "width", `${progressPercent(t().steps)}%`));
2824
+ return _el$2;
2825
+ })()
2826
+ }), null);
2827
+ insert(_el$, createComponent(Show, {
2828
+ get when() {
2829
+ return memo(() => !!flow())() && !tracker();
2830
+ },
2831
+ children: (f) => (() => {
2832
+ var _el$15 = _tmpl$4$8(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$16.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$20.nextSibling;
2833
+ insert(_el$17, () => f().goal);
2834
+ insert(_el$18, () => progressPercent(f().steps), _el$19);
2835
+ insert(_el$22, createComponent(For, {
2836
+ get each() {
2837
+ return f().steps;
2838
+ },
2839
+ children: (step) => (() => {
2840
+ var _el$23 = _tmpl$5$7(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
2841
+ insert(_el$25, () => step.label);
2842
+ createRenderEffect(() => className(_el$23, `flow-step ${stepStatusClass(step.status)}`));
2843
+ return _el$23;
2844
+ })()
2845
+ }));
2846
+ createRenderEffect((_$p) => setStyleProperty(_el$21, "width", `${progressPercent(f().steps)}%`));
2847
+ return _el$15;
2848
+ })()
2849
+ }), null);
2850
+ return _el$;
2851
+ }
2852
+ });
2853
+ };
2461
2854
  function useScrollFade(el) {
2462
2855
  const update = () => {
2463
2856
  const { scrollTop, scrollHeight, clientHeight } = el;
@@ -2485,7 +2878,7 @@ function formatTime(iso, options) {
2485
2878
  ...options?.includeSeconds && { second: "2-digit" }
2486
2879
  });
2487
2880
  }
2488
- var _tmpl$$9 = /* @__PURE__ */ template(`<span class=agent-transcript-live><span class=agent-transcript-live-dot aria-hidden=true></span>Live`), _tmpl$2$8 = /* @__PURE__ */ template(`<div class=agent-transcript-list>`), _tmpl$3$7 = /* @__PURE__ */ template(`<aside class=agent-transcript-dock><div class=agent-transcript-header><div class=agent-transcript-title-row><span class=agent-transcript-title>Agent Transcript</span></div><div class=agent-transcript-actions><button class=agent-transcript-icon></button><button class=agent-transcript-icon data-tooltip=Hide>×`), _tmpl$4$7 = /* @__PURE__ */ template(`<article><div class=agent-transcript-meta><span class=agent-transcript-badge></span><span class=agent-transcript-time></span></div><div class=agent-transcript-text>`);
2881
+ var _tmpl$$9 = /* @__PURE__ */ template(`<div class=agent-summary-hud>`), _tmpl$2$8 = /* @__PURE__ */ template(`<span class=agent-transcript-live><span class=agent-transcript-live-dot aria-hidden=true></span>Live`), _tmpl$3$7 = /* @__PURE__ */ template(`<div class=agent-transcript-list>`), _tmpl$4$7 = /* @__PURE__ */ template(`<aside class=agent-transcript-dock><div class=agent-transcript-header><div class=agent-transcript-title-row><span class=agent-transcript-title>Agent Transcript</span></div><div class=agent-transcript-actions><button class=agent-transcript-icon></button><button class=agent-transcript-icon data-tooltip=Hide>×`), _tmpl$5$6 = /* @__PURE__ */ template(`<span class=agent-summary-live-dot aria-hidden=true>`), _tmpl$6$6 = /* @__PURE__ */ template(`<span class=agent-summary-text>: `), _tmpl$7$4 = /* @__PURE__ */ template(`<article><div class=agent-transcript-meta><span class=agent-transcript-badge></span><span class=agent-transcript-time></span></div><div class=agent-transcript-text>`);
2489
2882
  const AgentTranscriptDock = () => {
2490
2883
  const {
2491
2884
  runtimeState: runtimeState2
@@ -2507,66 +2900,107 @@ const AgentTranscriptDock = () => {
2507
2900
  setMode("off");
2508
2901
  await window.vessel.settings.set("agentTranscriptMode", "off");
2509
2902
  };
2903
+ const isSummary = createMemo(() => mode() === "summary");
2904
+ const latestEntry = createMemo(() => {
2905
+ const entries2 = visibleEntries();
2906
+ return entries2.length > 0 ? entries2[0] : null;
2907
+ });
2510
2908
  return createComponent(Show, {
2511
2909
  get when() {
2512
- return memo(() => mode() === "full")() && visibleEntries().length > 0;
2910
+ return memo(() => mode() !== "off")() && visibleEntries().length > 0;
2513
2911
  },
2514
2912
  get children() {
2515
- var _el$ = _tmpl$3$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
2516
- _el$3.firstChild;
2517
- var _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
2518
- insert(_el$3, createComponent(Show, {
2913
+ return [createComponent(Show, {
2519
2914
  get when() {
2520
- return hasStreamingEntry();
2915
+ return isSummary();
2521
2916
  },
2522
2917
  get children() {
2523
- return _tmpl$$9();
2918
+ var _el$ = _tmpl$$9();
2919
+ insert(_el$, createComponent(Show, {
2920
+ get when() {
2921
+ return latestEntry();
2922
+ },
2923
+ children: (entry) => [createComponent(Show, {
2924
+ get when() {
2925
+ return hasStreamingEntry();
2926
+ },
2927
+ get children() {
2928
+ return _tmpl$5$6();
2929
+ }
2930
+ }), (() => {
2931
+ var _el$10 = _tmpl$6$6(), _el$11 = _el$10.firstChild;
2932
+ insert(_el$10, () => entry().title || entry().kind, _el$11);
2933
+ insert(_el$10, (() => {
2934
+ var _c$ = memo(() => entry().text.length > 80);
2935
+ return () => _c$() ? entry().text.slice(0, 77) + "..." : entry().text;
2936
+ })(), null);
2937
+ return _el$10;
2938
+ })()]
2939
+ }));
2940
+ return _el$;
2524
2941
  }
2525
- }), null);
2526
- _el$7.$$click = () => setCollapsed((value) => !value);
2527
- insert(_el$7, () => collapsed() ? "▴" : "▾");
2528
- _el$8.$$click = () => void hideDock();
2529
- insert(_el$, createComponent(Show, {
2942
+ }), createComponent(Show, {
2530
2943
  get when() {
2531
- return !collapsed();
2944
+ return !isSummary();
2532
2945
  },
2533
2946
  get children() {
2534
- var _el$9 = _tmpl$2$8();
2535
- use((el) => useScrollFade(el), _el$9);
2536
- insert(_el$9, createComponent(For, {
2537
- get each() {
2538
- return visibleEntries();
2947
+ var _el$2 = _tmpl$4$7(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
2948
+ _el$4.firstChild;
2949
+ var _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling;
2950
+ insert(_el$4, createComponent(Show, {
2951
+ get when() {
2952
+ return hasStreamingEntry();
2539
2953
  },
2540
- children: (entry) => (() => {
2541
- var _el$0 = _tmpl$4$7(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling;
2542
- insert(_el$10, () => entry.title || entry.kind);
2543
- insert(_el$11, () => formatTime(entry.updatedAt));
2544
- insert(_el$12, () => entry.text);
2545
- createRenderEffect((_p$) => {
2546
- var _v$3 = `agent-transcript-entry ${entry.kind}`, _v$4 = !!(entry.status === "streaming");
2547
- _v$3 !== _p$.e && className(_el$0, _p$.e = _v$3);
2548
- _v$4 !== _p$.t && _el$0.classList.toggle("streaming", _p$.t = _v$4);
2549
- return _p$;
2550
- }, {
2551
- e: void 0,
2552
- t: void 0
2553
- });
2954
+ get children() {
2955
+ return _tmpl$2$8();
2956
+ }
2957
+ }), null);
2958
+ _el$8.$$click = () => setCollapsed((value) => !value);
2959
+ insert(_el$8, () => collapsed() ? "▴" : "▾");
2960
+ _el$9.$$click = () => void hideDock();
2961
+ insert(_el$2, createComponent(Show, {
2962
+ get when() {
2963
+ return !collapsed();
2964
+ },
2965
+ get children() {
2966
+ var _el$0 = _tmpl$3$7();
2967
+ use((el) => useScrollFade(el), _el$0);
2968
+ insert(_el$0, createComponent(For, {
2969
+ get each() {
2970
+ return visibleEntries();
2971
+ },
2972
+ children: (entry) => (() => {
2973
+ var _el$12 = _tmpl$7$4(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$13.nextSibling;
2974
+ insert(_el$14, () => entry.title || entry.kind);
2975
+ insert(_el$15, () => formatTime(entry.updatedAt));
2976
+ insert(_el$16, () => entry.text);
2977
+ createRenderEffect((_p$) => {
2978
+ var _v$3 = `agent-transcript-entry ${entry.kind}`, _v$4 = !!(entry.status === "streaming");
2979
+ _v$3 !== _p$.e && className(_el$12, _p$.e = _v$3);
2980
+ _v$4 !== _p$.t && _el$12.classList.toggle("streaming", _p$.t = _v$4);
2981
+ return _p$;
2982
+ }, {
2983
+ e: void 0,
2984
+ t: void 0
2985
+ });
2986
+ return _el$12;
2987
+ })()
2988
+ }));
2554
2989
  return _el$0;
2555
- })()
2556
- }));
2557
- return _el$9;
2990
+ }
2991
+ }), null);
2992
+ createRenderEffect((_p$) => {
2993
+ var _v$ = !!collapsed(), _v$2 = collapsed() ? "Expand" : "Collapse";
2994
+ _v$ !== _p$.e && _el$2.classList.toggle("collapsed", _p$.e = _v$);
2995
+ _v$2 !== _p$.t && setAttribute(_el$8, "data-tooltip", _p$.t = _v$2);
2996
+ return _p$;
2997
+ }, {
2998
+ e: void 0,
2999
+ t: void 0
3000
+ });
3001
+ return _el$2;
2558
3002
  }
2559
- }), null);
2560
- createRenderEffect((_p$) => {
2561
- var _v$ = !!collapsed(), _v$2 = collapsed() ? "Expand" : "Collapse";
2562
- _v$ !== _p$.e && _el$.classList.toggle("collapsed", _p$.e = _v$);
2563
- _v$2 !== _p$.t && setAttribute(_el$7, "data-tooltip", _p$.t = _v$2);
2564
- return _p$;
2565
- }, {
2566
- e: void 0,
2567
- t: void 0
2568
- });
2569
- return _el$;
3003
+ })];
2570
3004
  }
2571
3005
  });
2572
3006
  };
@@ -2666,7 +3100,7 @@ const [pendingQueries, setPendingQueries] = createSignal([]);
2666
3100
  const [pendingQueryActivities, setPendingQueryActivities] = createSignal([]);
2667
3101
  const [queueNotice, setQueueNotice] = createSignal(null);
2668
3102
  const [automationActivities, setAutomationActivities] = createSignal([]);
2669
- let initialized$1 = false;
3103
+ let initialized$2 = false;
2670
3104
  let pendingDrainScheduled = false;
2671
3105
  let listenerCleanups = [];
2672
3106
  let pendingAutomationActivity = null;
@@ -2724,9 +3158,9 @@ function schedulePendingDrain() {
2724
3158
  }
2725
3159
  });
2726
3160
  }
2727
- function init$1() {
2728
- if (initialized$1) return;
2729
- initialized$1 = true;
3161
+ function init$2() {
3162
+ if (initialized$2) return;
3163
+ initialized$2 = true;
2730
3164
  listenerCleanups.push(window.vessel.ai.onStreamStart((prompt) => {
2731
3165
  setMessages((prev) => {
2732
3166
  const next = [...prev, { role: "user", content: prompt }];
@@ -2809,7 +3243,7 @@ function init$1() {
2809
3243
  }));
2810
3244
  }
2811
3245
  function useAI() {
2812
- init$1();
3246
+ init$2();
2813
3247
  const query = async (prompt, activity = null) => {
2814
3248
  recordRecentQuery(prompt);
2815
3249
  if (isStreaming()) {
@@ -3025,6 +3459,36 @@ const CommandBar = () => {
3025
3459
  });
3026
3460
  };
3027
3461
  delegateEvents(["click", "input", "keydown"]);
3462
+ const INITIAL$1 = { entries: [] };
3463
+ const [historyState, setHistoryState] = createSignal(INITIAL$1);
3464
+ let initialized$1 = false;
3465
+ let initPromise$1 = null;
3466
+ async function init$1() {
3467
+ if (initPromise$1) return initPromise$1;
3468
+ if (initialized$1) return;
3469
+ initialized$1 = true;
3470
+ initPromise$1 = (async () => {
3471
+ try {
3472
+ const state = await window.vessel.history.get();
3473
+ setHistoryState(state);
3474
+ window.vessel.history.onUpdate((s) => setHistoryState(s));
3475
+ } catch (error) {
3476
+ initialized$1 = false;
3477
+ console.error("Failed to initialize history store", error);
3478
+ } finally {
3479
+ initPromise$1 = null;
3480
+ }
3481
+ })();
3482
+ return initPromise$1;
3483
+ }
3484
+ function useHistory() {
3485
+ void init$1();
3486
+ return {
3487
+ historyState,
3488
+ search: (query) => window.vessel.history.search(query),
3489
+ clear: () => window.vessel.history.clear()
3490
+ };
3491
+ }
3028
3492
  const INITIAL = { folders: [], bookmarks: [] };
3029
3493
  const [bookmarksState, setBookmarksState] = createSignal(INITIAL);
3030
3494
  let initialized = false;
@@ -3051,7 +3515,16 @@ function useBookmarks() {
3051
3515
  void init();
3052
3516
  return {
3053
3517
  bookmarksState,
3054
- saveBookmark: (url, title, folderId, note) => window.vessel.bookmarks.saveBookmark(url, title, folderId, note),
3518
+ saveBookmark: (url, title, folderId, note, intent, expectedContent, keyFields, agentHints) => window.vessel.bookmarks.saveBookmark(
3519
+ url,
3520
+ title,
3521
+ folderId,
3522
+ note,
3523
+ intent,
3524
+ expectedContent,
3525
+ keyFields,
3526
+ agentHints
3527
+ ),
3055
3528
  removeBookmark: (id) => window.vessel.bookmarks.removeBookmark(id),
3056
3529
  createFolder: (name) => window.vessel.bookmarks.createFolder(name),
3057
3530
  createFolderWithSummary: (name, summary) => window.vessel.bookmarks.createFolderWithSummary(name, summary),
@@ -4499,7 +4972,9 @@ const FIELD_WEIGHTS = {
4499
4972
  note: 5,
4500
4973
  folder: 3,
4501
4974
  folderSummary: 2,
4502
- url: 1
4975
+ url: 1,
4976
+ intent: 4,
4977
+ expectedContent: 3
4503
4978
  };
4504
4979
  function normalizeBookmarkSearchText(value) {
4505
4980
  let normalized = value.toLowerCase();
@@ -4530,7 +5005,9 @@ function getBookmarkSearchMatch(args) {
4530
5005
  url: args.url,
4531
5006
  note: args.note,
4532
5007
  folder: args.folder,
4533
- folderSummary: args.folderSummary
5008
+ folderSummary: args.folderSummary,
5009
+ intent: args.intent,
5010
+ expectedContent: args.expectedContent
4534
5011
  };
4535
5012
  for (const field of Object.keys(values)) {
4536
5013
  if (!bookmarkFieldMatchesQuery(values[field], normalizedQuery, tokens)) {
@@ -4987,7 +5464,7 @@ function renderKitPrompt(kit, values) {
4987
5464
  (_, key) => values[key] ?? ""
4988
5465
  );
4989
5466
  }
4990
- var _tmpl$$5 = /* @__PURE__ */ template(`<div class=kit-upsell><div class=kit-upsell-icon aria-hidden=true></div><p class=kit-upsell-title>Vessel Premium</p><p class=kit-upsell-body>Automation Kits are a premium feature. Upgrade to unlock pre-built workflows you can launch with one click.</p><button class="agent-primary-button kit-upsell-btn"type=button>Start 7-day free trial — $5.99/mo after`), _tmpl$2$5 = /* @__PURE__ */ template(`<div class=kit-list-header><span class=agent-panel-title>Automation Kits <span class=kit-beta-tag>Beta</span></span><div class=kit-list-header-actions><span class=kit-list-count> kits</span><button class=kit-install-btn type=button title="Install a kit from a .kit.json file">+ Install`), _tmpl$3$4 = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$4 = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$4 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$4 = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$3 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$3 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$3 = /* @__PURE__ */ template(`<div class=kit-form-header><button class=kit-back-btn type=button title="Back to kits"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M9 11L5 7l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Back</button><div class=kit-form-title>`), _tmpl$0$3 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$3 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$3 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$3 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Date &amp; time</label><input class=kit-form-input type=datetime-local>`), _tmpl$13$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time of day</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$14$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$16$2 = /* @__PURE__ */ template(`<p class=kit-schedule-error>`), _tmpl$17$2 = /* @__PURE__ */ template(`<div class=kit-schedule-form><div class=kit-schedule-types></div><p class=kit-schedule-note>Schedules run only while Vessel is open. Missed runs are skipped.</p><button class="agent-primary-button kit-schedule-btn"type=button>`), _tmpl$18$2 = /* @__PURE__ */ template(`<div class=kit-schedule-section><label class=kit-schedule-toggle><input type=checkbox>Schedule for later`), _tmpl$19$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Run at</label><input type=datetime-local class="kit-form-input kit-schedule-time">`), _tmpl$20$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Day</label><select class="kit-form-input kit-schedule-time">`), _tmpl$21$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Time</label><input type=time class="kit-form-input kit-schedule-time">`), _tmpl$22$2 = /* @__PURE__ */ template(`<div class=sched-edit-backdrop><div class=sched-edit-panel><div class=sched-edit-header><span class=sched-edit-title>Edit schedule</span><span class=sched-edit-job-name></span></div><div class=kit-schedule-types></div><div class=sched-edit-actions><button class=kit-back-btn type=button>Cancel</button><button class=agent-primary-button type=button>Save`), _tmpl$23$2 = /* @__PURE__ */ template(`<section class=automation-panel>`), _tmpl$24$2 = /* @__PURE__ */ template(`<div class=kit-card-meta>~<!> min`), _tmpl$25$2 = /* @__PURE__ */ template(`<button class=kit-remove-btn type=button>×`), _tmpl$26$2 = /* @__PURE__ */ template(`<div class=kit-card role=button tabindex=0><span class=kit-card-icon aria-hidden=true></span><div class=kit-card-body><div class=kit-card-name></div><div class=kit-card-desc>`), _tmpl$27$2 = /* @__PURE__ */ template(`<svg class=kit-card-caret width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M5 3l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$28$2 = /* @__PURE__ */ template(`<div class=kit-sched-next>Next: `), _tmpl$29$2 = /* @__PURE__ */ template(`<div class=sched-context-menu><button class=sched-ctx-item type=button>Edit task</button><button class=sched-ctx-item type=button>Edit schedule</button><div class=sched-ctx-divider></div><button class=sched-ctx-item type=button></button><button class="sched-ctx-item sched-ctx-danger"type=button>Delete`), _tmpl$30$2 = /* @__PURE__ */ template(`<div class=kit-sched-card><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-sched-body><div class=kit-sched-name></div><div class=kit-sched-meta></div></div><div class=kit-sched-actions><button class=kit-sched-toggle type=button></button><button class=kit-remove-btn type=button title="Delete schedule"aria-label="Delete schedule">×`), _tmpl$31$2 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$2 = /* @__PURE__ */ template(`<div class=kit-activity-card><div class=kit-activity-header><div class=kit-activity-title><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-activity-title-copy><div class=kit-sched-name></div><div class=kit-activity-time></div></div></div><span class=kit-activity-badge>`), _tmpl$33$2 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$2 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$2 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$2 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$2 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$2 = /* @__PURE__ */ template(`<input class=kit-form-input>`), _tmpl$39$1 = /* @__PURE__ */ template(`<span class=kit-run-spinner aria-hidden=true>`), _tmpl$40$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=sched-type>`), _tmpl$41$1 = /* @__PURE__ */ template(`<option>`), _tmpl$42$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=edit-sched-type>`);
5467
+ var _tmpl$$5 = /* @__PURE__ */ template(`<div class=kit-upsell><div class=kit-upsell-icon aria-hidden=true></div><p class=kit-upsell-title>Vessel Premium</p><p class=kit-upsell-body>Automation Kits are a premium feature. Upgrade to unlock pre-built workflows you can launch with one click.</p><button class="agent-primary-button kit-upsell-btn"type=button>Start 7-day free trial — $5.99/mo after`), _tmpl$2$5 = /* @__PURE__ */ template(`<div class=kit-list-header><span class=agent-panel-title>Automation Kits <span class=kit-beta-tag>Beta</span></span><div class=kit-list-header-actions><span class=kit-list-count> kits</span><button class=kit-install-btn type=button title="Install a kit from a .kit.json file">+ Install`), _tmpl$3$4 = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$4 = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$4 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$4 = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$3 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$3 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$3 = /* @__PURE__ */ template(`<div class=kit-form-header><button class=kit-back-btn type=button title="Back to kits"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M9 11L5 7l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Back</button><div class=kit-form-title>`), _tmpl$0$3 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$3 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$3 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$3 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Date &amp; time</label><input class=kit-form-input type=datetime-local>`), _tmpl$13$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time of day</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$14$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$16$2 = /* @__PURE__ */ template(`<p class=kit-schedule-error>`), _tmpl$17$2 = /* @__PURE__ */ template(`<div class=kit-schedule-form><div class=kit-schedule-types></div><p class=kit-schedule-note>Schedules run only while Vessel is open. Missed runs are skipped.</p><button class="agent-primary-button kit-schedule-btn"type=button>`), _tmpl$18$2 = /* @__PURE__ */ template(`<div class=kit-schedule-section><label class=kit-schedule-toggle><input type=checkbox>Schedule for later`), _tmpl$19$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Run at</label><input type=datetime-local class="kit-form-input kit-schedule-time">`), _tmpl$20$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Day</label><select class="kit-form-input kit-schedule-time">`), _tmpl$21$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Time</label><input type=time class="kit-form-input kit-schedule-time">`), _tmpl$22$2 = /* @__PURE__ */ template(`<div class=sched-edit-backdrop><div class=sched-edit-panel><div class=sched-edit-header><span class=sched-edit-title>Edit schedule</span><span class=sched-edit-job-name></span></div><div class=kit-schedule-types></div><div class=sched-edit-actions><button class=kit-back-btn type=button>Cancel</button><button class=agent-primary-button type=button>Save`), _tmpl$23$2 = /* @__PURE__ */ template(`<section class=automation-panel>`), _tmpl$24$2 = /* @__PURE__ */ template(`<div class=kit-card-meta>~<!> min`), _tmpl$25$2 = /* @__PURE__ */ template(`<button class=kit-remove-btn type=button>×`), _tmpl$26$2 = /* @__PURE__ */ template(`<div class=kit-card role=button tabindex=0><span class=kit-card-icon aria-hidden=true></span><div class=kit-card-body><div class=kit-card-name></div><div class=kit-card-desc>`), _tmpl$27$2 = /* @__PURE__ */ template(`<svg class=kit-card-caret width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M5 3l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$28$2 = /* @__PURE__ */ template(`<div class=kit-sched-next>Next: `), _tmpl$29$2 = /* @__PURE__ */ template(`<div class=sched-context-menu><button class=sched-ctx-item type=button>Edit task</button><button class=sched-ctx-item type=button>Edit schedule</button><div class=sched-ctx-divider></div><button class=sched-ctx-item type=button></button><button class="sched-ctx-item sched-ctx-danger"type=button>Delete`), _tmpl$30$2 = /* @__PURE__ */ template(`<div class=kit-sched-card><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-sched-body><div class=kit-sched-name></div><div class=kit-sched-meta></div></div><div class=kit-sched-actions><button class=kit-sched-toggle type=button></button><button class=kit-remove-btn type=button title="Delete schedule"aria-label="Delete schedule">×`), _tmpl$31$2 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$2 = /* @__PURE__ */ template(`<div class=kit-activity-card><div class=kit-activity-header><div class=kit-activity-title><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-activity-title-copy><div class=kit-sched-name></div><div class=kit-activity-time></div></div></div><span class=kit-activity-badge>`), _tmpl$33$2 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$2 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$2 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$2 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$2 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$2 = /* @__PURE__ */ template(`<input class=kit-form-input>`), _tmpl$39$2 = /* @__PURE__ */ template(`<span class=kit-run-spinner aria-hidden=true>`), _tmpl$40$2 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=sched-type>`), _tmpl$41$2 = /* @__PURE__ */ template(`<option>`), _tmpl$42$2 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=edit-sched-type>`);
4991
5468
  const ICON_MAP = {
4992
5469
  BookOpen: book_open_default,
4993
5470
  Tag: tag_default,
@@ -5645,7 +6122,7 @@ const AutomationTab = (props) => {
5645
6122
  return !isStreaming2();
5646
6123
  },
5647
6124
  get fallback() {
5648
- return [_tmpl$39$1(), "Agent busy…"];
6125
+ return [_tmpl$39$2(), "Agent busy…"];
5649
6126
  },
5650
6127
  children: "Run Kit"
5651
6128
  }));
@@ -5666,7 +6143,7 @@ const AutomationTab = (props) => {
5666
6143
  insert(_el$38, createComponent(For, {
5667
6144
  each: ["once", "hourly", "daily", "weekly"],
5668
6145
  children: (type) => (() => {
5669
- var _el$117 = _tmpl$40$1(), _el$118 = _el$117.firstChild;
6146
+ var _el$117 = _tmpl$40$2(), _el$118 = _el$117.firstChild;
5670
6147
  _el$118.addEventListener("change", () => setSchedType(type));
5671
6148
  _el$118.value = type;
5672
6149
  insert(_el$117, () => type.charAt(0).toUpperCase() + type.slice(1), null);
@@ -5707,7 +6184,7 @@ const AutomationTab = (props) => {
5707
6184
  insert(_el$47, createComponent(For, {
5708
6185
  each: DAY_NAMES,
5709
6186
  children: (day, i) => (() => {
5710
- var _el$119 = _tmpl$41$1();
6187
+ var _el$119 = _tmpl$41$2();
5711
6188
  insert(_el$119, day);
5712
6189
  createRenderEffect(() => _el$119.value = i());
5713
6190
  return _el$119;
@@ -5756,7 +6233,7 @@ const AutomationTab = (props) => {
5756
6233
  insert(_el$59, createComponent(For, {
5757
6234
  each: ["once", "hourly", "daily", "weekly"],
5758
6235
  children: (t) => (() => {
5759
- var _el$120 = _tmpl$42$1(), _el$121 = _el$120.firstChild;
6236
+ var _el$120 = _tmpl$42$2(), _el$121 = _el$120.firstChild;
5760
6237
  _el$121.addEventListener("change", () => setEditType(t));
5761
6238
  _el$121.value = t;
5762
6239
  insert(_el$120, () => t.charAt(0).toUpperCase() + t.slice(1), null);
@@ -5790,7 +6267,7 @@ const AutomationTab = (props) => {
5790
6267
  insert(_el$65, createComponent(For, {
5791
6268
  each: DAY_NAMES,
5792
6269
  children: (name, i) => (() => {
5793
- var _el$122 = _tmpl$41$1();
6270
+ var _el$122 = _tmpl$41$2();
5794
6271
  insert(_el$122, name);
5795
6272
  createRenderEffect(() => _el$122.value = i());
5796
6273
  return _el$122;
@@ -5827,7 +6304,7 @@ const AutomationTab = (props) => {
5827
6304
  };
5828
6305
  delegateEvents(["click", "input", "keydown", "contextmenu"]);
5829
6306
  const vesselLogo = "" + new URL("vessel-logo-transparent-IT25qr-Z.png", import.meta.url).href;
5830
- var _tmpl$$4 = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=premium-inline-offer><div class=premium-inline-kicker>Vessel Premium</div><div class=premium-inline-title></div><p class=premium-inline-copy></p><div class=premium-inline-actions><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>View details`), _tmpl$3$3 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$4$3 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$5$3 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$6$3 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div><div class=agent-panel-title>Supervisor</div><div class=agent-panel-subtitle></div></div><span class=agent-status-pill></span></div><div class=agent-panel-controls><button class=agent-control-button type=button></button><button class=agent-control-button type=button>Restore session</button></div><div class=agent-muted></div><div class=agent-section-header><div class=agent-section-title>Recent actions`), _tmpl$7$2 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2>`), _tmpl$9$2 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$0$2 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$1$2 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$10$2 = /* @__PURE__ */ template(`<div class="kit-upsell premium-chat-banner"><p class=kit-upsell-title>Vessel Premium</p><p class="kit-upsell-body premium-chat-banner-body">Give the built-in agent a bigger toolbox and longer runway: screenshots, saved sessions, workflow tracking, table extraction, and up to 1,000 tool calls per turn.</p><div class="premium-inline-actions premium-chat-banner-actions"><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>See Premium`), _tmpl$11$2 = /* @__PURE__ */ template(`<span>`), _tmpl$12$2 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$13$1 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$14$1 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$15$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$16$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$17$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$18$1 = /* @__PURE__ */ template(`<div class=highlight-nav><button class=highlight-nav-btn type=button title="Previous highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M8 10L4 6l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=highlight-nav-label type=button title="Go to current highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><circle cx=6 cy=6 r=3 fill="rgba(196, 160, 90, 0.6)"stroke="rgba(196, 160, 90, 0.9)"stroke-width=1></circle></svg></button><button class=highlight-nav-btn type=button title="Next highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M4 2l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$19$1 = /* @__PURE__ */ template(`<button class=chat-queue-clear type=button>Clear queue`), _tmpl$20$1 = /* @__PURE__ */ template(`<div class=chat-queue-list>`), _tmpl$21$1 = /* @__PURE__ */ template(`<div class=chat-queue-status><div class=chat-queue-status-row><span>`), _tmpl$22$1 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2></textarea><button class=sidebar-send>`), _tmpl$23$1 = /* @__PURE__ */ template(`<div class=sidebar><div class=sidebar-resize-handle></div><div class=sidebar-header><div class=sidebar-brand><img class=sidebar-logo alt=Vessel><span class=sidebar-brand-text>Vessel Browser</span></div><div class=sidebar-header-actions><button class=sidebar-clear title="Clear chat">Clear</button><button class=sidebar-close title="Close AI chat (Esc)"aria-label="Close AI chat"><svg width=14 height=14 viewBox="0 0 14 14"aria-hidden=true><path d="M3.5 3.5l7 7M10.5 3.5l-7 7"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round></path></svg></button></div></div><div class=sidebar-tabs role=tablist><button class=sidebar-tab role=tab>Supervisor</button><button class=sidebar-tab role=tab>Bookmarks</button><button class=sidebar-tab role=tab>Checkpoints</button><button class=sidebar-tab role=tab>Chat</button><button class=sidebar-tab role=tab>Automate</button></div><div class=sidebar-messages><div>`), _tmpl$24$1 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$25$1 = /* @__PURE__ */ template(`<div class="agent-card agent-card-approval"><div class=agent-card-approval-stripe aria-hidden=true></div><div class=agent-card-title></div><div class=agent-card-copy></div><div class=agent-card-copy></div><div class=agent-card-actions><button class=agent-primary-button type=button>Approve</button><button class=agent-control-button type=button>Reject`), _tmpl$26$1 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$29$1 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$30$1 = /* @__PURE__ */ template(`<div class=agent-card><div class=agent-action-row><span class=agent-card-title></span><span></span></div><div class=agent-card-copy>`), _tmpl$31$1 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$32$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$33$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$34$1 = /* @__PURE__ */ template(`<button class=bookmark-ghost-button type=button>Keep bookmarks`), _tmpl$35$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-delete-confirm><p class=bookmark-delete-prompt>Delete "<!>"?</p><div class=bookmark-delete-options><button class="bookmark-ghost-button danger"type=button></button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$36$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><div class=bookmark-folder-form-fields><input class=bookmark-input><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=button>Save</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$38$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-section><div class="bookmark-folder-header clickable"role=button tabindex=0><div class=bookmark-folder-overview><span class=bookmark-folder-chevron aria-hidden=true>▸</span><div><div class=bookmark-folder-name></div><div class=bookmark-folder-meta> saved`), _tmpl$39 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$40 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$41 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$42 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$43 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$44 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$45 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><button class=agent-control-button type=button>Restore`), _tmpl$46 = /* @__PURE__ */ template(`<div>`), _tmpl$47 = /* @__PURE__ */ template(`<div class=thinking-state><div class=thinking-orb aria-hidden=true><span></span><span></span><span></span></div><div class=thinking-copy><div class=thinking-title>Thinking`), _tmpl$48 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$49 = /* @__PURE__ */ template(`<div class=chat-approval><div class=chat-approval-icon aria-hidden=true><svg width=16 height=16 viewBox="0 0 16 16"fill=none><path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75a.75.75 0 011.5 0v3.5a.75.75 0 01-1.5 0v-3.5zM8 11.5a.75.75 0 110-1.5.75.75 0 010 1.5z"fill=currentColor></path></svg></div><div class=chat-approval-body><div class=chat-approval-title>Approval needed: <strong></strong></div><div class=chat-approval-detail></div><div class=chat-approval-actions><button class="chat-approval-btn chat-approval-approve"type=button>Approve</button><button class="chat-approval-btn chat-approval-reject"type=button>Reject`), _tmpl$50 = /* @__PURE__ */ template(`<div class=chat-queue-item><span class=chat-queue-text></span><button class=chat-queue-remove type=button>×`);
6307
+ var _tmpl$$4 = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=premium-inline-offer><div class=premium-inline-kicker>Vessel Premium</div><div class=premium-inline-title></div><p class=premium-inline-copy></p><div class=premium-inline-actions><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>View details`), _tmpl$3$3 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$4$3 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$5$3 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$6$3 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div><div class=agent-panel-title>Supervisor</div><div class=agent-panel-subtitle></div></div><span class=agent-status-pill></span></div><div class=agent-panel-controls><button class=agent-control-button type=button></button><button class=agent-control-button type=button>Restore session</button></div><div class=agent-muted></div><div class=agent-section-header><div class=agent-section-title>Recent actions`), _tmpl$7$2 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2>`), _tmpl$9$2 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$0$2 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$1$2 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$10$2 = /* @__PURE__ */ template(`<p class=history-empty>No browsing history yet.`), _tmpl$11$2 = /* @__PURE__ */ template(`<div class=history-panel><div class=history-panel-header><span class=history-panel-title>Browsing History</span><button class=history-clear-btn>Clear</button></div><div class=history-list>`), _tmpl$12$2 = /* @__PURE__ */ template(`<div class="kit-upsell premium-chat-banner"><p class=kit-upsell-title>Vessel Premium</p><p class="kit-upsell-body premium-chat-banner-body">Give the built-in agent a bigger toolbox and longer runway: screenshots, saved sessions, workflow tracking, table extraction, and up to 1,000 tool calls per turn.</p><div class="premium-inline-actions premium-chat-banner-actions"><button class="agent-primary-button premium-inline-primary"type=button>Start 7-day free trial — $5.99/mo after</button><button class="agent-control-button premium-inline-secondary"type=button>See Premium`), _tmpl$13$1 = /* @__PURE__ */ template(`<span>`), _tmpl$14$1 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$15$1 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$16$1 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$17$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$18$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$19$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$20$1 = /* @__PURE__ */ template(`<div class=highlight-nav><button class=highlight-nav-btn type=button title="Previous highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M8 10L4 6l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=highlight-nav-label type=button title="Go to current highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><circle cx=6 cy=6 r=3 fill="rgba(196, 160, 90, 0.6)"stroke="rgba(196, 160, 90, 0.9)"stroke-width=1></circle></svg></button><button class=highlight-nav-btn type=button title="Next highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M4 2l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$21$1 = /* @__PURE__ */ template(`<button class=chat-queue-clear type=button>Clear queue`), _tmpl$22$1 = /* @__PURE__ */ template(`<div class=chat-queue-list>`), _tmpl$23$1 = /* @__PURE__ */ template(`<div class=chat-queue-status><div class=chat-queue-status-row><span>`), _tmpl$24$1 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2></textarea><button class=sidebar-send>`), _tmpl$25$1 = /* @__PURE__ */ template(`<div class=sidebar><div class=sidebar-resize-handle></div><div class=sidebar-header><div class=sidebar-brand><img class=sidebar-logo alt=Vessel><span class=sidebar-brand-text>Vessel Browser</span></div><div class=sidebar-header-actions><button class=sidebar-clear title="Clear chat">Clear</button><button class=sidebar-close title="Close AI chat (Esc)"aria-label="Close AI chat"><svg width=14 height=14 viewBox="0 0 14 14"aria-hidden=true><path d="M3.5 3.5l7 7M10.5 3.5l-7 7"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round></path></svg></button></div></div><div class=sidebar-tabs role=tablist><button class=sidebar-tab role=tab>Supervisor</button><button class=sidebar-tab role=tab>Bookmarks</button><button class=sidebar-tab role=tab>Checkpoints</button><button class=sidebar-tab role=tab>Chat</button><button class=sidebar-tab role=tab>Automate</button><button class=sidebar-tab role=tab>History</button></div><div class=sidebar-messages><div>`), _tmpl$26$1 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class="agent-card agent-card-approval"><div class=agent-card-approval-stripe aria-hidden=true></div><div class=agent-card-title></div><div class=agent-card-copy></div><div class=agent-card-copy></div><div class=agent-card-actions><button class=agent-primary-button type=button>Approve</button><button class=agent-control-button type=button>Reject`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$29$1 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$30$1 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$31$1 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$32$1 = /* @__PURE__ */ template(`<div class=agent-card><div class=agent-action-row><span class=agent-card-title></span><span></span></div><div class=agent-card-copy>`), _tmpl$33$1 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$34$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$35$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$36$1 = /* @__PURE__ */ template(`<button class=bookmark-ghost-button type=button>Keep bookmarks`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-delete-confirm><p class=bookmark-delete-prompt>Delete "<!>"?</p><div class=bookmark-delete-options><button class="bookmark-ghost-button danger"type=button></button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$38$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><div class=bookmark-folder-form-fields><input class=bookmark-input><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=button>Save</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$39$1 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$40$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-section><div class="bookmark-folder-header clickable"role=button tabindex=0><div class=bookmark-folder-overview><span class=bookmark-folder-chevron aria-hidden=true>▸</span><div><div class=bookmark-folder-name></div><div class=bookmark-folder-meta> saved`), _tmpl$41$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$42$1 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$43 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$44 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$45 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$46 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$47 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><button class=agent-control-button type=button>Restore`), _tmpl$48 = /* @__PURE__ */ template(`<button class=history-entry><span class=history-entry-title></span><span class=history-entry-url></span><span class=history-entry-time>`), _tmpl$49 = /* @__PURE__ */ template(`<div>`), _tmpl$50 = /* @__PURE__ */ template(`<div class=thinking-state><div class=thinking-orb aria-hidden=true><span></span><span></span><span></span></div><div class=thinking-copy><div class=thinking-title>Thinking`), _tmpl$51 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$52 = /* @__PURE__ */ template(`<div class=chat-approval><div class=chat-approval-icon aria-hidden=true><svg width=16 height=16 viewBox="0 0 16 16"fill=none><path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75a.75.75 0 011.5 0v3.5a.75.75 0 01-1.5 0v-3.5zM8 11.5a.75.75 0 110-1.5.75.75 0 010 1.5z"fill=currentColor></path></svg></div><div class=chat-approval-body><div class=chat-approval-title>Approval needed: <strong></strong></div><div class=chat-approval-detail></div><div class=chat-approval-actions><button class="chat-approval-btn chat-approval-approve"type=button>Approve</button><button class="chat-approval-btn chat-approval-reject"type=button>Reject`), _tmpl$53 = /* @__PURE__ */ template(`<div class=chat-queue-item><span class=chat-queue-text></span><button class=chat-queue-remove type=button>×`);
5831
6308
  const UNSORTED_FOLDER = {
5832
6309
  id: "unsorted",
5833
6310
  name: "Unsorted",
@@ -5902,6 +6379,7 @@ const Sidebar = (props) => {
5902
6379
  activeTab,
5903
6380
  createTab
5904
6381
  } = useTabs();
6382
+ const history = useHistory();
5905
6383
  const {
5906
6384
  bookmarksState: bookmarksState2,
5907
6385
  saveBookmark,
@@ -6188,6 +6666,18 @@ ${contextBlock}` : contextBlock);
6188
6666
  const startX = e.screenX;
6189
6667
  const startWidth = sidebarWidth2();
6190
6668
  let finished = false;
6669
+ const state = {
6670
+ currentX: startX,
6671
+ rafId: null
6672
+ };
6673
+ const flushResizeUpdate = () => {
6674
+ state.rafId = null;
6675
+ if (finished) return;
6676
+ const totalDelta = startX - state.currentX;
6677
+ const targetWidth = startWidth + totalDelta;
6678
+ const newWidth = Math.max(240, Math.min(800, Math.round(targetWidth)));
6679
+ resizeSidebar(newWidth);
6680
+ };
6191
6681
  const clearPointerTracking = () => {
6192
6682
  window.removeEventListener("pointermove", onPointerMove);
6193
6683
  window.removeEventListener("pointerup", onPointerUp);
@@ -6198,14 +6688,25 @@ ${contextBlock}` : contextBlock);
6198
6688
  if (target.hasPointerCapture?.(e.pointerId)) {
6199
6689
  target.releasePointerCapture(e.pointerId);
6200
6690
  }
6691
+ if (state.rafId !== null) {
6692
+ cancelAnimationFrame(state.rafId);
6693
+ state.rafId = null;
6694
+ }
6201
6695
  };
6202
6696
  const onPointerMove = (ev) => {
6203
- const delta = startX - ev.screenX;
6204
- resizeSidebar(startWidth + delta);
6697
+ state.currentX = ev.screenX;
6698
+ if (state.rafId === null) {
6699
+ state.rafId = requestAnimationFrame(flushResizeUpdate);
6700
+ }
6205
6701
  };
6206
6702
  const finishResize = () => {
6207
6703
  if (finished) return;
6208
6704
  finished = true;
6705
+ if (state.rafId !== null) {
6706
+ cancelAnimationFrame(state.rafId);
6707
+ state.rafId = null;
6708
+ }
6709
+ flushResizeUpdate();
6209
6710
  setIsDragging(false);
6210
6711
  clearPointerTracking();
6211
6712
  document.body.style.cursor = "";
@@ -6285,9 +6786,9 @@ ${contextBlock}` : contextBlock);
6285
6786
  return props.forceOpen || sidebarOpen2();
6286
6787
  },
6287
6788
  get children() {
6288
- var _el$9 = _tmpl$23$1(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$1.nextSibling, _el$16 = _el$15.firstChild;
6789
+ var _el$9 = _tmpl$25$1(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$1.nextSibling, _el$16 = _el$15.firstChild;
6289
6790
  _el$16.firstChild;
6290
- var _el$19 = _el$16.nextSibling, _el$20 = _el$19.nextSibling, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$15.nextSibling, _el$86 = _el$23.firstChild;
6791
+ var _el$19 = _el$16.nextSibling, _el$20 = _el$19.nextSibling, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$15.nextSibling, _el$93 = _el$24.firstChild;
6291
6792
  _el$0.$$pointerdown = startResize;
6292
6793
  setAttribute(_el$11, "src", vesselLogo);
6293
6794
  addEventListener(_el$13, "click", clearHistory, true);
@@ -6307,20 +6808,21 @@ ${contextBlock}` : contextBlock);
6307
6808
  _el$20.$$click = () => setSidebarTab("checkpoints");
6308
6809
  _el$21.$$click = () => setSidebarTab("chat");
6309
6810
  _el$22.$$click = () => setSidebarTab("automation");
6811
+ _el$23.$$click = () => setSidebarTab("history");
6310
6812
  use((el) => {
6311
6813
  messagesContainerRef = el;
6312
6814
  useScrollFade(el);
6313
- }, _el$23);
6314
- insert(_el$23, createComponent(Show, {
6815
+ }, _el$24);
6816
+ insert(_el$24, createComponent(Show, {
6315
6817
  get when() {
6316
6818
  return sidebarTab() === "supervisor";
6317
6819
  },
6318
6820
  get children() {
6319
- var _el$24 = _tmpl$6$3(), _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, _el$29 = _el$26.nextSibling, _el$30 = _el$25.nextSibling, _el$31 = _el$30.firstChild, _el$32 = _el$31.nextSibling, _el$33 = _el$30.nextSibling, _el$35 = _el$33.nextSibling;
6320
- _el$35.firstChild;
6321
- insert(_el$28, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
6322
- insert(_el$29, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
6323
- insert(_el$30, createComponent(DropdownSelect, {
6821
+ var _el$25 = _tmpl$6$3(), _el$26 = _el$25.firstChild, _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$27.nextSibling, _el$31 = _el$26.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$31.nextSibling, _el$36 = _el$34.nextSibling;
6822
+ _el$36.firstChild;
6823
+ insert(_el$29, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
6824
+ insert(_el$30, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
6825
+ insert(_el$31, createComponent(DropdownSelect, {
6324
6826
  "class": "agent-select",
6325
6827
  get value() {
6326
6828
  return runtimeState2().supervisor.approvalMode;
@@ -6330,17 +6832,17 @@ ${contextBlock}` : contextBlock);
6330
6832
  },
6331
6833
  ariaLabel: "Approval mode",
6332
6834
  onChange: (value) => void setApprovalMode(value)
6333
- }), _el$31);
6334
- _el$31.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
6335
- insert(_el$31, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
6336
- _el$32.$$click = () => void restoreSession();
6337
- insert(_el$33, approvalModeDescription);
6338
- insert(_el$24, createComponent(Show, {
6835
+ }), _el$32);
6836
+ _el$32.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
6837
+ insert(_el$32, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
6838
+ _el$33.$$click = () => void restoreSession();
6839
+ insert(_el$34, approvalModeDescription);
6840
+ insert(_el$25, createComponent(Show, {
6339
6841
  get when() {
6340
6842
  return runtimeState2().supervisor.pendingApprovals.length > 0;
6341
6843
  },
6342
6844
  get fallback() {
6343
- return _tmpl$24$1();
6845
+ return _tmpl$26$1();
6344
6846
  },
6345
6847
  get children() {
6346
6848
  return [_tmpl$4$3(), createComponent(For, {
@@ -6348,37 +6850,37 @@ ${contextBlock}` : contextBlock);
6348
6850
  return runtimeState2().supervisor.pendingApprovals;
6349
6851
  },
6350
6852
  children: (approval) => (() => {
6351
- var _el$104 = _tmpl$25$1(), _el$105 = _el$104.firstChild, _el$106 = _el$105.nextSibling, _el$107 = _el$106.nextSibling, _el$108 = _el$107.nextSibling, _el$109 = _el$108.nextSibling, _el$110 = _el$109.firstChild, _el$111 = _el$110.nextSibling;
6352
- insert(_el$106, () => approval.name);
6353
- insert(_el$107, () => approval.argsSummary);
6354
- insert(_el$108, () => approval.reason);
6355
- _el$110.$$click = () => void resolveApproval(approval.id, true);
6356
- _el$111.$$click = () => void resolveApproval(approval.id, false);
6357
- return _el$104;
6853
+ var _el$111 = _tmpl$27$1(), _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling, _el$114 = _el$113.nextSibling, _el$115 = _el$114.nextSibling, _el$116 = _el$115.nextSibling, _el$117 = _el$116.firstChild, _el$118 = _el$117.nextSibling;
6854
+ insert(_el$113, () => approval.name);
6855
+ insert(_el$114, () => approval.argsSummary);
6856
+ insert(_el$115, () => approval.reason);
6857
+ _el$117.$$click = () => void resolveApproval(approval.id, true);
6858
+ _el$118.$$click = () => void resolveApproval(approval.id, false);
6859
+ return _el$111;
6358
6860
  })()
6359
6861
  })];
6360
6862
  }
6361
- }), _el$35);
6362
- insert(_el$35, createComponent(Show, {
6863
+ }), _el$36);
6864
+ insert(_el$36, createComponent(Show, {
6363
6865
  get when() {
6364
6866
  return recentActions().length > 0;
6365
6867
  },
6366
6868
  get children() {
6367
- var _el$37 = _tmpl$5$3();
6368
- _el$37.$$click = () => setActionsExpanded((current) => !current);
6369
- insert(_el$37, (() => {
6869
+ var _el$38 = _tmpl$5$3();
6870
+ _el$38.$$click = () => setActionsExpanded((current) => !current);
6871
+ insert(_el$38, (() => {
6370
6872
  var _c$ = memo(() => !!actionsExpanded());
6371
6873
  return () => _c$() ? "Hide history" : `Show history (${recentActions().length})`;
6372
6874
  })());
6373
- return _el$37;
6875
+ return _el$38;
6374
6876
  }
6375
6877
  }), null);
6376
- insert(_el$24, createComponent(Show, {
6878
+ insert(_el$25, createComponent(Show, {
6377
6879
  get when() {
6378
6880
  return recentActions().length > 0;
6379
6881
  },
6380
6882
  get fallback() {
6381
- return _tmpl$26$1();
6883
+ return _tmpl$28$1();
6382
6884
  },
6383
6885
  get children() {
6384
6886
  return createComponent(Show, {
@@ -6386,7 +6888,7 @@ ${contextBlock}` : contextBlock);
6386
6888
  return actionsExpanded();
6387
6889
  },
6388
6890
  get fallback() {
6389
- return _tmpl$27$1();
6891
+ return _tmpl$29$1();
6390
6892
  },
6391
6893
  get children() {
6392
6894
  return createComponent(For, {
@@ -6394,53 +6896,53 @@ ${contextBlock}` : contextBlock);
6394
6896
  return recentActions();
6395
6897
  },
6396
6898
  children: (action) => (() => {
6397
- var _el$114 = _tmpl$30$1(), _el$115 = _el$114.firstChild, _el$116 = _el$115.firstChild, _el$117 = _el$116.nextSibling, _el$118 = _el$115.nextSibling;
6398
- insert(_el$116, () => action.name);
6399
- insert(_el$117, () => action.status);
6400
- insert(_el$118, () => action.argsSummary);
6401
- insert(_el$114, createComponent(Show, {
6899
+ var _el$121 = _tmpl$32$1(), _el$122 = _el$121.firstChild, _el$123 = _el$122.firstChild, _el$124 = _el$123.nextSibling, _el$125 = _el$122.nextSibling;
6900
+ insert(_el$123, () => action.name);
6901
+ insert(_el$124, () => action.status);
6902
+ insert(_el$125, () => action.argsSummary);
6903
+ insert(_el$121, createComponent(Show, {
6402
6904
  get when() {
6403
6905
  return action.resultSummary;
6404
6906
  },
6405
6907
  get children() {
6406
- var _el$119 = _tmpl$28$1();
6407
- insert(_el$119, () => action.resultSummary);
6408
- return _el$119;
6908
+ var _el$126 = _tmpl$30$1();
6909
+ insert(_el$126, () => action.resultSummary);
6910
+ return _el$126;
6409
6911
  }
6410
6912
  }), null);
6411
- insert(_el$114, createComponent(Show, {
6913
+ insert(_el$121, createComponent(Show, {
6412
6914
  get when() {
6413
6915
  return action.error;
6414
6916
  },
6415
6917
  get children() {
6416
- var _el$120 = _tmpl$29$1();
6417
- insert(_el$120, () => action.error);
6418
- return _el$120;
6918
+ var _el$127 = _tmpl$31$1();
6919
+ insert(_el$127, () => action.error);
6920
+ return _el$127;
6419
6921
  }
6420
6922
  }), null);
6421
- createRenderEffect(() => className(_el$117, `agent-action-status ${action.status}`));
6422
- return _el$114;
6923
+ createRenderEffect(() => className(_el$124, `agent-action-status ${action.status}`));
6924
+ return _el$121;
6423
6925
  })()
6424
6926
  });
6425
6927
  }
6426
6928
  });
6427
6929
  }
6428
6930
  }), null);
6429
- createRenderEffect(() => _el$29.classList.toggle("paused", !!runtimeState2().supervisor.paused));
6430
- return _el$24;
6931
+ createRenderEffect(() => _el$30.classList.toggle("paused", !!runtimeState2().supervisor.paused));
6932
+ return _el$25;
6431
6933
  }
6432
- }), _el$86);
6433
- insert(_el$23, createComponent(Show, {
6934
+ }), _el$93);
6935
+ insert(_el$24, createComponent(Show, {
6434
6936
  get when() {
6435
6937
  return sidebarTab() === "bookmarks";
6436
6938
  },
6437
6939
  get children() {
6438
- var _el$38 = _tmpl$9$2(), _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$41 = _el$40.firstChild, _el$42 = _el$41.nextSibling, _el$44 = _el$39.nextSibling, _el$45 = _el$44.nextSibling, _el$46 = _el$45.firstChild, _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$55 = _el$45.nextSibling, _el$56 = _el$55.firstChild, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling, _el$59 = _el$56.nextSibling, _el$60 = _el$55.nextSibling;
6439
- insert(_el$42, (() => {
6940
+ var _el$39 = _tmpl$9$2(), _el$40 = _el$39.firstChild, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling, _el$45 = _el$40.nextSibling, _el$46 = _el$45.nextSibling, _el$47 = _el$46.firstChild, _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling, _el$56 = _el$46.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, _el$60 = _el$57.nextSibling, _el$61 = _el$56.nextSibling;
6941
+ insert(_el$43, (() => {
6440
6942
  var _c$2 = memo(() => !!normalizedBookmarkSearch());
6441
6943
  return () => _c$2() ? `${bookmarkMatchCount()} matches for "${bookmarkSearchQuery().trim()}"` : `${bookmarksState2().bookmarks.length} saved across ${bookmarkFolders().length} folders`;
6442
6944
  })());
6443
- insert(_el$39, createComponent(Show, {
6945
+ insert(_el$40, createComponent(Show, {
6444
6946
  get when() {
6445
6947
  return currentTabSaved();
6446
6948
  },
@@ -6448,17 +6950,17 @@ ${contextBlock}` : contextBlock);
6448
6950
  return _tmpl$7$2();
6449
6951
  }
6450
6952
  }), null);
6451
- _el$44.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
6452
- _el$46.$$click = () => setBookmarkSaveExpanded((current) => !current);
6453
- insert(_el$45, createComponent(Show, {
6953
+ _el$45.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
6954
+ _el$47.$$click = () => setBookmarkSaveExpanded((current) => !current);
6955
+ insert(_el$46, createComponent(Show, {
6454
6956
  get when() {
6455
6957
  return bookmarkSaveExpanded();
6456
6958
  },
6457
6959
  get children() {
6458
- var _el$49 = _tmpl$8$2(), _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$51.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$52.nextSibling;
6459
- insert(_el$50, () => currentTab()?.title || "No active page");
6460
- insert(_el$51, () => currentTab()?.url || "Open a page to save it here.");
6461
- insert(_el$52, createComponent(DropdownSelect, {
6960
+ var _el$50 = _tmpl$8$2(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling, _el$53 = _el$52.nextSibling, _el$54 = _el$53.firstChild, _el$55 = _el$53.nextSibling;
6961
+ insert(_el$51, () => currentTab()?.title || "No active page");
6962
+ insert(_el$52, () => currentTab()?.url || "Open a page to save it here.");
6963
+ insert(_el$53, createComponent(DropdownSelect, {
6462
6964
  "class": "bookmark-select",
6463
6965
  get value() {
6464
6966
  return selectedFolderId();
@@ -6468,29 +6970,29 @@ ${contextBlock}` : contextBlock);
6468
6970
  },
6469
6971
  ariaLabel: "Bookmark folder",
6470
6972
  onChange: (value) => setSelectedFolderId(value)
6471
- }), _el$53);
6472
- _el$53.$$click = () => void handleSaveBookmark();
6473
- _el$54.$$input = (e) => setBookmarkNote(e.currentTarget.value);
6474
- createRenderEffect(() => _el$53.disabled = !currentTab()?.url);
6475
- createRenderEffect(() => _el$54.value = bookmarkNote());
6476
- return _el$49;
6973
+ }), _el$54);
6974
+ _el$54.$$click = () => void handleSaveBookmark();
6975
+ _el$55.$$input = (e) => setBookmarkNote(e.currentTarget.value);
6976
+ createRenderEffect(() => _el$54.disabled = !currentTab()?.url);
6977
+ createRenderEffect(() => _el$55.value = bookmarkNote());
6978
+ return _el$50;
6477
6979
  }
6478
6980
  }), null);
6479
- _el$55.addEventListener("submit", handleCreateFolder);
6480
- _el$57.$$input = (e) => setNewFolderName(e.currentTarget.value);
6481
- _el$58.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
6482
- insert(_el$60, createComponent(Show, {
6981
+ _el$56.addEventListener("submit", handleCreateFolder);
6982
+ _el$58.$$input = (e) => setNewFolderName(e.currentTarget.value);
6983
+ _el$59.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
6984
+ insert(_el$61, createComponent(Show, {
6483
6985
  get when() {
6484
6986
  return filteredGroupedBookmarks().length > 0;
6485
6987
  },
6486
6988
  get fallback() {
6487
6989
  return (() => {
6488
- var _el$121 = _tmpl$31$1();
6489
- insert(_el$121, (() => {
6990
+ var _el$128 = _tmpl$33$1();
6991
+ insert(_el$128, (() => {
6490
6992
  var _c$5 = memo(() => !!normalizedBookmarkSearch());
6491
6993
  return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
6492
6994
  })());
6493
- return _el$121;
6995
+ return _el$128;
6494
6996
  })();
6495
6997
  },
6496
6998
  get children() {
@@ -6499,100 +7001,100 @@ ${contextBlock}` : contextBlock);
6499
7001
  return filteredGroupedBookmarks();
6500
7002
  },
6501
7003
  children: (folder) => (() => {
6502
- var _el$122 = _tmpl$38$1(), _el$123 = _el$122.firstChild, _el$124 = _el$123.firstChild, _el$125 = _el$124.firstChild, _el$126 = _el$125.nextSibling, _el$127 = _el$126.firstChild, _el$128 = _el$127.nextSibling, _el$129 = _el$128.firstChild;
6503
- _el$123.$$keydown = (e) => {
7004
+ var _el$129 = _tmpl$40$1(), _el$130 = _el$129.firstChild, _el$131 = _el$130.firstChild, _el$132 = _el$131.firstChild, _el$133 = _el$132.nextSibling, _el$134 = _el$133.firstChild, _el$135 = _el$134.nextSibling, _el$136 = _el$135.firstChild;
7005
+ _el$130.$$keydown = (e) => {
6504
7006
  if (e.key === "Enter" || e.key === " ") {
6505
7007
  e.preventDefault();
6506
7008
  toggleFolderExpanded(folder.id);
6507
7009
  }
6508
7010
  };
6509
- _el$123.$$click = () => toggleFolderExpanded(folder.id);
6510
- insert(_el$127, () => folder.name);
6511
- insert(_el$128, () => folder.items.length, _el$129);
6512
- insert(_el$126, createComponent(Show, {
7011
+ _el$130.$$click = () => toggleFolderExpanded(folder.id);
7012
+ insert(_el$134, () => folder.name);
7013
+ insert(_el$135, () => folder.items.length, _el$136);
7014
+ insert(_el$133, createComponent(Show, {
6513
7015
  get when() {
6514
7016
  return folder.summary;
6515
7017
  },
6516
7018
  get children() {
6517
- var _el$130 = _tmpl$32$1();
6518
- insert(_el$130, () => folder.summary);
6519
- return _el$130;
7019
+ var _el$137 = _tmpl$34$1();
7020
+ insert(_el$137, () => folder.summary);
7021
+ return _el$137;
6520
7022
  }
6521
7023
  }), null);
6522
- insert(_el$123, createComponent(Show, {
7024
+ insert(_el$130, createComponent(Show, {
6523
7025
  get when() {
6524
7026
  return folder.id !== UNSORTED_FOLDER.id;
6525
7027
  },
6526
7028
  get children() {
6527
- var _el$131 = _tmpl$33$1(), _el$132 = _el$131.firstChild, _el$133 = _el$132.nextSibling;
6528
- _el$132.$$click = (e) => {
7029
+ var _el$138 = _tmpl$35$1(), _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling;
7030
+ _el$139.$$click = (e) => {
6529
7031
  e.stopPropagation();
6530
7032
  setEditingFolderId(folder.id);
6531
7033
  setEditingFolderName(folder.name);
6532
7034
  setEditingFolderSummary(folder.summary || "");
6533
7035
  };
6534
- _el$133.$$click = (e) => {
7036
+ _el$140.$$click = (e) => {
6535
7037
  e.stopPropagation();
6536
7038
  setDeletingFolderId(folder.id);
6537
7039
  };
6538
- return _el$131;
7040
+ return _el$138;
6539
7041
  }
6540
7042
  }), null);
6541
- insert(_el$122, createComponent(Show, {
7043
+ insert(_el$129, createComponent(Show, {
6542
7044
  get when() {
6543
7045
  return deletingFolderId() === folder.id;
6544
7046
  },
6545
7047
  get children() {
6546
- var _el$134 = _tmpl$35$1(), _el$135 = _el$134.firstChild, _el$136 = _el$135.firstChild, _el$138 = _el$136.nextSibling;
6547
- _el$138.nextSibling;
6548
- var _el$139 = _el$135.nextSibling, _el$141 = _el$139.firstChild, _el$142 = _el$141.nextSibling;
6549
- insert(_el$135, () => folder.name, _el$138);
6550
- insert(_el$135, (() => {
7048
+ var _el$141 = _tmpl$37$1(), _el$142 = _el$141.firstChild, _el$143 = _el$142.firstChild, _el$145 = _el$143.nextSibling;
7049
+ _el$145.nextSibling;
7050
+ var _el$146 = _el$142.nextSibling, _el$148 = _el$146.firstChild, _el$149 = _el$148.nextSibling;
7051
+ insert(_el$142, () => folder.name, _el$145);
7052
+ insert(_el$142, (() => {
6551
7053
  var _c$6 = memo(() => folder.items.length > 0);
6552
7054
  return () => _c$6() ? ` This folder has ${folder.items.length} bookmark${folder.items.length === 1 ? "" : "s"}.` : "";
6553
7055
  })(), null);
6554
- insert(_el$139, createComponent(Show, {
7056
+ insert(_el$146, createComponent(Show, {
6555
7057
  get when() {
6556
7058
  return folder.items.length > 0;
6557
7059
  },
6558
7060
  get children() {
6559
- var _el$140 = _tmpl$34$1();
6560
- _el$140.$$click = () => void handleRemoveFolder(folder.id, false);
6561
- return _el$140;
7061
+ var _el$147 = _tmpl$36$1();
7062
+ _el$147.$$click = () => void handleRemoveFolder(folder.id, false);
7063
+ return _el$147;
6562
7064
  }
6563
- }), _el$141);
6564
- _el$141.$$click = () => void handleRemoveFolder(folder.id, true);
6565
- insert(_el$141, () => folder.items.length > 0 ? "Delete all" : "Delete folder");
6566
- _el$142.$$click = () => setDeletingFolderId(null);
6567
- return _el$134;
7065
+ }), _el$148);
7066
+ _el$148.$$click = () => void handleRemoveFolder(folder.id, true);
7067
+ insert(_el$148, () => folder.items.length > 0 ? "Delete all" : "Delete folder");
7068
+ _el$149.$$click = () => setDeletingFolderId(null);
7069
+ return _el$141;
6568
7070
  }
6569
7071
  }), null);
6570
- insert(_el$122, createComponent(Show, {
7072
+ insert(_el$129, createComponent(Show, {
6571
7073
  get when() {
6572
7074
  return editingFolderId() === folder.id;
6573
7075
  },
6574
7076
  get children() {
6575
- var _el$143 = _tmpl$36$1(), _el$144 = _el$143.firstChild, _el$145 = _el$144.firstChild, _el$146 = _el$145.nextSibling, _el$147 = _el$144.nextSibling, _el$148 = _el$147.nextSibling;
6576
- _el$145.$$input = (e) => setEditingFolderName(e.currentTarget.value);
6577
- _el$146.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
6578
- _el$147.$$click = () => void handleRenameFolder(folder.id);
6579
- _el$148.$$click = () => {
7077
+ var _el$150 = _tmpl$38$1(), _el$151 = _el$150.firstChild, _el$152 = _el$151.firstChild, _el$153 = _el$152.nextSibling, _el$154 = _el$151.nextSibling, _el$155 = _el$154.nextSibling;
7078
+ _el$152.$$input = (e) => setEditingFolderName(e.currentTarget.value);
7079
+ _el$153.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
7080
+ _el$154.$$click = () => void handleRenameFolder(folder.id);
7081
+ _el$155.$$click = () => {
6580
7082
  setEditingFolderId(null);
6581
7083
  setEditingFolderName("");
6582
7084
  setEditingFolderSummary("");
6583
7085
  };
6584
- createRenderEffect(() => _el$147.disabled = !editingFolderName().trim());
6585
- createRenderEffect(() => _el$145.value = editingFolderName());
6586
- createRenderEffect(() => _el$146.value = editingFolderSummary());
6587
- return _el$143;
7086
+ createRenderEffect(() => _el$154.disabled = !editingFolderName().trim());
7087
+ createRenderEffect(() => _el$152.value = editingFolderName());
7088
+ createRenderEffect(() => _el$153.value = editingFolderSummary());
7089
+ return _el$150;
6588
7090
  }
6589
7091
  }), null);
6590
- insert(_el$122, createComponent(Show, {
7092
+ insert(_el$129, createComponent(Show, {
6591
7093
  get when() {
6592
7094
  return isFolderExpanded(folder.id);
6593
7095
  },
6594
7096
  get fallback() {
6595
- return _tmpl$39();
7097
+ return _tmpl$41$1();
6596
7098
  },
6597
7099
  get children() {
6598
7100
  return createComponent(Show, {
@@ -6600,116 +7102,116 @@ ${contextBlock}` : contextBlock);
6600
7102
  return folder.items.length > 0;
6601
7103
  },
6602
7104
  get fallback() {
6603
- return _tmpl$40();
7105
+ return _tmpl$42$1();
6604
7106
  },
6605
7107
  get children() {
6606
- var _el$149 = _tmpl$37$1();
6607
- insert(_el$149, createComponent(For, {
7108
+ var _el$156 = _tmpl$39$1();
7109
+ insert(_el$156, createComponent(For, {
6608
7110
  get each() {
6609
7111
  return folder.items;
6610
7112
  },
6611
7113
  children: (bookmark) => (() => {
6612
- var _el$152 = _tmpl$42(), _el$153 = _el$152.firstChild, _el$154 = _el$153.firstChild, _el$155 = _el$154.nextSibling, _el$157 = _el$153.nextSibling, _el$158 = _el$157.firstChild, _el$159 = _el$158.nextSibling;
6613
- _el$153.$$click = () => void createTab(bookmark.url);
6614
- insert(_el$154, () => bookmark.title || bookmark.url);
6615
- insert(_el$155, () => bookmark.url);
6616
- insert(_el$152, createComponent(Show, {
7114
+ var _el$159 = _tmpl$44(), _el$160 = _el$159.firstChild, _el$161 = _el$160.firstChild, _el$162 = _el$161.nextSibling, _el$164 = _el$160.nextSibling, _el$165 = _el$164.firstChild, _el$166 = _el$165.nextSibling;
7115
+ _el$160.$$click = () => void createTab(bookmark.url);
7116
+ insert(_el$161, () => bookmark.title || bookmark.url);
7117
+ insert(_el$162, () => bookmark.url);
7118
+ insert(_el$159, createComponent(Show, {
6617
7119
  get when() {
6618
7120
  return bookmark.note;
6619
7121
  },
6620
7122
  get children() {
6621
- var _el$156 = _tmpl$41();
6622
- insert(_el$156, () => bookmark.note);
6623
- return _el$156;
7123
+ var _el$163 = _tmpl$43();
7124
+ insert(_el$163, () => bookmark.note);
7125
+ return _el$163;
6624
7126
  }
6625
- }), _el$157);
6626
- insert(_el$158, () => formatBookmarkDate(bookmark.savedAt));
6627
- _el$159.$$click = () => void removeBookmark(bookmark.id);
6628
- createRenderEffect(() => setAttribute(_el$152, "data-bookmark-id", bookmark.id));
6629
- return _el$152;
7127
+ }), _el$164);
7128
+ insert(_el$165, () => formatBookmarkDate(bookmark.savedAt));
7129
+ _el$166.$$click = () => void removeBookmark(bookmark.id);
7130
+ createRenderEffect(() => setAttribute(_el$159, "data-bookmark-id", bookmark.id));
7131
+ return _el$159;
6630
7132
  })()
6631
7133
  }));
6632
- return _el$149;
7134
+ return _el$156;
6633
7135
  }
6634
7136
  });
6635
7137
  }
6636
7138
  }), null);
6637
- createRenderEffect(() => _el$125.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
6638
- return _el$122;
7139
+ createRenderEffect(() => _el$132.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
7140
+ return _el$129;
6639
7141
  })()
6640
7142
  });
6641
7143
  }
6642
7144
  }));
6643
7145
  createRenderEffect((_p$) => {
6644
7146
  var _v$ = !!bookmarkSaveExpanded(), _v$2 = !newFolderName().trim();
6645
- _v$ !== _p$.e && _el$48.classList.toggle("expanded", _p$.e = _v$);
6646
- _v$2 !== _p$.t && (_el$59.disabled = _p$.t = _v$2);
7147
+ _v$ !== _p$.e && _el$49.classList.toggle("expanded", _p$.e = _v$);
7148
+ _v$2 !== _p$.t && (_el$60.disabled = _p$.t = _v$2);
6647
7149
  return _p$;
6648
7150
  }, {
6649
7151
  e: void 0,
6650
7152
  t: void 0
6651
7153
  });
6652
- createRenderEffect(() => _el$44.value = bookmarkSearchQuery());
6653
- createRenderEffect(() => _el$57.value = newFolderName());
6654
- createRenderEffect(() => _el$58.value = newFolderSummary());
6655
- return _el$38;
7154
+ createRenderEffect(() => _el$45.value = bookmarkSearchQuery());
7155
+ createRenderEffect(() => _el$58.value = newFolderName());
7156
+ createRenderEffect(() => _el$59.value = newFolderSummary());
7157
+ return _el$39;
6656
7158
  }
6657
- }), _el$86);
6658
- insert(_el$23, createComponent(Show, {
7159
+ }), _el$93);
7160
+ insert(_el$24, createComponent(Show, {
6659
7161
  get when() {
6660
7162
  return sidebarTab() === "checkpoints";
6661
7163
  },
6662
7164
  get children() {
6663
- var _el$61 = _tmpl$1$2(), _el$62 = _el$61.firstChild, _el$63 = _el$62.firstChild, _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling, _el$66 = _el$62.nextSibling, _el$67 = _el$66.firstChild, _el$68 = _el$67.firstChild, _el$69 = _el$68.nextSibling;
6664
- _el$67.nextSibling;
6665
- insert(_el$65, (() => {
7165
+ var _el$62 = _tmpl$1$2(), _el$63 = _el$62.firstChild, _el$64 = _el$63.firstChild, _el$65 = _el$64.firstChild, _el$66 = _el$65.nextSibling, _el$67 = _el$63.nextSibling, _el$68 = _el$67.firstChild, _el$69 = _el$68.firstChild, _el$70 = _el$69.nextSibling;
7166
+ _el$68.nextSibling;
7167
+ insert(_el$66, (() => {
6666
7168
  var _c$3 = memo(() => recentCheckpoints().length > 0);
6667
7169
  return () => _c$3() ? `${recentCheckpoints().length} saved snapshots` : "Save and restore session snapshots";
6668
7170
  })());
6669
- _el$68.$$input = (e) => setCheckpointName(e.currentTarget.value);
6670
- _el$69.$$click = async () => {
7171
+ _el$69.$$input = (e) => setCheckpointName(e.currentTarget.value);
7172
+ _el$70.$$click = async () => {
6671
7173
  const name = checkpointName().trim();
6672
7174
  await createCheckpoint(name || void 0);
6673
7175
  setCheckpointName("");
6674
7176
  };
6675
- insert(_el$66, createComponent(Show, {
7177
+ insert(_el$67, createComponent(Show, {
6676
7178
  get when() {
6677
7179
  return recentCheckpoints().length > 0;
6678
7180
  },
6679
7181
  get fallback() {
6680
- return _tmpl$43();
7182
+ return _tmpl$45();
6681
7183
  },
6682
7184
  get children() {
6683
- var _el$71 = _tmpl$0$2();
6684
- insert(_el$71, createComponent(For, {
7185
+ var _el$72 = _tmpl$0$2();
7186
+ insert(_el$72, createComponent(For, {
6685
7187
  get each() {
6686
7188
  return recentCheckpoints();
6687
7189
  },
6688
7190
  children: (checkpoint, i) => (() => {
6689
- var _el$161 = _tmpl$45(), _el$162 = _el$161.firstChild, _el$163 = _el$162.firstChild, _el$165 = _el$162.nextSibling, _el$166 = _el$165.firstChild, _el$167 = _el$166.nextSibling, _el$168 = _el$167.nextSibling;
6690
- insert(_el$162, createComponent(Show, {
7191
+ var _el$168 = _tmpl$47(), _el$169 = _el$168.firstChild, _el$170 = _el$169.firstChild, _el$172 = _el$169.nextSibling, _el$173 = _el$172.firstChild, _el$174 = _el$173.nextSibling, _el$175 = _el$174.nextSibling;
7192
+ insert(_el$169, createComponent(Show, {
6691
7193
  get when() {
6692
7194
  return i() < recentCheckpoints().length - 1;
6693
7195
  },
6694
7196
  get children() {
6695
- return _tmpl$44();
7197
+ return _tmpl$46();
6696
7198
  }
6697
7199
  }), null);
6698
- insert(_el$166, () => checkpoint.name);
6699
- insert(_el$167, () => new Date(checkpoint.createdAt).toLocaleString());
6700
- _el$168.$$click = () => void restoreCheckpoint(checkpoint.id);
6701
- createRenderEffect(() => _el$163.classList.toggle("latest", !!(i() === 0)));
6702
- return _el$161;
7200
+ insert(_el$173, () => checkpoint.name);
7201
+ insert(_el$174, () => new Date(checkpoint.createdAt).toLocaleString());
7202
+ _el$175.$$click = () => void restoreCheckpoint(checkpoint.id);
7203
+ createRenderEffect(() => _el$170.classList.toggle("latest", !!(i() === 0)));
7204
+ return _el$168;
6703
7205
  })()
6704
7206
  }));
6705
- return _el$71;
7207
+ return _el$72;
6706
7208
  }
6707
7209
  }), null);
6708
- createRenderEffect(() => _el$68.value = checkpointName());
6709
- return _el$61;
7210
+ createRenderEffect(() => _el$69.value = checkpointName());
7211
+ return _el$62;
6710
7212
  }
6711
- }), _el$86);
6712
- insert(_el$23, createComponent(Show, {
7213
+ }), _el$93);
7214
+ insert(_el$24, createComponent(Show, {
6713
7215
  get when() {
6714
7216
  return sidebarTab() === "automation";
6715
7217
  },
@@ -6718,8 +7220,41 @@ ${contextBlock}` : contextBlock);
6718
7220
  onRun: () => setSidebarTab("supervisor")
6719
7221
  });
6720
7222
  }
6721
- }), _el$86);
6722
- insert(_el$23, createComponent(Show, {
7223
+ }), _el$93);
7224
+ insert(_el$24, createComponent(Show, {
7225
+ get when() {
7226
+ return sidebarTab() === "history";
7227
+ },
7228
+ get children() {
7229
+ var _el$73 = _tmpl$11$2(), _el$74 = _el$73.firstChild, _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling, _el$77 = _el$74.nextSibling;
7230
+ _el$76.$$click = async () => {
7231
+ await history.clear();
7232
+ };
7233
+ insert(_el$77, createComponent(For, {
7234
+ get each() {
7235
+ return history.historyState().entries;
7236
+ },
7237
+ children: (entry) => (() => {
7238
+ var _el$176 = _tmpl$48(), _el$177 = _el$176.firstChild, _el$178 = _el$177.nextSibling, _el$179 = _el$178.nextSibling;
7239
+ _el$176.$$click = () => createTab(entry.url);
7240
+ insert(_el$177, () => entry.title || entry.url);
7241
+ insert(_el$178, () => entry.url);
7242
+ insert(_el$179, () => new Date(entry.visitedAt).toLocaleString());
7243
+ return _el$176;
7244
+ })()
7245
+ }), null);
7246
+ insert(_el$77, createComponent(Show, {
7247
+ get when() {
7248
+ return history.historyState().entries.length === 0;
7249
+ },
7250
+ get children() {
7251
+ return _tmpl$10$2();
7252
+ }
7253
+ }), null);
7254
+ return _el$73;
7255
+ }
7256
+ }), _el$93);
7257
+ insert(_el$24, createComponent(Show, {
6723
7258
  get when() {
6724
7259
  return sidebarTab() === "chat";
6725
7260
  },
@@ -6729,23 +7264,23 @@ ${contextBlock}` : contextBlock);
6729
7264
  return !isPremium();
6730
7265
  },
6731
7266
  get children() {
6732
- var _el$72 = _tmpl$10$2(), _el$73 = _el$72.firstChild, _el$74 = _el$73.nextSibling, _el$75 = _el$74.nextSibling, _el$76 = _el$75.firstChild, _el$77 = _el$76.nextSibling;
6733
- _el$76.$$click = () => openPremiumCheckout("chat_banner_clicked");
6734
- _el$77.$$click = openPremiumDetails;
6735
- return _el$72;
7267
+ var _el$79 = _tmpl$12$2(), _el$80 = _el$79.firstChild, _el$81 = _el$80.nextSibling, _el$82 = _el$81.nextSibling, _el$83 = _el$82.firstChild, _el$84 = _el$83.nextSibling;
7268
+ _el$83.$$click = () => openPremiumCheckout("chat_banner_clicked");
7269
+ _el$84.$$click = openPremiumDetails;
7270
+ return _el$79;
6736
7271
  }
6737
7272
  }), createComponent(For, {
6738
7273
  get each() {
6739
7274
  return messages2();
6740
7275
  },
6741
7276
  children: (msg) => (() => {
6742
- var _el$169 = _tmpl$46();
6743
- insert(_el$169, createComponent(MarkdownMessage, {
7277
+ var _el$180 = _tmpl$49();
7278
+ insert(_el$180, createComponent(MarkdownMessage, {
6744
7279
  get content() {
6745
7280
  return msg.content;
6746
7281
  }
6747
7282
  }), null);
6748
- insert(_el$169, createComponent(Show, {
7283
+ insert(_el$180, createComponent(Show, {
6749
7284
  get when() {
6750
7285
  return memo(() => msg.role === "assistant")() ? getPremiumPromptKind(msg.content) : null;
6751
7286
  },
@@ -6758,31 +7293,31 @@ ${contextBlock}` : contextBlock);
6758
7293
  onOpenSettings: openPremiumDetails
6759
7294
  })
6760
7295
  }), null);
6761
- createRenderEffect(() => className(_el$169, `message message-${msg.role}`));
6762
- return _el$169;
7296
+ createRenderEffect(() => className(_el$180, `message message-${msg.role}`));
7297
+ return _el$180;
6763
7298
  })()
6764
7299
  }), createComponent(Show, {
6765
7300
  get when() {
6766
7301
  return isStreaming2();
6767
7302
  },
6768
7303
  get children() {
6769
- var _el$78 = _tmpl$13$1(), _el$79 = _el$78.firstChild;
6770
- insert(_el$79, createComponent(Show, {
7304
+ var _el$85 = _tmpl$15$1(), _el$86 = _el$85.firstChild;
7305
+ insert(_el$86, createComponent(Show, {
6771
7306
  get when() {
6772
7307
  return hasFirstChunk2();
6773
7308
  },
6774
7309
  get fallback() {
6775
- return _tmpl$47();
7310
+ return _tmpl$50();
6776
7311
  },
6777
7312
  get children() {
6778
- var _el$80 = _tmpl$12$2(), _el$81 = _el$80.firstChild, _el$82 = _el$81.firstChild;
6779
- _el$82.nextSibling;
6780
- insert(_el$80, createComponent(MarkdownMessage, {
7313
+ var _el$87 = _tmpl$14$1(), _el$88 = _el$87.firstChild, _el$89 = _el$88.firstChild;
7314
+ _el$89.nextSibling;
7315
+ insert(_el$87, createComponent(MarkdownMessage, {
6781
7316
  get content() {
6782
7317
  return streamingText2();
6783
7318
  }
6784
- }), _el$81);
6785
- insert(_el$80, createComponent(Show, {
7319
+ }), _el$88);
7320
+ insert(_el$87, createComponent(Show, {
6786
7321
  get when() {
6787
7322
  return getPremiumPromptKind(streamingText2());
6788
7323
  },
@@ -6794,21 +7329,21 @@ ${contextBlock}` : contextBlock);
6794
7329
  onStartTrial: () => openPremiumCheckout(kind() === "premium_gate" ? "premium_gate_clicked" : "iteration_limit_clicked"),
6795
7330
  onOpenSettings: openPremiumDetails
6796
7331
  })
6797
- }), _el$81);
6798
- insert(_el$81, createComponent(Show, {
7332
+ }), _el$88);
7333
+ insert(_el$88, createComponent(Show, {
6799
7334
  get when() {
6800
7335
  return elapsedSeconds() > 0;
6801
7336
  },
6802
7337
  get children() {
6803
- var _el$84 = _tmpl$11$2();
6804
- insert(_el$84, () => ` • ${elapsedSeconds()}s`);
6805
- return _el$84;
7338
+ var _el$91 = _tmpl$13$1();
7339
+ insert(_el$91, () => ` • ${elapsedSeconds()}s`);
7340
+ return _el$91;
6806
7341
  }
6807
7342
  }), null);
6808
- return _el$80;
7343
+ return _el$87;
6809
7344
  }
6810
7345
  }));
6811
- return _el$78;
7346
+ return _el$85;
6812
7347
  }
6813
7348
  }), createComponent(Show, {
6814
7349
  get when() {
@@ -6820,22 +7355,22 @@ ${contextBlock}` : contextBlock);
6820
7355
  return runtimeState2().supervisor.pendingApprovals;
6821
7356
  },
6822
7357
  children: (approval) => (() => {
6823
- var _el$171 = _tmpl$49(), _el$172 = _el$171.firstChild, _el$173 = _el$172.nextSibling, _el$174 = _el$173.firstChild, _el$175 = _el$174.firstChild, _el$176 = _el$175.nextSibling, _el$178 = _el$174.nextSibling, _el$179 = _el$178.nextSibling, _el$180 = _el$179.firstChild, _el$181 = _el$180.nextSibling;
6824
- insert(_el$176, () => approval.name);
6825
- insert(_el$173, createComponent(Show, {
7358
+ var _el$182 = _tmpl$52(), _el$183 = _el$182.firstChild, _el$184 = _el$183.nextSibling, _el$185 = _el$184.firstChild, _el$186 = _el$185.firstChild, _el$187 = _el$186.nextSibling, _el$189 = _el$185.nextSibling, _el$190 = _el$189.nextSibling, _el$191 = _el$190.firstChild, _el$192 = _el$191.nextSibling;
7359
+ insert(_el$187, () => approval.name);
7360
+ insert(_el$184, createComponent(Show, {
6826
7361
  get when() {
6827
7362
  return approval.argsSummary;
6828
7363
  },
6829
7364
  get children() {
6830
- var _el$177 = _tmpl$48();
6831
- insert(_el$177, () => approval.argsSummary);
6832
- return _el$177;
7365
+ var _el$188 = _tmpl$51();
7366
+ insert(_el$188, () => approval.argsSummary);
7367
+ return _el$188;
6833
7368
  }
6834
- }), _el$178);
6835
- insert(_el$178, () => approval.reason);
6836
- _el$180.$$click = () => void resolveApproval(approval.id, true);
6837
- _el$181.$$click = () => void resolveApproval(approval.id, false);
6838
- return _el$171;
7369
+ }), _el$189);
7370
+ insert(_el$189, () => approval.reason);
7371
+ _el$191.$$click = () => void resolveApproval(approval.id, true);
7372
+ _el$192.$$click = () => void resolveApproval(approval.id, false);
7373
+ return _el$182;
6839
7374
  })()
6840
7375
  });
6841
7376
  }
@@ -6844,13 +7379,13 @@ ${contextBlock}` : contextBlock);
6844
7379
  return memo(() => messages2().length === 0)() && !isStreaming2();
6845
7380
  },
6846
7381
  get children() {
6847
- return _tmpl$14$1();
7382
+ return _tmpl$16$1();
6848
7383
  }
6849
7384
  })];
6850
7385
  }
6851
- }), _el$86);
7386
+ }), _el$93);
6852
7387
  var _ref$ = messagesEndRef;
6853
- typeof _ref$ === "function" ? use(_ref$, _el$86) : messagesEndRef = _el$86;
7388
+ typeof _ref$ === "function" ? use(_ref$, _el$93) : messagesEndRef = _el$93;
6854
7389
  insert(_el$9, createComponent(Show, {
6855
7390
  get when() {
6856
7391
  return sidebarTab() === "chat";
@@ -6861,125 +7396,125 @@ ${contextBlock}` : contextBlock);
6861
7396
  return isStreaming2() || messages2().length > 0;
6862
7397
  },
6863
7398
  get children() {
6864
- var _el$87 = _tmpl$17$1();
6865
- insert(_el$87, createComponent(Show, {
7399
+ var _el$94 = _tmpl$19$1();
7400
+ insert(_el$94, createComponent(Show, {
6866
7401
  get when() {
6867
7402
  return isStreaming2();
6868
7403
  },
6869
7404
  get children() {
6870
- var _el$88 = _tmpl$15$1();
6871
- _el$88.$$click = () => cancel();
6872
- return _el$88;
7405
+ var _el$95 = _tmpl$17$1();
7406
+ _el$95.$$click = () => cancel();
7407
+ return _el$95;
6873
7408
  }
6874
7409
  }), null);
6875
- insert(_el$87, createComponent(Show, {
7410
+ insert(_el$94, createComponent(Show, {
6876
7411
  get when() {
6877
7412
  return memo(() => !!!isStreaming2())() && messages2().length > 0;
6878
7413
  },
6879
7414
  get children() {
6880
- var _el$89 = _tmpl$16$1();
6881
- _el$89.$$click = handleRetry;
6882
- return _el$89;
7415
+ var _el$96 = _tmpl$18$1();
7416
+ _el$96.$$click = handleRetry;
7417
+ return _el$96;
6883
7418
  }
6884
7419
  }), null);
6885
- return _el$87;
7420
+ return _el$94;
6886
7421
  }
6887
7422
  }), createComponent(Show, {
6888
7423
  get when() {
6889
7424
  return highlightCount() > 0;
6890
7425
  },
6891
7426
  get children() {
6892
- var _el$90 = _tmpl$18$1(), _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling;
6893
- _el$92.firstChild;
6894
- var _el$94 = _el$92.nextSibling;
6895
- _el$91.$$click = () => void scrollToHighlight(highlightIndex() - 1);
6896
- _el$92.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
6897
- insert(_el$92, (() => {
7427
+ var _el$97 = _tmpl$20$1(), _el$98 = _el$97.firstChild, _el$99 = _el$98.nextSibling;
7428
+ _el$99.firstChild;
7429
+ var _el$101 = _el$99.nextSibling;
7430
+ _el$98.$$click = () => void scrollToHighlight(highlightIndex() - 1);
7431
+ _el$99.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
7432
+ insert(_el$99, (() => {
6898
7433
  var _c$4 = memo(() => highlightIndex() >= 0);
6899
7434
  return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
6900
7435
  })(), null);
6901
- _el$94.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
7436
+ _el$101.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
6902
7437
  createRenderEffect((_p$) => {
6903
7438
  var _v$3 = highlightIndex() <= 0, _v$4 = highlightIndex() >= highlightCount() - 1;
6904
- _v$3 !== _p$.e && (_el$91.disabled = _p$.e = _v$3);
6905
- _v$4 !== _p$.t && (_el$94.disabled = _p$.t = _v$4);
7439
+ _v$3 !== _p$.e && (_el$98.disabled = _p$.e = _v$3);
7440
+ _v$4 !== _p$.t && (_el$101.disabled = _p$.t = _v$4);
6906
7441
  return _p$;
6907
7442
  }, {
6908
7443
  e: void 0,
6909
7444
  t: void 0
6910
7445
  });
6911
- return _el$90;
7446
+ return _el$97;
6912
7447
  }
6913
7448
  }), createComponent(Show, {
6914
7449
  get when() {
6915
7450
  return queueNotice2() !== null || pendingQueryCount() > 0;
6916
7451
  },
6917
7452
  get children() {
6918
- var _el$95 = _tmpl$21$1(), _el$96 = _el$95.firstChild, _el$97 = _el$96.firstChild;
6919
- insert(_el$97, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
6920
- insert(_el$96, createComponent(Show, {
7453
+ var _el$102 = _tmpl$23$1(), _el$103 = _el$102.firstChild, _el$104 = _el$103.firstChild;
7454
+ insert(_el$104, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
7455
+ insert(_el$103, createComponent(Show, {
6921
7456
  get when() {
6922
7457
  return pendingQueryCount() > 0;
6923
7458
  },
6924
7459
  get children() {
6925
- var _el$98 = _tmpl$19$1();
6926
- _el$98.$$click = () => clearPendingQueries();
6927
- return _el$98;
7460
+ var _el$105 = _tmpl$21$1();
7461
+ _el$105.$$click = () => clearPendingQueries();
7462
+ return _el$105;
6928
7463
  }
6929
7464
  }), null);
6930
- insert(_el$95, createComponent(Show, {
7465
+ insert(_el$102, createComponent(Show, {
6931
7466
  get when() {
6932
7467
  return pendingQueries2().length > 0;
6933
7468
  },
6934
7469
  get children() {
6935
- var _el$99 = _tmpl$20$1();
6936
- insert(_el$99, createComponent(For, {
7470
+ var _el$106 = _tmpl$22$1();
7471
+ insert(_el$106, createComponent(For, {
6937
7472
  get each() {
6938
7473
  return pendingQueries2();
6939
7474
  },
6940
7475
  children: (pendingPrompt, index) => (() => {
6941
- var _el$182 = _tmpl$50(), _el$183 = _el$182.firstChild, _el$184 = _el$183.nextSibling;
6942
- setAttribute(_el$183, "title", pendingPrompt);
6943
- insert(_el$183, pendingPrompt);
6944
- _el$184.$$click = () => removePendingQuery(index());
6945
- createRenderEffect(() => setAttribute(_el$184, "aria-label", `Remove queued prompt ${index() + 1}`));
6946
- return _el$182;
7476
+ var _el$193 = _tmpl$53(), _el$194 = _el$193.firstChild, _el$195 = _el$194.nextSibling;
7477
+ setAttribute(_el$194, "title", pendingPrompt);
7478
+ insert(_el$194, pendingPrompt);
7479
+ _el$195.$$click = () => removePendingQuery(index());
7480
+ createRenderEffect(() => setAttribute(_el$195, "aria-label", `Remove queued prompt ${index() + 1}`));
7481
+ return _el$193;
6947
7482
  })()
6948
7483
  }));
6949
- return _el$99;
7484
+ return _el$106;
6950
7485
  }
6951
7486
  }), null);
6952
- return _el$95;
7487
+ return _el$102;
6953
7488
  }
6954
7489
  }), (() => {
6955
- var _el$100 = _tmpl$22$1(), _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling;
6956
- _el$101.$$keydown = (e) => {
7490
+ var _el$107 = _tmpl$24$1(), _el$108 = _el$107.firstChild, _el$109 = _el$108.nextSibling;
7491
+ _el$108.$$keydown = (e) => {
6957
7492
  if (e.key === "Enter" && !e.shiftKey) {
6958
7493
  e.preventDefault();
6959
7494
  void handleChatSend();
6960
7495
  }
6961
7496
  };
6962
- _el$101.$$input = (e) => setChatInput(e.currentTarget.value);
7497
+ _el$108.$$input = (e) => setChatInput(e.currentTarget.value);
6963
7498
  var _ref$2 = chatInputRef;
6964
- typeof _ref$2 === "function" ? use(_ref$2, _el$101) : chatInputRef = _el$101;
6965
- _el$102.$$click = () => void handleChatSend();
6966
- insert(_el$102, () => isStreaming2() ? "Queue" : "Send");
7499
+ typeof _ref$2 === "function" ? use(_ref$2, _el$108) : chatInputRef = _el$108;
7500
+ _el$109.$$click = () => void handleChatSend();
7501
+ insert(_el$109, () => isStreaming2() ? "Queue" : "Send");
6967
7502
  createRenderEffect((_p$) => {
6968
7503
  var _v$5 = isStreaming2() ? "Send now to queue the next prompt..." : "Ask anything...", _v$6 = !chatInput().trim();
6969
- _v$5 !== _p$.e && setAttribute(_el$101, "placeholder", _p$.e = _v$5);
6970
- _v$6 !== _p$.t && (_el$102.disabled = _p$.t = _v$6);
7504
+ _v$5 !== _p$.e && setAttribute(_el$108, "placeholder", _p$.e = _v$5);
7505
+ _v$6 !== _p$.t && (_el$109.disabled = _p$.t = _v$6);
6971
7506
  return _p$;
6972
7507
  }, {
6973
7508
  e: void 0,
6974
7509
  t: void 0
6975
7510
  });
6976
- createRenderEffect(() => _el$101.value = chatInput());
6977
- return _el$100;
7511
+ createRenderEffect(() => _el$108.value = chatInput());
7512
+ return _el$107;
6978
7513
  })()];
6979
7514
  }
6980
7515
  }), null);
6981
7516
  createRenderEffect((_p$) => {
6982
- var _v$7 = `${sidebarWidth2()}px`, _v$8 = !!isDragging(), _v$9 = !!(sidebarTab() === "supervisor"), _v$0 = sidebarTab() === "supervisor", _v$1 = !!(sidebarTab() === "bookmarks"), _v$10 = sidebarTab() === "bookmarks", _v$11 = !!(sidebarTab() === "checkpoints"), _v$12 = sidebarTab() === "checkpoints", _v$13 = !!(sidebarTab() === "chat"), _v$14 = sidebarTab() === "chat", _v$15 = !!(sidebarTab() === "automation"), _v$16 = sidebarTab() === "automation";
7517
+ var _v$7 = `${sidebarWidth2()}px`, _v$8 = !!isDragging(), _v$9 = !!(sidebarTab() === "supervisor"), _v$0 = sidebarTab() === "supervisor", _v$1 = !!(sidebarTab() === "bookmarks"), _v$10 = sidebarTab() === "bookmarks", _v$11 = !!(sidebarTab() === "checkpoints"), _v$12 = sidebarTab() === "checkpoints", _v$13 = !!(sidebarTab() === "chat"), _v$14 = sidebarTab() === "chat", _v$15 = !!(sidebarTab() === "automation"), _v$16 = sidebarTab() === "automation", _v$17 = !!(sidebarTab() === "history"), _v$18 = sidebarTab() === "history";
6983
7518
  _v$7 !== _p$.e && setStyleProperty(_el$9, "width", _p$.e = _v$7);
6984
7519
  _v$8 !== _p$.t && _el$0.classList.toggle("dragging", _p$.t = _v$8);
6985
7520
  _v$9 !== _p$.a && _el$16.classList.toggle("active", _p$.a = _v$9);
@@ -6992,6 +7527,8 @@ ${contextBlock}` : contextBlock);
6992
7527
  _v$14 !== _p$.d && setAttribute(_el$21, "aria-selected", _p$.d = _v$14);
6993
7528
  _v$15 !== _p$.l && _el$22.classList.toggle("active", _p$.l = _v$15);
6994
7529
  _v$16 !== _p$.u && setAttribute(_el$22, "aria-selected", _p$.u = _v$16);
7530
+ _v$17 !== _p$.c && _el$23.classList.toggle("active", _p$.c = _v$17);
7531
+ _v$18 !== _p$.w && setAttribute(_el$23, "aria-selected", _p$.w = _v$18);
6995
7532
  return _p$;
6996
7533
  }, {
6997
7534
  e: void 0,
@@ -7005,7 +7542,9 @@ ${contextBlock}` : contextBlock);
7005
7542
  r: void 0,
7006
7543
  d: void 0,
7007
7544
  l: void 0,
7008
- u: void 0
7545
+ u: void 0,
7546
+ c: void 0,
7547
+ w: void 0
7009
7548
  });
7010
7549
  return _el$9;
7011
7550
  }
@@ -7533,7 +8072,7 @@ const PROVIDERS = {
7533
8072
  apiKeyHint: "Optional — only if your endpoint requires authentication"
7534
8073
  }
7535
8074
  };
7536
- var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><button class="premium-btn premium-btn-upgrade">Try Premium free for 7 days — $5.99/mo after</button><span class=welcome-banner-note>Best for screenshots, saved sessions, credential vault, and longer autonomous runs.`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=welcome-banner><div class=welcome-banner-header><span class=welcome-banner-title>Welcome to Vessel</span><button class=welcome-banner-dismiss>&times;</button></div><p class=welcome-banner-text>Get started in three steps:</p><ol class=welcome-banner-steps><li><strong>Configure a chat provider</strong> — scroll to Chat Assistant below and add an API key</li><li><strong>Connect your agent harness</strong> — point it at the MCP endpoint shown below</li><li><strong>Learn the shortcuts</strong> — press <kbd>?</kbd> anytime for a quick reference`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class="settings-callout settings-premium-callout"><div class=settings-callout-title>Start Vessel Premium with a 7-day free trial</div><p class=settings-callout-copy>Unlock screenshots, saved sessions, workflow tracking, table extraction, the credential vault, and longer autonomous runs without leaving the app.</p><div class=settings-premium-callout-actions><button class="premium-btn premium-btn-upgrade">Start 7-day free trial — $5.99/mo after</button><button class="premium-btn premium-btn-activate">See activation steps`), _tmpl$4$1 = /* @__PURE__ */ template(`<input id=max-tool-iterations class=settings-input type=number min=10 max=1000 placeholder=200>`), _tmpl$5$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-provider>Provider</label><select id=chat-provider class="settings-input settings-select">`), _tmpl$6$1 = /* @__PURE__ */ template(`<span class=settings-label-optional> (optional)`), _tmpl$7 = /* @__PURE__ */ template(`<p class=settings-hint>An API key is already stored securely for this provider. Leave this blank to keep it, or enter a new key to replace it.`), _tmpl$8 = /* @__PURE__ */ template(`<p class=settings-hint>If your endpoint requires authentication, enter the API key or bearer token here.`), _tmpl$9 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-api-key>API Key</label><input id=chat-api-key class=settings-input type=password>`), _tmpl$0 = /* @__PURE__ */ template(`<select id=chat-model class="settings-input settings-select"style=flex:1>`), _tmpl$1 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>Could not fetch models — check your API key and connection.`), _tmpl$10 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-model>Model</label><div style=display:flex;gap:6px;align-items:center><button type=button class=settings-refresh-btn title="Refresh model list">↺`), _tmpl$11 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-base-url>Base URL</label><input id=chat-base-url class=settings-input>`), _tmpl$12 = /* @__PURE__ */ template(`<p class=settings-hint>Vessel auto-detects the active model from your configured \`llama-server\` base URL. For agent loops, run \`llama-server\` with \`--ctx-size 16384\` minimum and \`32768\` recommended.`), _tmpl$13 = /* @__PURE__ */ template(`<div class=premium-section><div class=premium-active-badge>Premium Active</div><p class=premium-detail></p><div class=premium-actions-row><button class="premium-btn premium-btn-manage">Manage Subscription</button><button class="premium-btn premium-btn-reset">Sign Out`), _tmpl$14 = /* @__PURE__ */ template(`<span class=vault-premium-badge>Premium`), _tmpl$15 = /* @__PURE__ */ template(`<p class=settings-hint style=margin-bottom:10px>Store credentials for agent-driven logins. Credentials are encrypted at rest and never sent to AI providers — they are filled directly into login forms with your consent.`), _tmpl$16 = /* @__PURE__ */ template(`<div class=vault-entries>`), _tmpl$17 = /* @__PURE__ */ template(`<button class=vault-add-btn>+ Add Credential`), _tmpl$18 = /* @__PURE__ */ template(`<div class=vault-add-form><input class=settings-input placeholder="Label (e.g. Work GitHub)"><input class=settings-input placeholder="Domain pattern (e.g. github.com, *.aws.amazon.com)"><input class=settings-input placeholder="Username / email"><input class=settings-input type=password placeholder=Password><input class=settings-input placeholder="TOTP secret (optional, base32)"><input class=settings-input placeholder="Notes (optional)"><div class=vault-add-actions><button class="premium-btn premium-btn-activate">Save Credential</button><button class="premium-btn premium-btn-reset">Cancel`), _tmpl$19 = /* @__PURE__ */ template(`<button class=vault-add-btn>+ Add Profile`), _tmpl$20 = /* @__PURE__ */ template(`<div class=vault-add-form><input class=settings-input placeholder="Profile name (e.g. Personal, Work)"><div style="display:grid;grid-template-columns:1fr 1fr;gap:8px"><input class=settings-input placeholder="First name"><input class=settings-input placeholder="Last name"></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:8px"><input class=settings-input placeholder=Email><input class=settings-input placeholder=Phone></div><input class=settings-input placeholder="Organization (optional)"><input class=settings-input placeholder="Address line 1"><input class=settings-input placeholder="Address line 2 (optional)"><div style="display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px"><input class=settings-input placeholder=City><input class=settings-input placeholder=State><input class=settings-input placeholder="ZIP / Postal"></div><input class=settings-input placeholder=Country><div class=vault-add-actions><button class="premium-btn premium-btn-activate">Save Profile</button><button class="premium-btn premium-btn-reset">Cancel`), _tmpl$21 = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=settings-panel><h2 class=settings-title>Runtime Settings</h2><div class=settings-callout><div class=settings-callout-title>External Agent Control</div><p class=settings-callout-copy>Vessel is configured to run under an external harness such as Hermes Agent or OpenClaw. Provider and model selection are not configured inside Vessel.</p></div><div class=settings-field><label class=settings-label for=default-homepage>Homepage</label><input id=default-homepage class=settings-input placeholder=https://start.duckduckgo.com><p class=settings-hint>The page that opens when you create a new tab or launch Vessel without restoring a previous session.</p></div><div class=settings-field><label class=settings-label for=mcp-port>MCP Port</label><input id=mcp-port class=settings-input placeholder=3100><p class=settings-hint>External harnesses connect to Vessel at <code>http://127.0.0.1:&lt;port&gt;/mcp</code>. Changing this value restarts the MCP server immediately.</p></div><div class=settings-field><label class=settings-label for=max-tool-iterations>Max Tool Iterations</label><p class=settings-hint></p></div><div class=settings-field><label class=settings-label for=obsidian-vault-path>Obsidian Vault Path</label><input id=obsidian-vault-path class=settings-input placeholder=/home/you/Documents/MyVault><p class=settings-hint>Optional. When set, Vessel memory tools can write markdown notes into this vault for research breadcrumbs and summaries.</p></div><div class=settings-field><label class=settings-label for=agent-transcript-mode>Agent Transcript Monitor</label><select id=agent-transcript-mode class="settings-input settings-select"><option value=off>Off</option><option value=summary>Summary HUD</option><option value=full>Full transcript</option></select><p class=settings-hint>Controls the in-browser transcript monitor when an external harness publishes reasoning or status updates into Vessel via the<code>vessel_publish_transcript</code> MCP tool. Summary HUD shows a compact 2-line status surface; Full transcript shows the recent entry list.</p></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Restore last browser session on launch</span></label></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Start bookmarks fresh on launch</span></label><p class=settings-hint>Off by default. When enabled, bookmark folders and saved pages are cleared each time Vessel starts.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Enable Chat Assistant</span></label><p class=settings-hint>Adds a Chat tab to the sidebar for conversing with an AI provider of your choice.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label>Vessel Premium</label></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label>Agent Credential Vault</label></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label>Form Autofill</label><p class=settings-hint style=margin-bottom:10px>Store your info once. Vessel matches it to form fields on any site using labels, field names, and autocomplete hints.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Anonymous Usage Analytics</span></label><p class=settings-hint>Help improve Vessel by sending anonymous usage data (tool popularity, session duration, provider type). No URLs, page content, queries, or personal data is ever collected.</p></div><div class=settings-actions><button class=settings-save>Save</button><button class=settings-close>Close`), _tmpl$22 = /* @__PURE__ */ template(`<style>
8075
+ var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><button class="premium-btn premium-btn-upgrade">Try Premium free for 7 days — $5.99/mo after</button><span class=welcome-banner-note>Best for screenshots, saved sessions, credential vault, and longer autonomous runs.`), _tmpl$2$2 = /* @__PURE__ */ template(`<div class=welcome-banner><div class=welcome-banner-header><span class=welcome-banner-title>Welcome to Vessel</span><button class=welcome-banner-dismiss>&times;</button></div><p class=welcome-banner-text>Get started in three steps:</p><ol class=welcome-banner-steps><li><strong>Configure a chat provider</strong> — scroll to Chat Assistant below and add an API key</li><li><strong>Connect your agent harness</strong> — point it at the MCP endpoint shown below</li><li><strong>Learn the shortcuts</strong> — press <kbd>?</kbd> anytime for a quick reference`), _tmpl$3$1 = /* @__PURE__ */ template(`<div class="settings-callout settings-premium-callout"><div class=settings-callout-title>Start Vessel Premium with a 7-day free trial</div><p class=settings-callout-copy>Unlock screenshots, saved sessions, workflow tracking, table extraction, the credential vault, and longer autonomous runs without leaving the app.</p><div class=settings-premium-callout-actions><button class="premium-btn premium-btn-upgrade">Start 7-day free trial — $5.99/mo after</button><button class="premium-btn premium-btn-activate">See activation steps`), _tmpl$4$1 = /* @__PURE__ */ template(`<input id=max-tool-iterations class=settings-input type=number min=10 max=1000 placeholder=200>`), _tmpl$5$1 = /* @__PURE__ */ template(`<div class=vault-entries>`), _tmpl$6$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-provider>Provider</label><select id=chat-provider class="settings-input settings-select">`), _tmpl$7 = /* @__PURE__ */ template(`<span class=settings-label-optional> (optional)`), _tmpl$8 = /* @__PURE__ */ template(`<p class=settings-hint>An API key is already stored securely for this provider. Leave this blank to keep it, or enter a new key to replace it.`), _tmpl$9 = /* @__PURE__ */ template(`<p class=settings-hint>If your endpoint requires authentication, enter the API key or bearer token here.`), _tmpl$0 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-api-key>API Key</label><input id=chat-api-key class=settings-input type=password>`), _tmpl$1 = /* @__PURE__ */ template(`<select id=chat-model class="settings-input settings-select"style=flex:1>`), _tmpl$10 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>Could not fetch models — check your API key and connection.`), _tmpl$11 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-model>Model</label><div style=display:flex;gap:6px;align-items:center><button type=button class=settings-refresh-btn title="Refresh model list">↺`), _tmpl$12 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-base-url>Base URL</label><input id=chat-base-url class=settings-input>`), _tmpl$13 = /* @__PURE__ */ template(`<p class=settings-hint>Vessel auto-detects the active model from your configured \`llama-server\` base URL. For agent loops, run \`llama-server\` with \`--ctx-size 16384\` minimum and \`32768\` recommended.`), _tmpl$14 = /* @__PURE__ */ template(`<div class=premium-section><div class=premium-active-badge>Premium Active</div><p class=premium-detail></p><div class=premium-actions-row><button class="premium-btn premium-btn-manage">Manage Subscription</button><button class="premium-btn premium-btn-reset">Sign Out`), _tmpl$15 = /* @__PURE__ */ template(`<span class=vault-premium-badge>Premium`), _tmpl$16 = /* @__PURE__ */ template(`<p class=settings-hint style=margin-bottom:10px>Store credentials for agent-driven logins. Credentials are encrypted at rest and never sent to AI providers — they are filled directly into login forms with your consent.`), _tmpl$17 = /* @__PURE__ */ template(`<button class=vault-add-btn>+ Add Credential`), _tmpl$18 = /* @__PURE__ */ template(`<div class=vault-add-form><input class=settings-input placeholder="Label (e.g. Work GitHub)"><input class=settings-input placeholder="Domain pattern (e.g. github.com, *.aws.amazon.com)"><input class=settings-input placeholder="Username / email"><input class=settings-input type=password placeholder=Password><input class=settings-input placeholder="TOTP secret (optional, base32)"><input class=settings-input placeholder="Notes (optional)"><div class=vault-add-actions><button class="premium-btn premium-btn-activate">Save Credential</button><button class="premium-btn premium-btn-reset">Cancel`), _tmpl$19 = /* @__PURE__ */ template(`<button class=vault-add-btn>+ Add Profile`), _tmpl$20 = /* @__PURE__ */ template(`<div class=vault-add-form><input class=settings-input placeholder="Profile name (e.g. Personal, Work)"><div style="display:grid;grid-template-columns:1fr 1fr;gap:8px"><input class=settings-input placeholder="First name"><input class=settings-input placeholder="Last name"></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:8px"><input class=settings-input placeholder=Email><input class=settings-input placeholder=Phone></div><input class=settings-input placeholder="Organization (optional)"><input class=settings-input placeholder="Address line 1"><input class=settings-input placeholder="Address line 2 (optional)"><div style="display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px"><input class=settings-input placeholder=City><input class=settings-input placeholder=State><input class=settings-input placeholder="ZIP / Postal"></div><input class=settings-input placeholder=Country><div class=vault-add-actions><button class="premium-btn premium-btn-activate">Save Profile</button><button class="premium-btn premium-btn-reset">Cancel`), _tmpl$21 = /* @__PURE__ */ template(`<textarea class="settings-input settings-textarea"rows=4>`), _tmpl$22 = /* @__PURE__ */ template(`<p class=settings-hint>`), _tmpl$23 = /* @__PURE__ */ template(`<p class=settings-hint>Restrict which domains can be navigated to. Use allowlist mode for kiosk or supervised browsing, blocklist to block specific sites.`), _tmpl$24 = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=settings-panel><h2 class=settings-title>Runtime Settings</h2><div class=settings-callout><div class=settings-callout-title>External Agent Control</div><p class=settings-callout-copy>Vessel is configured to run under an external harness such as Hermes Agent or OpenClaw. Provider and model selection are not configured inside Vessel.</p></div><div class=settings-field><label class=settings-label for=default-homepage>Homepage</label><input id=default-homepage class=settings-input placeholder=https://start.duckduckgo.com><p class=settings-hint>The page that opens when you create a new tab or launch Vessel without restoring a previous session.</p></div><div class=settings-field><label class=settings-label for=download-path>Download Location</label><input id=download-path class=settings-input placeholder="Default: ~/Downloads"><p class=settings-hint>Directory for saved files. Leave blank to use the system default Downloads folder.</p></div><div class=settings-field><label class=settings-label for=mcp-port>MCP Port</label><input id=mcp-port class=settings-input placeholder=3100><p class=settings-hint>External harnesses connect to Vessel at <code>http://127.0.0.1:&lt;port&gt;/mcp</code>. Changing this value restarts the MCP server immediately.</p></div><div class=settings-field><label class=settings-label for=max-tool-iterations>Max Tool Iterations</label><p class=settings-hint></p></div><div class=settings-field><label class=settings-label for=obsidian-vault-path>Obsidian Vault Path</label><input id=obsidian-vault-path class=settings-input placeholder=/home/you/Documents/MyVault><p class=settings-hint>Optional. When set, Vessel memory tools can write markdown notes into this vault for research breadcrumbs and summaries.</p></div><div class=settings-field><label class=settings-label for=agent-transcript-mode>Agent Transcript Monitor</label><select id=agent-transcript-mode class="settings-input settings-select"><option value=off>Off</option><option value=summary>Summary HUD</option><option value=full>Full transcript</option></select><p class=settings-hint>Controls the in-browser transcript monitor when an external harness publishes reasoning or status updates into Vessel via the<code>vessel_publish_transcript</code> MCP tool. Summary HUD shows a compact 2-line status surface; Full transcript shows the recent entry list.</p></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Restore last browser session on launch</span></label></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Start bookmarks fresh on launch</span></label><p class=settings-hint>Off by default. When enabled, bookmark folders and saved pages are cleared each time Vessel starts.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label>Saved Sessions</label><p class=settings-hint style=margin-bottom:10px>Save the current browser state (tabs, cookies, storage) as a named session. Restore it later from this panel.</p><div class=premium-activate-row style=margin-bottom:8px><input class="settings-input premium-email-input"placeholder="Session name"><button class="premium-btn premium-btn-activate">Save Current</button></div></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Enable Chat Assistant</span></label><p class=settings-hint>Adds a Chat tab to the sidebar for conversing with an AI provider of your choice.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label>Vessel Premium</label></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label>Agent Credential Vault</label></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label>Form Autofill</label><p class=settings-hint style=margin-bottom:10px>Store your info once. Vessel matches it to form fields on any site using labels, field names, and autocomplete hints.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Anonymous Usage Analytics</span></label><p class=settings-hint>Help improve Vessel by sending anonymous usage data (tool popularity, session duration, provider type). No URLs, page content, queries, or personal data is ever collected.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-label for=theme-select>Theme</label><select id=theme-select class="settings-input settings-select"><option value=dark>Dark</option><option value=light>Light</option></select><p class=settings-hint>Choose the application color scheme. Takes effect after saving.</p></div><div class=settings-field><label class=settings-label for=domain-policy-mode>Domain Restrictions</label><select id=domain-policy-mode class="settings-input settings-select"><option value=none>No restrictions</option><option value=allowlist>Allowlist (only listed domains)</option><option value=blocklist>Blocklist (block listed domains)</option></select></div><div class=settings-actions><button class=settings-save>Save</button><button class=settings-close>Close`), _tmpl$25 = /* @__PURE__ */ template(`<style>
7537
8076
  .settings-panel {
7538
8077
  width: min(440px, calc(100vw - 32px));
7539
8078
  max-height: calc(100vh - 48px);
@@ -7653,6 +8192,14 @@ var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><butt
7653
8192
  .settings-select {
7654
8193
  appearance: none;
7655
8194
  }
8195
+ .settings-textarea {
8196
+ height: auto;
8197
+ min-height: 70px;
8198
+ padding: 8px 12px;
8199
+ resize: vertical;
8200
+ line-height: 1.5;
8201
+ margin-top: 8px;
8202
+ }
7656
8203
  .settings-input:focus {
7657
8204
  border-color: var(--accent-primary);
7658
8205
  box-shadow: 0 0 0 2px rgba(196, 160, 90, 0.1);
@@ -8067,7 +8614,7 @@ var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><butt
8067
8614
  justify-content: flex-end;
8068
8615
  margin-top: 4px;
8069
8616
  }
8070
- `), _tmpl$23 = /* @__PURE__ */ template(`<div class="settings-input settings-input-disabled"title="Upgrade to Vessel Premium for unlimited tool iterations">50`), _tmpl$24 = /* @__PURE__ */ template(`<div class=settings-health-issues>`), _tmpl$25 = /* @__PURE__ */ template(`<div class=settings-health><div class=settings-callout-title>Runtime Health</div><p class=settings-hint>MCP status: <strong></strong> `), _tmpl$26 = /* @__PURE__ */ template(`<p class=settings-hint>Active endpoint: <code>`), _tmpl$27 = /* @__PURE__ */ template(`<div class=settings-health-issue><strong></strong><div>`), _tmpl$28 = /* @__PURE__ */ template(`<div>`), _tmpl$29 = /* @__PURE__ */ template(`<option>`), _tmpl$30 = /* @__PURE__ */ template(`<input id=chat-model class=settings-input style=flex:1>`), _tmpl$31 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--accent-primary)>`), _tmpl$32 = /* @__PURE__ */ template(`<div class=premium-activate-row><input class="settings-input premium-email-input"inputmode=numeric maxlength=6 placeholder="Enter 6-digit code"><button class="premium-btn premium-btn-activate">`), _tmpl$33 = /* @__PURE__ */ template(`<button class="premium-btn premium-btn-reset">Clear Saved Email`), _tmpl$34 = /* @__PURE__ */ template(`<div class=premium-section><p class=premium-description>Unlock screenshot/vision analysis, session management, Obsidian integration, workflow tracking, DevTools tools, table extraction, Agent Credential Vault, and unlimited tool iterations.</p><div class=premium-activate-row><input class="settings-input premium-email-input"type=email placeholder="Enter your subscription email"><button class="premium-btn premium-btn-activate"></button></div><button class="premium-btn premium-btn-upgrade">Subscribe to Premium — $5.99/mo after 7-day free trial`), _tmpl$35 = /* @__PURE__ */ template(`<p class=settings-status>`), _tmpl$36 = /* @__PURE__ */ template(`<p class=settings-hint>Securely store credentials for agent-driven logins. Upgrade to Premium to unlock the Agent Credential Vault.`), _tmpl$37 = /* @__PURE__ */ template(`<div class=vault-entry><div class=vault-entry-info><span class=vault-entry-label></span><span class=vault-entry-detail> &middot; </span></div><button class=vault-entry-remove title="Remove credential">&times;`), _tmpl$38 = /* @__PURE__ */ template(`<div class=vault-entry><div class=vault-entry-info><span class=vault-entry-label></span><span class=vault-entry-detail></span></div><div style=display:flex;gap:6px;align-items:center><button class="premium-btn premium-btn-activate"title="Fill forms on current page with this profile"style="padding:2px 10px;font-size:12px">Fill</button><button class=vault-entry-remove title="Remove profile">&times;`);
8617
+ `), _tmpl$26 = /* @__PURE__ */ template(`<div class="settings-input settings-input-disabled"title="Upgrade to Vessel Premium for unlimited tool iterations">50`), _tmpl$27 = /* @__PURE__ */ template(`<div class=settings-health-issues>`), _tmpl$28 = /* @__PURE__ */ template(`<div class=settings-health><div class=settings-callout-title>Runtime Health</div><p class=settings-hint>MCP status: <strong></strong> `), _tmpl$29 = /* @__PURE__ */ template(`<p class=settings-hint>Active endpoint: <code>`), _tmpl$30 = /* @__PURE__ */ template(`<div class=settings-health-issue><strong></strong><div>`), _tmpl$31 = /* @__PURE__ */ template(`<div>`), _tmpl$32 = /* @__PURE__ */ template(`<div class=vault-entry><div class=vault-entry-info><span class=vault-entry-label></span><span class=vault-entry-detail> &middot; <!> cookies &middot; <!> domains</span></div><div style=display:flex;gap:6px;align-items:center><button class="premium-btn premium-btn-activate"title="Restore this session (replaces current tabs and cookies)"style="padding:2px 10px;font-size:12px">Load</button><button class=vault-entry-remove title="Delete session">&times;`), _tmpl$33 = /* @__PURE__ */ template(`<option>`), _tmpl$34 = /* @__PURE__ */ template(`<input id=chat-model class=settings-input style=flex:1>`), _tmpl$35 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--accent-primary)>`), _tmpl$36 = /* @__PURE__ */ template(`<div class=premium-activate-row><input class="settings-input premium-email-input"inputmode=numeric maxlength=6 placeholder="Enter 6-digit code"><button class="premium-btn premium-btn-activate">`), _tmpl$37 = /* @__PURE__ */ template(`<button class="premium-btn premium-btn-reset">Clear Saved Email`), _tmpl$38 = /* @__PURE__ */ template(`<div class=premium-section><p class=premium-description>Unlock screenshot/vision analysis, session management, Obsidian integration, workflow tracking, DevTools tools, table extraction, Agent Credential Vault, and unlimited tool iterations.</p><div class=premium-activate-row><input class="settings-input premium-email-input"type=email placeholder="Enter your subscription email"><button class="premium-btn premium-btn-activate"></button></div><button class="premium-btn premium-btn-upgrade">Subscribe to Premium — $5.99/mo after 7-day free trial`), _tmpl$39 = /* @__PURE__ */ template(`<p class=settings-status>`), _tmpl$40 = /* @__PURE__ */ template(`<p class=settings-hint>Securely store credentials for agent-driven logins. Upgrade to Premium to unlock the Agent Credential Vault.`), _tmpl$41 = /* @__PURE__ */ template(`<div class=vault-entry><div class=vault-entry-info><span class=vault-entry-label></span><span class=vault-entry-detail> &middot; </span></div><button class=vault-entry-remove title="Remove credential">&times;`), _tmpl$42 = /* @__PURE__ */ template(`<div class=vault-entry><div class=vault-entry-info><span class=vault-entry-label></span><span class=vault-entry-detail></span></div><div style=display:flex;gap:6px;align-items:center><button class="premium-btn premium-btn-activate"title="Fill forms on current page with this profile"style="padding:2px 10px;font-size:12px">Fill</button><button class=vault-entry-remove title="Remove profile">&times;`);
8071
8618
  const CHAT_PROVIDERS = Object.values(PROVIDERS).map((p) => ({
8072
8619
  id: p.id,
8073
8620
  name: p.name,
@@ -8095,8 +8642,21 @@ const Settings = () => {
8095
8642
  const [agentTranscriptMode, setAgentTranscriptMode] = createSignal("summary");
8096
8643
  const [health, setHealth] = createSignal(null);
8097
8644
  const [defaultUrl, setDefaultUrl] = createSignal("https://start.duckduckgo.com");
8645
+ const [downloadPath, setDownloadPath] = createSignal("");
8098
8646
  const [status, setStatus] = createSignal(null);
8099
8647
  const [telemetryEnabled, setTelemetryEnabled] = createSignal(true);
8648
+ const [theme, setTheme] = createSignal("dark");
8649
+ const [domainMode, setDomainMode] = createSignal("none");
8650
+ const [domainList, setDomainList] = createSignal("");
8651
+ const [sessionList, setSessionList] = createSignal([]);
8652
+ const [sessionSaveName, setSessionSaveName] = createSignal("");
8653
+ const loadSessionList = async () => {
8654
+ try {
8655
+ const sessions = await window.vessel.sessions.list();
8656
+ setSessionList(sessions);
8657
+ } catch {
8658
+ }
8659
+ };
8100
8660
  const [vaultEntries, setVaultEntries] = createSignal([]);
8101
8661
  const [vaultExpanded, setVaultExpanded] = createSignal(false);
8102
8662
  const [vaultAdding, setVaultAdding] = createSignal(false);
@@ -8363,7 +8923,9 @@ const Settings = () => {
8363
8923
  const loadState = async () => {
8364
8924
  const settings = await window.vessel.settings.get();
8365
8925
  const runtimeHealth = await window.vessel.settings.getHealth();
8926
+ setTheme(settings.theme ?? "dark");
8366
8927
  setDefaultUrl(settings.defaultUrl ?? "https://start.duckduckgo.com");
8928
+ setDownloadPath(settings.downloadPath ?? "");
8367
8929
  setAutoRestoreSession(settings.autoRestoreSession ?? true);
8368
8930
  setClearBookmarksOnLaunch(settings.clearBookmarksOnLaunch ?? false);
8369
8931
  setObsidianVaultPath(settings.obsidianVaultPath ?? "");
@@ -8384,6 +8946,20 @@ const Settings = () => {
8384
8946
  setChatHasStoredApiKey(false);
8385
8947
  }
8386
8948
  setTelemetryEnabled(settings.telemetryEnabled !== false);
8949
+ const dp = settings.domainPolicy ?? {
8950
+ allowedDomains: [],
8951
+ blockedDomains: []
8952
+ };
8953
+ if (dp.allowedDomains.length > 0) {
8954
+ setDomainMode("allowlist");
8955
+ setDomainList(dp.allowedDomains.join("\n"));
8956
+ } else if (dp.blockedDomains.length > 0) {
8957
+ setDomainMode("blocklist");
8958
+ setDomainList(dp.blockedDomains.join("\n"));
8959
+ } else {
8960
+ setDomainMode("none");
8961
+ setDomainList("");
8962
+ }
8387
8963
  try {
8388
8964
  const ps = await window.vessel.premium.getState();
8389
8965
  setPremiumState(ps);
@@ -8391,6 +8967,7 @@ const Settings = () => {
8391
8967
  } catch {
8392
8968
  }
8393
8969
  await loadVaultEntries();
8970
+ await loadSessionList();
8394
8971
  };
8395
8972
  onMount(() => {
8396
8973
  void loadState();
@@ -8437,6 +9014,8 @@ const Settings = () => {
8437
9014
  });
8438
9015
  return;
8439
9016
  }
9017
+ await window.vessel.settings.set("theme", theme());
9018
+ await window.vessel.settings.set("downloadPath", downloadPath().trim());
8440
9019
  await window.vessel.settings.set("defaultUrl", defaultUrl().trim() || "https://start.duckduckgo.com");
8441
9020
  await window.vessel.settings.set("autoRestoreSession", autoRestoreSession());
8442
9021
  await window.vessel.settings.set("clearBookmarksOnLaunch", clearBookmarksOnLaunch());
@@ -8446,6 +9025,18 @@ const Settings = () => {
8446
9025
  await window.vessel.settings.set("maxToolIterations", Math.max(10, Math.min(1e3, parsedIterations)));
8447
9026
  await window.vessel.settings.set("agentTranscriptMode", agentTranscriptMode());
8448
9027
  await window.vessel.settings.set("telemetryEnabled", telemetryEnabled());
9028
+ const domains = domainList().split("\n").map((d) => d.trim()).filter((d) => d.length > 0);
9029
+ const domainPolicy = domainMode() === "allowlist" ? {
9030
+ allowedDomains: domains,
9031
+ blockedDomains: []
9032
+ } : domainMode() === "blocklist" ? {
9033
+ allowedDomains: [],
9034
+ blockedDomains: domains
9035
+ } : {
9036
+ allowedDomains: [],
9037
+ blockedDomains: []
9038
+ };
9039
+ await window.vessel.settings.set("domainPolicy", domainPolicy);
8449
9040
  const chatConfig = chatEnabled() ? {
8450
9041
  id: chatProviderId(),
8451
9042
  apiKey: chatApiKey().trim(),
@@ -8475,13 +9066,13 @@ const Settings = () => {
8475
9066
  },
8476
9067
  get children() {
8477
9068
  return [(() => {
8478
- var _el$ = _tmpl$21(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$11 = _el$3.nextSibling, _el$18 = _el$11.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$27 = _el$25.nextSibling, _el$28 = _el$24.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$31.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.firstChild, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.firstChild, _el$40 = _el$37.nextSibling, _el$41 = _el$40.nextSibling, _el$42 = _el$41.firstChild, _el$43 = _el$42.firstChild, _el$64 = _el$41.nextSibling, _el$65 = _el$64.nextSibling;
8479
- _el$65.firstChild;
8480
- var _el$74 = _el$65.nextSibling, _el$75 = _el$74.nextSibling, _el$76 = _el$75.firstChild;
9069
+ var _el$ = _tmpl$24(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$11 = _el$3.nextSibling, _el$18 = _el$11.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$24.nextSibling, _el$28 = _el$27.firstChild, _el$30 = _el$28.nextSibling, _el$31 = _el$27.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$31.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.firstChild, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$40.nextSibling, _el$44 = _el$43.nextSibling, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling, _el$47 = _el$46.nextSibling, _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling, _el$51 = _el$44.nextSibling, _el$52 = _el$51.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$53.firstChild, _el$75 = _el$52.nextSibling, _el$76 = _el$75.nextSibling;
8481
9070
  _el$76.firstChild;
8482
- var _el$92 = _el$75.nextSibling, _el$93 = _el$92.nextSibling, _el$94 = _el$93.firstChild;
8483
- _el$94.nextSibling;
8484
- var _el$117 = _el$93.nextSibling, _el$118 = _el$117.nextSibling, _el$119 = _el$118.firstChild, _el$120 = _el$119.firstChild, _el$121 = _el$118.nextSibling, _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling;
9071
+ var _el$85 = _el$76.nextSibling, _el$86 = _el$85.nextSibling, _el$87 = _el$86.firstChild;
9072
+ _el$87.firstChild;
9073
+ var _el$103 = _el$86.nextSibling, _el$104 = _el$103.nextSibling, _el$105 = _el$104.firstChild;
9074
+ _el$105.nextSibling;
9075
+ var _el$128 = _el$104.nextSibling, _el$129 = _el$128.nextSibling, _el$130 = _el$129.firstChild, _el$131 = _el$130.firstChild, _el$132 = _el$129.nextSibling, _el$133 = _el$132.nextSibling, _el$134 = _el$133.firstChild, _el$135 = _el$134.nextSibling, _el$136 = _el$133.nextSibling, _el$137 = _el$136.firstChild, _el$138 = _el$137.nextSibling, _el$142 = _el$136.nextSibling, _el$143 = _el$142.firstChild, _el$144 = _el$143.nextSibling;
8485
9076
  addEventListener(_el$, "click", closeSettings, true);
8486
9077
  _el$2.$$keydown = handleKeyDown;
8487
9078
  _el$2.$$click = (e) => e.stopPropagation();
@@ -8531,23 +9122,25 @@ const Settings = () => {
8531
9122
  }), _el$18);
8532
9123
  _el$20.$$input = (e) => setDefaultUrl(e.currentTarget.value);
8533
9124
  setAttribute(_el$20, "spellcheck", false);
8534
- _el$23.$$input = (e) => setMcpPort(e.currentTarget.value);
9125
+ _el$23.$$input = (e) => setDownloadPath(e.currentTarget.value);
8535
9126
  setAttribute(_el$23, "spellcheck", false);
8536
- insert(_el$24, createComponent(Show, {
9127
+ _el$26.$$input = (e) => setMcpPort(e.currentTarget.value);
9128
+ setAttribute(_el$26, "spellcheck", false);
9129
+ insert(_el$27, createComponent(Show, {
8537
9130
  get when() {
8538
9131
  return premiumActive();
8539
9132
  },
8540
9133
  get fallback() {
8541
- return _tmpl$23();
9134
+ return _tmpl$26();
8542
9135
  },
8543
9136
  get children() {
8544
- var _el$26 = _tmpl$4$1();
8545
- _el$26.$$input = (e) => setMaxToolIterations(e.currentTarget.value);
8546
- createRenderEffect(() => _el$26.value = maxToolIterations());
8547
- return _el$26;
9137
+ var _el$29 = _tmpl$4$1();
9138
+ _el$29.$$input = (e) => setMaxToolIterations(e.currentTarget.value);
9139
+ createRenderEffect(() => _el$29.value = maxToolIterations());
9140
+ return _el$29;
8548
9141
  }
8549
- }), _el$27);
8550
- insert(_el$27, createComponent(Show, {
9142
+ }), _el$30);
9143
+ insert(_el$30, createComponent(Show, {
8551
9144
  get when() {
8552
9145
  return premiumActive();
8553
9146
  },
@@ -8559,71 +9152,133 @@ const Settings = () => {
8559
9152
  return health();
8560
9153
  },
8561
9154
  children: (currentHealth) => (() => {
8562
- var _el$126 = _tmpl$25(), _el$127 = _el$126.firstChild, _el$128 = _el$127.nextSibling, _el$129 = _el$128.firstChild, _el$131 = _el$129.nextSibling;
8563
- _el$131.nextSibling;
8564
- insert(_el$131, () => currentHealth().mcp.status);
8565
- insert(_el$128, () => currentHealth().mcp.message, null);
8566
- insert(_el$126, createComponent(Show, {
9155
+ var _el$147 = _tmpl$28(), _el$148 = _el$147.firstChild, _el$149 = _el$148.nextSibling, _el$150 = _el$149.firstChild, _el$152 = _el$150.nextSibling;
9156
+ _el$152.nextSibling;
9157
+ insert(_el$152, () => currentHealth().mcp.status);
9158
+ insert(_el$149, () => currentHealth().mcp.message, null);
9159
+ insert(_el$147, createComponent(Show, {
8567
9160
  get when() {
8568
9161
  return currentHealth().mcp.endpoint;
8569
9162
  },
8570
9163
  children: (endpoint) => (() => {
8571
- var _el$134 = _tmpl$26(), _el$135 = _el$134.firstChild, _el$136 = _el$135.nextSibling;
8572
- insert(_el$136, endpoint);
8573
- return _el$134;
9164
+ var _el$155 = _tmpl$29(), _el$156 = _el$155.firstChild, _el$157 = _el$156.nextSibling;
9165
+ insert(_el$157, endpoint);
9166
+ return _el$155;
8574
9167
  })()
8575
9168
  }), null);
8576
- insert(_el$126, createComponent(Show, {
9169
+ insert(_el$147, createComponent(Show, {
8577
9170
  get when() {
8578
9171
  return currentHealth().startupIssues.length > 0;
8579
9172
  },
8580
9173
  get children() {
8581
- var _el$133 = _tmpl$24();
8582
- insert(_el$133, () => currentHealth().startupIssues.map((issue) => (() => {
8583
- var _el$137 = _tmpl$27(), _el$138 = _el$137.firstChild, _el$139 = _el$138.nextSibling;
8584
- insert(_el$138, () => issue.title);
8585
- insert(_el$139, () => issue.detail);
8586
- insert(_el$137, createComponent(Show, {
9174
+ var _el$154 = _tmpl$27();
9175
+ insert(_el$154, () => currentHealth().startupIssues.map((issue) => (() => {
9176
+ var _el$158 = _tmpl$30(), _el$159 = _el$158.firstChild, _el$160 = _el$159.nextSibling;
9177
+ insert(_el$159, () => issue.title);
9178
+ insert(_el$160, () => issue.detail);
9179
+ insert(_el$158, createComponent(Show, {
8587
9180
  get when() {
8588
9181
  return issue.action;
8589
9182
  },
8590
9183
  children: (action) => (() => {
8591
- var _el$140 = _tmpl$28();
8592
- insert(_el$140, action);
8593
- return _el$140;
9184
+ var _el$161 = _tmpl$31();
9185
+ insert(_el$161, action);
9186
+ return _el$161;
8594
9187
  })()
8595
9188
  }), null);
8596
9189
  createRenderEffect((_p$) => {
8597
- var _v$0 = !!(issue.severity === "warning"), _v$1 = !!(issue.severity === "error");
8598
- _v$0 !== _p$.e && _el$137.classList.toggle("warning", _p$.e = _v$0);
8599
- _v$1 !== _p$.t && _el$137.classList.toggle("error", _p$.t = _v$1);
9190
+ var _v$1 = !!(issue.severity === "warning"), _v$10 = !!(issue.severity === "error");
9191
+ _v$1 !== _p$.e && _el$158.classList.toggle("warning", _p$.e = _v$1);
9192
+ _v$10 !== _p$.t && _el$158.classList.toggle("error", _p$.t = _v$10);
8600
9193
  return _p$;
8601
9194
  }, {
8602
9195
  e: void 0,
8603
9196
  t: void 0
8604
9197
  });
8605
- return _el$137;
9198
+ return _el$158;
8606
9199
  })()));
8607
- return _el$133;
9200
+ return _el$154;
8608
9201
  }
8609
9202
  }), null);
8610
- return _el$126;
9203
+ return _el$147;
8611
9204
  })()
8612
- }), _el$28);
8613
- _el$30.$$input = (e) => setObsidianVaultPath(e.currentTarget.value);
8614
- setAttribute(_el$30, "spellcheck", false);
8615
- _el$33.addEventListener("change", (e) => setAgentTranscriptMode(e.currentTarget.value));
8616
- _el$36.$$click = () => setAutoRestoreSession(!autoRestoreSession());
8617
- _el$39.$$click = () => setClearBookmarksOnLaunch(!clearBookmarksOnLaunch());
8618
- _el$43.$$click = () => setChatEnabled(!chatEnabled());
9205
+ }), _el$31);
9206
+ _el$33.$$input = (e) => setObsidianVaultPath(e.currentTarget.value);
9207
+ setAttribute(_el$33, "spellcheck", false);
9208
+ _el$36.addEventListener("change", (e) => setAgentTranscriptMode(e.currentTarget.value));
9209
+ _el$39.$$click = () => setAutoRestoreSession(!autoRestoreSession());
9210
+ _el$42.$$click = () => setClearBookmarksOnLaunch(!clearBookmarksOnLaunch());
9211
+ _el$48.$$input = (e) => setSessionSaveName(e.currentTarget.value);
9212
+ setAttribute(_el$48, "spellcheck", false);
9213
+ _el$49.$$click = async () => {
9214
+ try {
9215
+ await window.vessel.sessions.save(sessionSaveName().trim());
9216
+ setSessionSaveName("");
9217
+ await loadSessionList();
9218
+ setStatus({
9219
+ kind: "success",
9220
+ text: "Session saved."
9221
+ });
9222
+ setTimeout(() => setStatus(null), 3e3);
9223
+ } catch (err) {
9224
+ setStatus({
9225
+ kind: "error",
9226
+ text: String(err)
9227
+ });
9228
+ }
9229
+ };
9230
+ insert(_el$44, createComponent(Show, {
9231
+ get when() {
9232
+ return sessionList().length > 0;
9233
+ },
9234
+ get children() {
9235
+ var _el$50 = _tmpl$5$1();
9236
+ insert(_el$50, createComponent(For, {
9237
+ get each() {
9238
+ return sessionList();
9239
+ },
9240
+ children: (s) => (() => {
9241
+ var _el$162 = _tmpl$32(), _el$163 = _el$162.firstChild, _el$164 = _el$163.firstChild, _el$165 = _el$164.nextSibling, _el$166 = _el$165.firstChild, _el$172 = _el$166.nextSibling, _el$168 = _el$172.nextSibling, _el$173 = _el$168.nextSibling;
9242
+ _el$173.nextSibling;
9243
+ var _el$174 = _el$163.nextSibling, _el$175 = _el$174.firstChild, _el$176 = _el$175.nextSibling;
9244
+ insert(_el$164, () => s.name);
9245
+ insert(_el$165, () => new Date(s.updatedAt).toLocaleDateString(), _el$166);
9246
+ insert(_el$165, () => s.cookieCount, _el$172);
9247
+ insert(_el$165, () => s.domains.length, _el$173);
9248
+ _el$175.$$click = async () => {
9249
+ try {
9250
+ await window.vessel.sessions.load(s.name);
9251
+ setStatus({
9252
+ kind: "success",
9253
+ text: `Session "${s.name}" restored.`
9254
+ });
9255
+ setTimeout(() => setStatus(null), 3e3);
9256
+ } catch (err) {
9257
+ setStatus({
9258
+ kind: "error",
9259
+ text: String(err)
9260
+ });
9261
+ }
9262
+ };
9263
+ _el$176.$$click = async () => {
9264
+ await window.vessel.sessions.delete(s.name);
9265
+ await loadSessionList();
9266
+ };
9267
+ return _el$162;
9268
+ })()
9269
+ }));
9270
+ return _el$50;
9271
+ }
9272
+ }), null);
9273
+ _el$54.$$click = () => setChatEnabled(!chatEnabled());
8619
9274
  insert(_el$2, createComponent(Show, {
8620
9275
  get when() {
8621
9276
  return chatEnabled();
8622
9277
  },
8623
9278
  get children() {
8624
9279
  return [(() => {
8625
- var _el$44 = _tmpl$5$1(), _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
8626
- _el$46.addEventListener("change", (e) => {
9280
+ var _el$55 = _tmpl$6$1(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
9281
+ _el$57.addEventListener("change", (e) => {
8627
9282
  const id = e.currentTarget.value;
8628
9283
  setChatProviderId(id);
8629
9284
  setChatModel("");
@@ -8633,145 +9288,145 @@ const Settings = () => {
8633
9288
  setProviderModels([]);
8634
9289
  setModelFetchState("idle");
8635
9290
  });
8636
- insert(_el$46, createComponent(For, {
9291
+ insert(_el$57, createComponent(For, {
8637
9292
  each: CHAT_PROVIDERS,
8638
9293
  children: (p) => (() => {
8639
- var _el$141 = _tmpl$29();
8640
- insert(_el$141, () => p.name);
8641
- createRenderEffect(() => _el$141.value = p.id);
8642
- return _el$141;
9294
+ var _el$177 = _tmpl$33();
9295
+ insert(_el$177, () => p.name);
9296
+ createRenderEffect(() => _el$177.value = p.id);
9297
+ return _el$177;
8643
9298
  })()
8644
9299
  }));
8645
- createRenderEffect(() => _el$46.value = chatProviderId());
8646
- return _el$44;
9300
+ createRenderEffect(() => _el$57.value = chatProviderId());
9301
+ return _el$55;
8647
9302
  })(), createComponent(Show, {
8648
9303
  get when() {
8649
9304
  return chatProviderMeta().requiresKey || chatProviderId() === "custom";
8650
9305
  },
8651
9306
  get children() {
8652
- var _el$47 = _tmpl$9(), _el$48 = _el$47.firstChild;
8653
- _el$48.firstChild;
8654
- var _el$51 = _el$48.nextSibling;
8655
- insert(_el$48, createComponent(Show, {
9307
+ var _el$58 = _tmpl$0(), _el$59 = _el$58.firstChild;
9308
+ _el$59.firstChild;
9309
+ var _el$62 = _el$59.nextSibling;
9310
+ insert(_el$59, createComponent(Show, {
8656
9311
  get when() {
8657
9312
  return !chatProviderMeta().requiresKey;
8658
9313
  },
8659
9314
  get children() {
8660
- return _tmpl$6$1();
9315
+ return _tmpl$7();
8661
9316
  }
8662
9317
  }), null);
8663
- _el$51.$$input = (e) => {
9318
+ _el$62.$$input = (e) => {
8664
9319
  setChatApiKey(e.currentTarget.value);
8665
9320
  if (e.currentTarget.value.trim()) {
8666
9321
  setChatHasStoredApiKey(true);
8667
9322
  }
8668
9323
  };
8669
- setAttribute(_el$51, "spellcheck", false);
8670
- insert(_el$47, createComponent(Show, {
9324
+ setAttribute(_el$62, "spellcheck", false);
9325
+ insert(_el$58, createComponent(Show, {
8671
9326
  get when() {
8672
9327
  return memo(() => !!chatHasStoredApiKey())() && !chatApiKey().trim();
8673
9328
  },
8674
9329
  get children() {
8675
- return _tmpl$7();
9330
+ return _tmpl$8();
8676
9331
  }
8677
9332
  }), null);
8678
- insert(_el$47, createComponent(Show, {
9333
+ insert(_el$58, createComponent(Show, {
8679
9334
  get when() {
8680
9335
  return chatProviderId() === "custom";
8681
9336
  },
8682
9337
  get children() {
8683
- return _tmpl$8();
9338
+ return _tmpl$9();
8684
9339
  }
8685
9340
  }), null);
8686
- createRenderEffect(() => setAttribute(_el$51, "placeholder", chatHasStoredApiKey() && !chatApiKey().trim() ? "Stored securely. Enter a new key to replace it." : chatProviderMeta().keyPlaceholder || "Bearer token or API key"));
8687
- createRenderEffect(() => _el$51.value = chatApiKey());
8688
- return _el$47;
9341
+ createRenderEffect(() => setAttribute(_el$62, "placeholder", chatHasStoredApiKey() && !chatApiKey().trim() ? "Stored securely. Enter a new key to replace it." : chatProviderMeta().keyPlaceholder || "Bearer token or API key"));
9342
+ createRenderEffect(() => _el$62.value = chatApiKey());
9343
+ return _el$58;
8689
9344
  }
8690
9345
  }), (() => {
8691
- var _el$54 = _tmpl$10(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$58 = _el$56.firstChild;
8692
- insert(_el$56, createComponent(Show, {
9346
+ var _el$65 = _tmpl$11(), _el$66 = _el$65.firstChild, _el$67 = _el$66.nextSibling, _el$69 = _el$67.firstChild;
9347
+ insert(_el$67, createComponent(Show, {
8693
9348
  get when() {
8694
9349
  return providerModels().length > 0;
8695
9350
  },
8696
9351
  get fallback() {
8697
9352
  return (() => {
8698
- var _el$142 = _tmpl$30();
8699
- _el$142.$$input = (e) => setChatModel(e.currentTarget.value);
8700
- setAttribute(_el$142, "spellcheck", false);
8701
- createRenderEffect(() => setAttribute(_el$142, "placeholder", modelFetchState() === "loading" ? "Fetching models…" : chatProviderMeta().requiresKey && !chatApiKey().trim() && !chatHasStoredApiKey() ? "Enter API key to load models" : chatProviderMeta().defaultModel || "model name"));
8702
- createRenderEffect(() => _el$142.value = chatModel());
8703
- return _el$142;
9353
+ var _el$178 = _tmpl$34();
9354
+ _el$178.$$input = (e) => setChatModel(e.currentTarget.value);
9355
+ setAttribute(_el$178, "spellcheck", false);
9356
+ createRenderEffect(() => setAttribute(_el$178, "placeholder", modelFetchState() === "loading" ? "Fetching models…" : chatProviderMeta().requiresKey && !chatApiKey().trim() && !chatHasStoredApiKey() ? "Enter API key to load models" : chatProviderMeta().defaultModel || "model name"));
9357
+ createRenderEffect(() => _el$178.value = chatModel());
9358
+ return _el$178;
8704
9359
  })();
8705
9360
  },
8706
9361
  get children() {
8707
- var _el$57 = _tmpl$0();
8708
- _el$57.addEventListener("change", (e) => setChatModel(e.currentTarget.value));
8709
- insert(_el$57, createComponent(For, {
9362
+ var _el$68 = _tmpl$1();
9363
+ _el$68.addEventListener("change", (e) => setChatModel(e.currentTarget.value));
9364
+ insert(_el$68, createComponent(For, {
8710
9365
  get each() {
8711
9366
  return providerModels();
8712
9367
  },
8713
9368
  children: (m) => (() => {
8714
- var _el$143 = _tmpl$29();
8715
- _el$143.value = m;
8716
- insert(_el$143, m);
8717
- return _el$143;
9369
+ var _el$179 = _tmpl$33();
9370
+ _el$179.value = m;
9371
+ insert(_el$179, m);
9372
+ return _el$179;
8718
9373
  })()
8719
9374
  }));
8720
- createRenderEffect(() => _el$57.value = chatModel());
8721
- return _el$57;
9375
+ createRenderEffect(() => _el$68.value = chatModel());
9376
+ return _el$68;
8722
9377
  }
8723
- }), _el$58);
8724
- _el$58.$$click = doFetchModels;
8725
- insert(_el$54, createComponent(Show, {
9378
+ }), _el$69);
9379
+ _el$69.$$click = doFetchModels;
9380
+ insert(_el$65, createComponent(Show, {
8726
9381
  get when() {
8727
9382
  return modelFetchState() === "error";
8728
9383
  },
8729
9384
  get children() {
8730
- return _tmpl$1();
9385
+ return _tmpl$10();
8731
9386
  }
8732
9387
  }), null);
8733
- insert(_el$54, createComponent(Show, {
9388
+ insert(_el$65, createComponent(Show, {
8734
9389
  get when() {
8735
9390
  return modelFetchWarning();
8736
9391
  },
8737
9392
  children: (warning) => (() => {
8738
- var _el$144 = _tmpl$31();
8739
- insert(_el$144, warning);
8740
- return _el$144;
9393
+ var _el$180 = _tmpl$35();
9394
+ insert(_el$180, warning);
9395
+ return _el$180;
8741
9396
  })()
8742
9397
  }), null);
8743
- createRenderEffect(() => _el$58.disabled = modelFetchState() === "loading");
8744
- return _el$54;
9398
+ createRenderEffect(() => _el$69.disabled = modelFetchState() === "loading");
9399
+ return _el$65;
8745
9400
  })(), createComponent(Show, {
8746
9401
  get when() {
8747
9402
  return chatProviderMeta().needsBaseUrl || chatProviderId() === "custom";
8748
9403
  },
8749
9404
  get children() {
8750
- var _el$60 = _tmpl$11(), _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling;
8751
- _el$62.$$input = (e) => setChatBaseUrl(e.currentTarget.value);
8752
- setAttribute(_el$62, "spellcheck", false);
8753
- createRenderEffect(() => setAttribute(_el$62, "placeholder", chatProviderMeta().defaultBaseUrl ?? "https://..."));
8754
- createRenderEffect(() => _el$62.value = chatBaseUrl());
8755
- return _el$60;
9405
+ var _el$71 = _tmpl$12(), _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling;
9406
+ _el$73.$$input = (e) => setChatBaseUrl(e.currentTarget.value);
9407
+ setAttribute(_el$73, "spellcheck", false);
9408
+ createRenderEffect(() => setAttribute(_el$73, "placeholder", chatProviderMeta().defaultBaseUrl ?? "https://..."));
9409
+ createRenderEffect(() => _el$73.value = chatBaseUrl());
9410
+ return _el$71;
8756
9411
  }
8757
9412
  }), createComponent(Show, {
8758
9413
  get when() {
8759
9414
  return chatProviderId() === "llama_cpp";
8760
9415
  },
8761
9416
  get children() {
8762
- return _tmpl$12();
9417
+ return _tmpl$13();
8763
9418
  }
8764
9419
  })];
8765
9420
  }
8766
- }), _el$64);
8767
- insert(_el$65, createComponent(Show, {
9421
+ }), _el$75);
9422
+ insert(_el$76, createComponent(Show, {
8768
9423
  get when() {
8769
9424
  return premiumActive();
8770
9425
  },
8771
9426
  get fallback() {
8772
9427
  return (() => {
8773
- var _el$145 = _tmpl$34(), _el$146 = _el$145.firstChild, _el$147 = _el$146.nextSibling, _el$148 = _el$147.firstChild, _el$149 = _el$148.nextSibling, _el$153 = _el$147.nextSibling;
8774
- _el$148.$$input = (e) => {
9428
+ var _el$181 = _tmpl$38(), _el$182 = _el$181.firstChild, _el$183 = _el$182.nextSibling, _el$184 = _el$183.firstChild, _el$185 = _el$184.nextSibling, _el$189 = _el$183.nextSibling;
9429
+ _el$184.$$input = (e) => {
8775
9430
  const nextEmail = e.currentTarget.value;
8776
9431
  if (nextEmail.trim().toLowerCase() !== premiumEmail().trim().toLowerCase()) {
8777
9432
  resetPremiumActivationFlow();
@@ -8779,8 +9434,8 @@ const Settings = () => {
8779
9434
  }
8780
9435
  setPremiumEmail(nextEmail);
8781
9436
  };
8782
- setAttribute(_el$148, "spellcheck", false);
8783
- _el$149.$$click = async () => {
9437
+ setAttribute(_el$184, "spellcheck", false);
9438
+ _el$185.$$click = async () => {
8784
9439
  setPremiumLoading(true);
8785
9440
  setPremiumMessage(null);
8786
9441
  try {
@@ -8809,23 +9464,23 @@ const Settings = () => {
8809
9464
  setPremiumLoading(false);
8810
9465
  }
8811
9466
  };
8812
- insert(_el$149, (() => {
9467
+ insert(_el$185, (() => {
8813
9468
  var _c$ = memo(() => !!premiumLoading());
8814
9469
  return () => _c$() ? "Sending..." : premiumCodeSent() ? "Resend Code" : "Send Code";
8815
9470
  })());
8816
- insert(_el$145, createComponent(Show, {
9471
+ insert(_el$181, createComponent(Show, {
8817
9472
  get when() {
8818
9473
  return premiumCodeSent();
8819
9474
  },
8820
9475
  get children() {
8821
- var _el$150 = _tmpl$32(), _el$151 = _el$150.firstChild, _el$152 = _el$151.nextSibling;
8822
- _el$151.$$input = (e) => {
9476
+ var _el$186 = _tmpl$36(), _el$187 = _el$186.firstChild, _el$188 = _el$187.nextSibling;
9477
+ _el$187.$$input = (e) => {
8823
9478
  const nextCode = e.currentTarget.value.replace(/\D+/g, "").slice(0, 6);
8824
9479
  setPremiumCode(nextCode);
8825
9480
  setPremiumMessage(null);
8826
9481
  };
8827
- setAttribute(_el$151, "spellcheck", false);
8828
- _el$152.$$click = async () => {
9482
+ setAttribute(_el$187, "spellcheck", false);
9483
+ _el$188.$$click = async () => {
8829
9484
  setPremiumLoading(true);
8830
9485
  setPremiumMessage(null);
8831
9486
  try {
@@ -8852,60 +9507,60 @@ const Settings = () => {
8852
9507
  setPremiumLoading(false);
8853
9508
  }
8854
9509
  };
8855
- insert(_el$152, () => premiumLoading() ? "Verifying..." : "Verify Code");
8856
- createRenderEffect(() => _el$152.disabled = premiumLoading() || !premiumEmail().trim() || premiumCode().trim().length !== 6 || !premiumChallengeToken());
8857
- createRenderEffect(() => _el$151.value = premiumCode());
8858
- return _el$150;
9510
+ insert(_el$188, () => premiumLoading() ? "Verifying..." : "Verify Code");
9511
+ createRenderEffect(() => _el$188.disabled = premiumLoading() || !premiumEmail().trim() || premiumCode().trim().length !== 6 || !premiumChallengeToken());
9512
+ createRenderEffect(() => _el$187.value = premiumCode());
9513
+ return _el$186;
8859
9514
  }
8860
- }), _el$153);
8861
- _el$153.$$click = () => {
9515
+ }), _el$189);
9516
+ _el$189.$$click = () => {
8862
9517
  startPremiumCheckout();
8863
9518
  };
8864
- insert(_el$145, createComponent(Show, {
9519
+ insert(_el$181, createComponent(Show, {
8865
9520
  get when() {
8866
9521
  return premiumMessage();
8867
9522
  },
8868
9523
  children: (msg) => (() => {
8869
- var _el$155 = _tmpl$35();
8870
- insert(_el$155, () => msg().text);
9524
+ var _el$191 = _tmpl$39();
9525
+ insert(_el$191, () => msg().text);
8871
9526
  createRenderEffect((_p$) => {
8872
- var _v$10 = !!(msg().kind === "success"), _v$11 = !!(msg().kind === "error");
8873
- _v$10 !== _p$.e && _el$155.classList.toggle("success", _p$.e = _v$10);
8874
- _v$11 !== _p$.t && _el$155.classList.toggle("error", _p$.t = _v$11);
9527
+ var _v$11 = !!(msg().kind === "success"), _v$12 = !!(msg().kind === "error");
9528
+ _v$11 !== _p$.e && _el$191.classList.toggle("success", _p$.e = _v$11);
9529
+ _v$12 !== _p$.t && _el$191.classList.toggle("error", _p$.t = _v$12);
8875
9530
  return _p$;
8876
9531
  }, {
8877
9532
  e: void 0,
8878
9533
  t: void 0
8879
9534
  });
8880
- return _el$155;
9535
+ return _el$191;
8881
9536
  })()
8882
9537
  }), null);
8883
- insert(_el$145, createComponent(Show, {
9538
+ insert(_el$181, createComponent(Show, {
8884
9539
  get when() {
8885
9540
  return premiumState().email || premiumEmail();
8886
9541
  },
8887
9542
  get children() {
8888
- var _el$154 = _tmpl$33();
8889
- _el$154.$$click = async () => {
9543
+ var _el$190 = _tmpl$37();
9544
+ _el$190.$$click = async () => {
8890
9545
  const state = await window.vessel.premium.reset();
8891
9546
  setPremiumState(state);
8892
9547
  setPremiumEmail("");
8893
9548
  resetPremiumActivationFlow();
8894
9549
  setPremiumMessage(null);
8895
9550
  };
8896
- return _el$154;
9551
+ return _el$190;
8897
9552
  }
8898
9553
  }), null);
8899
- createRenderEffect(() => _el$149.disabled = premiumLoading() || !premiumEmail().trim());
8900
- createRenderEffect(() => _el$148.value = premiumEmail());
8901
- return _el$145;
9554
+ createRenderEffect(() => _el$185.disabled = premiumLoading() || !premiumEmail().trim());
9555
+ createRenderEffect(() => _el$184.value = premiumEmail());
9556
+ return _el$181;
8902
9557
  })();
8903
9558
  },
8904
9559
  get children() {
8905
- var _el$67 = _tmpl$13(), _el$68 = _el$67.firstChild;
8906
- _el$68.firstChild;
8907
- var _el$70 = _el$68.nextSibling, _el$71 = _el$70.nextSibling, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling;
8908
- insert(_el$68, createComponent(Show, {
9560
+ var _el$78 = _tmpl$14(), _el$79 = _el$78.firstChild;
9561
+ _el$79.firstChild;
9562
+ var _el$81 = _el$79.nextSibling, _el$82 = _el$81.nextSibling, _el$83 = _el$82.firstChild, _el$84 = _el$83.nextSibling;
9563
+ insert(_el$79, createComponent(Show, {
8909
9564
  get when() {
8910
9565
  return premiumState().status === "trialing";
8911
9566
  },
@@ -8913,8 +9568,8 @@ const Settings = () => {
8913
9568
  return [" ", "(Trial)"];
8914
9569
  }
8915
9570
  }), null);
8916
- insert(_el$70, () => premiumState().email, null);
8917
- insert(_el$70, createComponent(Show, {
9571
+ insert(_el$81, () => premiumState().email, null);
9572
+ insert(_el$81, createComponent(Show, {
8918
9573
  get when() {
8919
9574
  return premiumState().expiresAt;
8920
9575
  },
@@ -8922,51 +9577,77 @@ const Settings = () => {
8922
9577
  return [" ", "· Renews", " ", memo(() => new Date(premiumState().expiresAt).toLocaleDateString())];
8923
9578
  }
8924
9579
  }), null);
8925
- _el$72.$$click = () => {
8926
- void window.vessel.premium.portal();
9580
+ _el$83.$$click = async () => {
9581
+ const result = await window.vessel.premium.portal();
9582
+ if (!result.ok) {
9583
+ setPremiumMessage({
9584
+ kind: "error",
9585
+ text: result.error || "Could not open billing portal."
9586
+ });
9587
+ setTimeout(() => setPremiumMessage(null), 5e3);
9588
+ }
8927
9589
  };
8928
- _el$73.$$click = async () => {
9590
+ _el$84.$$click = async () => {
8929
9591
  const state = await window.vessel.premium.reset();
8930
9592
  setPremiumState(state);
8931
9593
  setPremiumEmail("");
8932
9594
  resetPremiumActivationFlow();
8933
9595
  setPremiumMessage(null);
8934
9596
  };
8935
- return _el$67;
9597
+ insert(_el$78, createComponent(Show, {
9598
+ get when() {
9599
+ return premiumMessage();
9600
+ },
9601
+ children: (msg) => (() => {
9602
+ var _el$192 = _tmpl$39();
9603
+ insert(_el$192, () => msg().text);
9604
+ createRenderEffect((_p$) => {
9605
+ var _v$13 = !!(msg().kind === "success"), _v$14 = !!(msg().kind === "error");
9606
+ _v$13 !== _p$.e && _el$192.classList.toggle("success", _p$.e = _v$13);
9607
+ _v$14 !== _p$.t && _el$192.classList.toggle("error", _p$.t = _v$14);
9608
+ return _p$;
9609
+ }, {
9610
+ e: void 0,
9611
+ t: void 0
9612
+ });
9613
+ return _el$192;
9614
+ })()
9615
+ }), null);
9616
+ return _el$78;
8936
9617
  }
8937
9618
  }), null);
8938
- insert(_el$76, createComponent(Show, {
9619
+ insert(_el$87, createComponent(Show, {
8939
9620
  get when() {
8940
9621
  return !premiumActive();
8941
9622
  },
8942
9623
  get children() {
8943
- return _tmpl$14();
9624
+ return _tmpl$15();
8944
9625
  }
8945
9626
  }), null);
8946
- insert(_el$75, createComponent(Show, {
9627
+ insert(_el$86, createComponent(Show, {
8947
9628
  get when() {
8948
9629
  return premiumActive();
8949
9630
  },
8950
9631
  get fallback() {
8951
- return _tmpl$36();
9632
+ return _tmpl$40();
8952
9633
  },
8953
9634
  get children() {
8954
- return [_tmpl$15(), createComponent(Show, {
9635
+ return [_tmpl$16(), createComponent(Show, {
8955
9636
  get when() {
8956
9637
  return vaultEntries().length > 0;
8957
9638
  },
8958
9639
  get children() {
8959
- var _el$80 = _tmpl$16();
8960
- insert(_el$80, createComponent(For, {
9640
+ var _el$91 = _tmpl$5$1();
9641
+ insert(_el$91, createComponent(For, {
8961
9642
  get each() {
8962
9643
  return vaultEntries();
8963
9644
  },
8964
9645
  children: (entry) => (() => {
8965
- var _el$157 = _tmpl$37(), _el$158 = _el$157.firstChild, _el$159 = _el$158.firstChild, _el$160 = _el$159.nextSibling, _el$161 = _el$160.firstChild, _el$162 = _el$158.nextSibling;
8966
- insert(_el$159, () => entry.label);
8967
- insert(_el$160, () => entry.username, _el$161);
8968
- insert(_el$160, () => entry.domainPattern, null);
8969
- insert(_el$160, createComponent(Show, {
9646
+ var _el$194 = _tmpl$41(), _el$195 = _el$194.firstChild, _el$196 = _el$195.firstChild, _el$197 = _el$196.nextSibling, _el$198 = _el$197.firstChild, _el$199 = _el$195.nextSibling;
9647
+ insert(_el$196, () => entry.label);
9648
+ insert(_el$197, () => entry.username, _el$198);
9649
+ insert(_el$197, () => entry.domainPattern, null);
9650
+ insert(_el$197, createComponent(Show, {
8970
9651
  get when() {
8971
9652
  return entry.useCount > 0;
8972
9653
  },
@@ -8974,43 +9655,43 @@ const Settings = () => {
8974
9655
  return [" ", "· Used ", memo(() => entry.useCount), "x"];
8975
9656
  }
8976
9657
  }), null);
8977
- _el$162.$$click = () => handleVaultRemove(entry.id);
8978
- return _el$157;
9658
+ _el$199.$$click = () => handleVaultRemove(entry.id);
9659
+ return _el$194;
8979
9660
  })()
8980
9661
  }));
8981
- return _el$80;
9662
+ return _el$91;
8982
9663
  }
8983
9664
  }), createComponent(Show, {
8984
9665
  get when() {
8985
9666
  return !vaultAdding();
8986
9667
  },
8987
9668
  get children() {
8988
- var _el$81 = _tmpl$17();
8989
- _el$81.$$click = () => {
9669
+ var _el$92 = _tmpl$17();
9670
+ _el$92.$$click = () => {
8990
9671
  setVaultAdding(true);
8991
9672
  setVaultMessage(null);
8992
9673
  };
8993
- return _el$81;
9674
+ return _el$92;
8994
9675
  }
8995
9676
  }), createComponent(Show, {
8996
9677
  get when() {
8997
9678
  return vaultAdding();
8998
9679
  },
8999
9680
  get children() {
9000
- var _el$82 = _tmpl$18(), _el$83 = _el$82.firstChild, _el$84 = _el$83.nextSibling, _el$85 = _el$84.nextSibling, _el$86 = _el$85.nextSibling, _el$87 = _el$86.nextSibling, _el$88 = _el$87.nextSibling, _el$89 = _el$88.nextSibling, _el$90 = _el$89.firstChild, _el$91 = _el$90.nextSibling;
9001
- _el$83.$$input = (e) => setVaultNewLabel(e.currentTarget.value);
9002
- setAttribute(_el$83, "spellcheck", false);
9003
- _el$84.$$input = (e) => setVaultNewDomain(e.currentTarget.value);
9004
- setAttribute(_el$84, "spellcheck", false);
9005
- _el$85.$$input = (e) => setVaultNewUsername(e.currentTarget.value);
9006
- setAttribute(_el$85, "spellcheck", false);
9007
- _el$86.$$input = (e) => setVaultNewPassword(e.currentTarget.value);
9008
- _el$87.$$input = (e) => setVaultNewTotp(e.currentTarget.value);
9009
- setAttribute(_el$87, "spellcheck", false);
9010
- _el$88.$$input = (e) => setVaultNewNotes(e.currentTarget.value);
9011
- setAttribute(_el$88, "spellcheck", false);
9012
- _el$90.$$click = handleVaultAdd;
9013
- _el$91.$$click = () => {
9681
+ var _el$93 = _tmpl$18(), _el$94 = _el$93.firstChild, _el$95 = _el$94.nextSibling, _el$96 = _el$95.nextSibling, _el$97 = _el$96.nextSibling, _el$98 = _el$97.nextSibling, _el$99 = _el$98.nextSibling, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling;
9682
+ _el$94.$$input = (e) => setVaultNewLabel(e.currentTarget.value);
9683
+ setAttribute(_el$94, "spellcheck", false);
9684
+ _el$95.$$input = (e) => setVaultNewDomain(e.currentTarget.value);
9685
+ setAttribute(_el$95, "spellcheck", false);
9686
+ _el$96.$$input = (e) => setVaultNewUsername(e.currentTarget.value);
9687
+ setAttribute(_el$96, "spellcheck", false);
9688
+ _el$97.$$input = (e) => setVaultNewPassword(e.currentTarget.value);
9689
+ _el$98.$$input = (e) => setVaultNewTotp(e.currentTarget.value);
9690
+ setAttribute(_el$98, "spellcheck", false);
9691
+ _el$99.$$input = (e) => setVaultNewNotes(e.currentTarget.value);
9692
+ setAttribute(_el$99, "spellcheck", false);
9693
+ _el$101.$$click = handleVaultAdd;
9694
+ _el$102.$$click = () => {
9014
9695
  setVaultAdding(false);
9015
9696
  setVaultNewLabel("");
9016
9697
  setVaultNewDomain("");
@@ -9019,100 +9700,100 @@ const Settings = () => {
9019
9700
  setVaultNewTotp("");
9020
9701
  setVaultNewNotes("");
9021
9702
  };
9022
- createRenderEffect(() => _el$83.value = vaultNewLabel());
9023
- createRenderEffect(() => _el$84.value = vaultNewDomain());
9024
- createRenderEffect(() => _el$85.value = vaultNewUsername());
9025
- createRenderEffect(() => _el$86.value = vaultNewPassword());
9026
- createRenderEffect(() => _el$87.value = vaultNewTotp());
9027
- createRenderEffect(() => _el$88.value = vaultNewNotes());
9028
- return _el$82;
9703
+ createRenderEffect(() => _el$94.value = vaultNewLabel());
9704
+ createRenderEffect(() => _el$95.value = vaultNewDomain());
9705
+ createRenderEffect(() => _el$96.value = vaultNewUsername());
9706
+ createRenderEffect(() => _el$97.value = vaultNewPassword());
9707
+ createRenderEffect(() => _el$98.value = vaultNewTotp());
9708
+ createRenderEffect(() => _el$99.value = vaultNewNotes());
9709
+ return _el$93;
9029
9710
  }
9030
9711
  }), createComponent(Show, {
9031
9712
  get when() {
9032
9713
  return vaultMessage();
9033
9714
  },
9034
9715
  children: (msg) => (() => {
9035
- var _el$163 = _tmpl$35();
9036
- insert(_el$163, () => msg().text);
9716
+ var _el$200 = _tmpl$39();
9717
+ insert(_el$200, () => msg().text);
9037
9718
  createRenderEffect((_p$) => {
9038
- var _v$12 = !!(msg().kind === "success"), _v$13 = !!(msg().kind === "error");
9039
- _v$12 !== _p$.e && _el$163.classList.toggle("success", _p$.e = _v$12);
9040
- _v$13 !== _p$.t && _el$163.classList.toggle("error", _p$.t = _v$13);
9719
+ var _v$15 = !!(msg().kind === "success"), _v$16 = !!(msg().kind === "error");
9720
+ _v$15 !== _p$.e && _el$200.classList.toggle("success", _p$.e = _v$15);
9721
+ _v$16 !== _p$.t && _el$200.classList.toggle("error", _p$.t = _v$16);
9041
9722
  return _p$;
9042
9723
  }, {
9043
9724
  e: void 0,
9044
9725
  t: void 0
9045
9726
  });
9046
- return _el$163;
9727
+ return _el$200;
9047
9728
  })()
9048
9729
  })];
9049
9730
  }
9050
9731
  }), null);
9051
- insert(_el$93, createComponent(Show, {
9732
+ insert(_el$104, createComponent(Show, {
9052
9733
  get when() {
9053
9734
  return autofillProfiles().length > 0;
9054
9735
  },
9055
9736
  get children() {
9056
- var _el$96 = _tmpl$16();
9057
- insert(_el$96, createComponent(For, {
9737
+ var _el$107 = _tmpl$5$1();
9738
+ insert(_el$107, createComponent(For, {
9058
9739
  get each() {
9059
9740
  return autofillProfiles();
9060
9741
  },
9061
9742
  children: (profile) => (() => {
9062
- var _el$164 = _tmpl$38(), _el$165 = _el$164.firstChild, _el$166 = _el$165.firstChild, _el$167 = _el$166.nextSibling, _el$168 = _el$165.nextSibling, _el$169 = _el$168.firstChild, _el$170 = _el$169.nextSibling;
9063
- insert(_el$166, () => profile.label);
9064
- insert(_el$167, () => profile.firstName, null);
9065
- insert(_el$167, (() => {
9743
+ var _el$201 = _tmpl$42(), _el$202 = _el$201.firstChild, _el$203 = _el$202.firstChild, _el$204 = _el$203.nextSibling, _el$205 = _el$202.nextSibling, _el$206 = _el$205.firstChild, _el$207 = _el$206.nextSibling;
9744
+ insert(_el$203, () => profile.label);
9745
+ insert(_el$204, () => profile.firstName, null);
9746
+ insert(_el$204, (() => {
9066
9747
  var _c$2 = memo(() => !!profile.lastName);
9067
9748
  return () => _c$2() ? ` ${profile.lastName}` : "";
9068
9749
  })(), null);
9069
- insert(_el$167, (() => {
9750
+ insert(_el$204, (() => {
9070
9751
  var _c$3 = memo(() => !!profile.email);
9071
9752
  return () => _c$3() ? ` · ${profile.email}` : "";
9072
9753
  })(), null);
9073
- _el$169.$$click = () => handleAutofillFill(profile.id);
9074
- _el$170.$$click = () => handleAutofillRemove(profile.id);
9075
- return _el$164;
9754
+ _el$206.$$click = () => handleAutofillFill(profile.id);
9755
+ _el$207.$$click = () => handleAutofillRemove(profile.id);
9756
+ return _el$201;
9076
9757
  })()
9077
9758
  }));
9078
- return _el$96;
9759
+ return _el$107;
9079
9760
  }
9080
9761
  }), null);
9081
- insert(_el$93, createComponent(Show, {
9762
+ insert(_el$104, createComponent(Show, {
9082
9763
  get when() {
9083
9764
  return !autofillAdding();
9084
9765
  },
9085
9766
  get children() {
9086
- var _el$97 = _tmpl$19();
9087
- _el$97.$$click = () => {
9767
+ var _el$108 = _tmpl$19();
9768
+ _el$108.$$click = () => {
9088
9769
  setAutofillAdding(true);
9089
9770
  setAutofillMessage(null);
9090
9771
  };
9091
- return _el$97;
9772
+ return _el$108;
9092
9773
  }
9093
9774
  }), null);
9094
- insert(_el$93, createComponent(Show, {
9775
+ insert(_el$104, createComponent(Show, {
9095
9776
  get when() {
9096
9777
  return autofillAdding();
9097
9778
  },
9098
9779
  get children() {
9099
- var _el$98 = _tmpl$20(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling, _el$103 = _el$100.nextSibling, _el$104 = _el$103.firstChild, _el$105 = _el$104.nextSibling, _el$106 = _el$103.nextSibling, _el$107 = _el$106.nextSibling, _el$108 = _el$107.nextSibling, _el$109 = _el$108.nextSibling, _el$110 = _el$109.firstChild, _el$111 = _el$110.nextSibling, _el$112 = _el$111.nextSibling, _el$113 = _el$109.nextSibling, _el$114 = _el$113.nextSibling, _el$115 = _el$114.firstChild, _el$116 = _el$115.nextSibling;
9100
- _el$99.$$input = (e) => setAutofillLabel(e.currentTarget.value);
9101
- setAttribute(_el$99, "spellcheck", false);
9102
- _el$101.$$input = (e) => setAutofillFirstName(e.currentTarget.value);
9103
- _el$102.$$input = (e) => setAutofillLastName(e.currentTarget.value);
9104
- _el$104.$$input = (e) => setAutofillEmail(e.currentTarget.value);
9105
- setAttribute(_el$104, "spellcheck", false);
9106
- _el$105.$$input = (e) => setAutofillPhone(e.currentTarget.value);
9107
- _el$106.$$input = (e) => setAutofillOrg(e.currentTarget.value);
9108
- _el$107.$$input = (e) => setAutofillAddr1(e.currentTarget.value);
9109
- _el$108.$$input = (e) => setAutofillAddr2(e.currentTarget.value);
9110
- _el$110.$$input = (e) => setAutofillCity(e.currentTarget.value);
9111
- _el$111.$$input = (e) => setAutofillState(e.currentTarget.value);
9112
- _el$112.$$input = (e) => setAutofillZip(e.currentTarget.value);
9113
- _el$113.$$input = (e) => setAutofillCountry(e.currentTarget.value);
9114
- _el$115.$$click = handleAutofillAdd;
9115
- _el$116.$$click = () => {
9780
+ var _el$109 = _tmpl$20(), _el$110 = _el$109.firstChild, _el$111 = _el$110.nextSibling, _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling, _el$114 = _el$111.nextSibling, _el$115 = _el$114.firstChild, _el$116 = _el$115.nextSibling, _el$117 = _el$114.nextSibling, _el$118 = _el$117.nextSibling, _el$119 = _el$118.nextSibling, _el$120 = _el$119.nextSibling, _el$121 = _el$120.firstChild, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling, _el$124 = _el$120.nextSibling, _el$125 = _el$124.nextSibling, _el$126 = _el$125.firstChild, _el$127 = _el$126.nextSibling;
9781
+ _el$110.$$input = (e) => setAutofillLabel(e.currentTarget.value);
9782
+ setAttribute(_el$110, "spellcheck", false);
9783
+ _el$112.$$input = (e) => setAutofillFirstName(e.currentTarget.value);
9784
+ _el$113.$$input = (e) => setAutofillLastName(e.currentTarget.value);
9785
+ _el$115.$$input = (e) => setAutofillEmail(e.currentTarget.value);
9786
+ setAttribute(_el$115, "spellcheck", false);
9787
+ _el$116.$$input = (e) => setAutofillPhone(e.currentTarget.value);
9788
+ _el$117.$$input = (e) => setAutofillOrg(e.currentTarget.value);
9789
+ _el$118.$$input = (e) => setAutofillAddr1(e.currentTarget.value);
9790
+ _el$119.$$input = (e) => setAutofillAddr2(e.currentTarget.value);
9791
+ _el$121.$$input = (e) => setAutofillCity(e.currentTarget.value);
9792
+ _el$122.$$input = (e) => setAutofillState(e.currentTarget.value);
9793
+ _el$123.$$input = (e) => setAutofillZip(e.currentTarget.value);
9794
+ _el$124.$$input = (e) => setAutofillCountry(e.currentTarget.value);
9795
+ _el$126.$$click = handleAutofillAdd;
9796
+ _el$127.$$click = () => {
9116
9797
  setAutofillAdding(false);
9117
9798
  setAutofillLabel("");
9118
9799
  setAutofillFirstName("");
@@ -9127,73 +9808,103 @@ const Settings = () => {
9127
9808
  setAutofillZip("");
9128
9809
  setAutofillCountry("");
9129
9810
  };
9130
- createRenderEffect(() => _el$99.value = autofillLabel());
9131
- createRenderEffect(() => _el$101.value = autofillFirstName());
9132
- createRenderEffect(() => _el$102.value = autofillLastName());
9133
- createRenderEffect(() => _el$104.value = autofillEmail());
9134
- createRenderEffect(() => _el$105.value = autofillPhone());
9135
- createRenderEffect(() => _el$106.value = autofillOrg());
9136
- createRenderEffect(() => _el$107.value = autofillAddr1());
9137
- createRenderEffect(() => _el$108.value = autofillAddr2());
9138
- createRenderEffect(() => _el$110.value = autofillCity());
9139
- createRenderEffect(() => _el$111.value = autofillState());
9140
- createRenderEffect(() => _el$112.value = autofillZip());
9141
- createRenderEffect(() => _el$113.value = autofillCountry());
9142
- return _el$98;
9811
+ createRenderEffect(() => _el$110.value = autofillLabel());
9812
+ createRenderEffect(() => _el$112.value = autofillFirstName());
9813
+ createRenderEffect(() => _el$113.value = autofillLastName());
9814
+ createRenderEffect(() => _el$115.value = autofillEmail());
9815
+ createRenderEffect(() => _el$116.value = autofillPhone());
9816
+ createRenderEffect(() => _el$117.value = autofillOrg());
9817
+ createRenderEffect(() => _el$118.value = autofillAddr1());
9818
+ createRenderEffect(() => _el$119.value = autofillAddr2());
9819
+ createRenderEffect(() => _el$121.value = autofillCity());
9820
+ createRenderEffect(() => _el$122.value = autofillState());
9821
+ createRenderEffect(() => _el$123.value = autofillZip());
9822
+ createRenderEffect(() => _el$124.value = autofillCountry());
9823
+ return _el$109;
9143
9824
  }
9144
9825
  }), null);
9145
- insert(_el$93, createComponent(Show, {
9826
+ insert(_el$104, createComponent(Show, {
9146
9827
  get when() {
9147
9828
  return autofillMessage();
9148
9829
  },
9149
9830
  children: (msg) => (() => {
9150
- var _el$171 = _tmpl$35();
9151
- insert(_el$171, () => msg().text);
9831
+ var _el$208 = _tmpl$39();
9832
+ insert(_el$208, () => msg().text);
9152
9833
  createRenderEffect((_p$) => {
9153
- var _v$14 = !!(msg().kind === "success"), _v$15 = !!(msg().kind === "error");
9154
- _v$14 !== _p$.e && _el$171.classList.toggle("success", _p$.e = _v$14);
9155
- _v$15 !== _p$.t && _el$171.classList.toggle("error", _p$.t = _v$15);
9834
+ var _v$17 = !!(msg().kind === "success"), _v$18 = !!(msg().kind === "error");
9835
+ _v$17 !== _p$.e && _el$208.classList.toggle("success", _p$.e = _v$17);
9836
+ _v$18 !== _p$.t && _el$208.classList.toggle("error", _p$.t = _v$18);
9156
9837
  return _p$;
9157
9838
  }, {
9158
9839
  e: void 0,
9159
9840
  t: void 0
9160
9841
  });
9161
- return _el$171;
9842
+ return _el$208;
9162
9843
  })()
9163
9844
  }), null);
9164
- _el$120.$$click = () => setTelemetryEnabled(!telemetryEnabled());
9165
- _el$122.$$click = handleSave;
9166
- addEventListener(_el$123, "click", closeSettings, true);
9845
+ _el$131.$$click = () => setTelemetryEnabled(!telemetryEnabled());
9846
+ _el$135.addEventListener("change", (e) => setTheme(e.currentTarget.value));
9847
+ _el$138.addEventListener("change", (e) => setDomainMode(e.currentTarget.value));
9848
+ insert(_el$136, createComponent(Show, {
9849
+ get when() {
9850
+ return domainMode() !== "none";
9851
+ },
9852
+ get children() {
9853
+ return [(() => {
9854
+ var _el$139 = _tmpl$21();
9855
+ _el$139.$$input = (e) => setDomainList(e.currentTarget.value);
9856
+ setAttribute(_el$139, "spellcheck", false);
9857
+ createRenderEffect(() => setAttribute(_el$139, "placeholder", domainMode() === "allowlist" ? "example.com\napi.example.com" : "ads.example.com\ntracker.io"));
9858
+ createRenderEffect(() => _el$139.value = domainList());
9859
+ return _el$139;
9860
+ })(), (() => {
9861
+ var _el$140 = _tmpl$22();
9862
+ insert(_el$140, () => domainMode() === "allowlist" ? "One domain per line. Subdomains of listed domains are also allowed." : "One domain per line. Subdomains of listed domains are also blocked.");
9863
+ return _el$140;
9864
+ })()];
9865
+ }
9866
+ }), null);
9867
+ insert(_el$136, createComponent(Show, {
9868
+ get when() {
9869
+ return domainMode() === "none";
9870
+ },
9871
+ get children() {
9872
+ return _tmpl$23();
9873
+ }
9874
+ }), null);
9875
+ _el$143.$$click = handleSave;
9876
+ addEventListener(_el$144, "click", closeSettings, true);
9167
9877
  insert(_el$2, createComponent(Show, {
9168
9878
  get when() {
9169
9879
  return status();
9170
9880
  },
9171
9881
  children: (currentStatus) => (() => {
9172
- var _el$172 = _tmpl$35();
9173
- insert(_el$172, () => currentStatus().text);
9882
+ var _el$209 = _tmpl$39();
9883
+ insert(_el$209, () => currentStatus().text);
9174
9884
  createRenderEffect((_p$) => {
9175
- var _v$16 = !!(currentStatus().kind === "success"), _v$17 = !!(currentStatus().kind === "error");
9176
- _v$16 !== _p$.e && _el$172.classList.toggle("success", _p$.e = _v$16);
9177
- _v$17 !== _p$.t && _el$172.classList.toggle("error", _p$.t = _v$17);
9885
+ var _v$19 = !!(currentStatus().kind === "success"), _v$20 = !!(currentStatus().kind === "error");
9886
+ _v$19 !== _p$.e && _el$209.classList.toggle("success", _p$.e = _v$19);
9887
+ _v$20 !== _p$.t && _el$209.classList.toggle("error", _p$.t = _v$20);
9178
9888
  return _p$;
9179
9889
  }, {
9180
9890
  e: void 0,
9181
9891
  t: void 0
9182
9892
  });
9183
- return _el$172;
9893
+ return _el$209;
9184
9894
  })()
9185
9895
  }), null);
9186
9896
  createRenderEffect((_p$) => {
9187
- var _v$ = !!settingsClosing(), _v$2 = !!autoRestoreSession(), _v$3 = autoRestoreSession(), _v$4 = !!clearBookmarksOnLaunch(), _v$5 = clearBookmarksOnLaunch(), _v$6 = !!chatEnabled(), _v$7 = chatEnabled(), _v$8 = !!telemetryEnabled(), _v$9 = telemetryEnabled();
9897
+ var _v$ = !!settingsClosing(), _v$2 = !!autoRestoreSession(), _v$3 = autoRestoreSession(), _v$4 = !!clearBookmarksOnLaunch(), _v$5 = clearBookmarksOnLaunch(), _v$6 = !sessionSaveName().trim(), _v$7 = !!chatEnabled(), _v$8 = chatEnabled(), _v$9 = !!telemetryEnabled(), _v$0 = telemetryEnabled();
9188
9898
  _v$ !== _p$.e && _el$.classList.toggle("closing", _p$.e = _v$);
9189
- _v$2 !== _p$.t && _el$36.classList.toggle("on", _p$.t = _v$2);
9190
- _v$3 !== _p$.a && setAttribute(_el$36, "aria-checked", _p$.a = _v$3);
9191
- _v$4 !== _p$.o && _el$39.classList.toggle("on", _p$.o = _v$4);
9192
- _v$5 !== _p$.i && setAttribute(_el$39, "aria-checked", _p$.i = _v$5);
9193
- _v$6 !== _p$.n && _el$43.classList.toggle("on", _p$.n = _v$6);
9194
- _v$7 !== _p$.s && setAttribute(_el$43, "aria-checked", _p$.s = _v$7);
9195
- _v$8 !== _p$.h && _el$120.classList.toggle("on", _p$.h = _v$8);
9196
- _v$9 !== _p$.r && setAttribute(_el$120, "aria-checked", _p$.r = _v$9);
9899
+ _v$2 !== _p$.t && _el$39.classList.toggle("on", _p$.t = _v$2);
9900
+ _v$3 !== _p$.a && setAttribute(_el$39, "aria-checked", _p$.a = _v$3);
9901
+ _v$4 !== _p$.o && _el$42.classList.toggle("on", _p$.o = _v$4);
9902
+ _v$5 !== _p$.i && setAttribute(_el$42, "aria-checked", _p$.i = _v$5);
9903
+ _v$6 !== _p$.n && (_el$49.disabled = _p$.n = _v$6);
9904
+ _v$7 !== _p$.s && _el$54.classList.toggle("on", _p$.s = _v$7);
9905
+ _v$8 !== _p$.h && setAttribute(_el$54, "aria-checked", _p$.h = _v$8);
9906
+ _v$9 !== _p$.r && _el$131.classList.toggle("on", _p$.r = _v$9);
9907
+ _v$0 !== _p$.d && setAttribute(_el$131, "aria-checked", _p$.d = _v$0);
9197
9908
  return _p$;
9198
9909
  }, {
9199
9910
  e: void 0,
@@ -9204,14 +9915,19 @@ const Settings = () => {
9204
9915
  n: void 0,
9205
9916
  s: void 0,
9206
9917
  h: void 0,
9207
- r: void 0
9918
+ r: void 0,
9919
+ d: void 0
9208
9920
  });
9209
9921
  createRenderEffect(() => _el$20.value = defaultUrl());
9210
- createRenderEffect(() => _el$23.value = mcpPort());
9211
- createRenderEffect(() => _el$30.value = obsidianVaultPath());
9212
- createRenderEffect(() => _el$33.value = agentTranscriptMode());
9922
+ createRenderEffect(() => _el$23.value = downloadPath());
9923
+ createRenderEffect(() => _el$26.value = mcpPort());
9924
+ createRenderEffect(() => _el$33.value = obsidianVaultPath());
9925
+ createRenderEffect(() => _el$36.value = agentTranscriptMode());
9926
+ createRenderEffect(() => _el$48.value = sessionSaveName());
9927
+ createRenderEffect(() => _el$135.value = theme());
9928
+ createRenderEffect(() => _el$138.value = domainMode());
9213
9929
  return _el$;
9214
- })(), _tmpl$22()];
9930
+ })(), _tmpl$25()];
9215
9931
  }
9216
9932
  });
9217
9933
  };
@@ -9418,6 +10134,13 @@ function setupKeybindings(handlers) {
9418
10134
  return () => document.removeEventListener("keydown", listener);
9419
10135
  }
9420
10136
  var _tmpl$ = /* @__PURE__ */ template(`<div class=loading-bar>`), _tmpl$2 = /* @__PURE__ */ template(`<div class=app><div class=chrome>`);
10137
+ try {
10138
+ const cached = localStorage.getItem("vessel:theme");
10139
+ if (cached) document.documentElement.setAttribute("data-theme", cached);
10140
+ else document.documentElement.setAttribute("data-theme", "dark");
10141
+ } catch {
10142
+ document.documentElement.setAttribute("data-theme", "dark");
10143
+ }
9421
10144
  const App = () => {
9422
10145
  const view = new URLSearchParams(window.location.search).get("view") || "chrome";
9423
10146
  const {
@@ -9461,7 +10184,19 @@ const App = () => {
9461
10184
  });
9462
10185
  }
9463
10186
  };
10187
+ const applyTheme = (theme) => {
10188
+ document.documentElement.setAttribute("data-theme", theme);
10189
+ try {
10190
+ localStorage.setItem("vessel:theme", theme);
10191
+ } catch {
10192
+ }
10193
+ };
10194
+ const loadAndApplyTheme = async () => {
10195
+ const s = await window.vessel.settings.get();
10196
+ applyTheme(s.theme ?? "dark");
10197
+ };
9464
10198
  onMount(() => {
10199
+ void loadAndApplyTheme();
9465
10200
  window.vessel.ui.rendererReady(view);
9466
10201
  if (view !== "chrome") return;
9467
10202
  const cleanupKeys = setupKeybindings({
@@ -9481,9 +10216,13 @@ const App = () => {
9481
10216
  toggleKeyboardHelp: () => setKeyboardHelpOpen((v) => !v)
9482
10217
  });
9483
10218
  const cleanupCapture = window.vessel.highlights.onCaptureResult(showHighlightResult);
10219
+ const cleanupSettings = window.vessel.settings.onUpdate((settings) => {
10220
+ applyTheme(settings.theme ?? "dark");
10221
+ });
9484
10222
  onCleanup(() => {
9485
10223
  cleanupKeys();
9486
10224
  cleanupCapture();
10225
+ cleanupSettings();
9487
10226
  });
9488
10227
  });
9489
10228
  if (view === "sidebar") {
@@ -9503,6 +10242,9 @@ const App = () => {
9503
10242
  },
9504
10243
  onDismiss: () => setHighlightToast(null)
9505
10244
  }), _el$2);
10245
+ insert(_el$, createComponent(DownloadToast, {}), _el$2);
10246
+ insert(_el$, createComponent(FindBar, {}), _el$2);
10247
+ insert(_el$, createComponent(FlowProgress, {}), _el$2);
9506
10248
  insert(_el$, createComponent(AgentTranscriptDock, {}), _el$2);
9507
10249
  insert(_el$2, createComponent(TitleBar, {}), null);
9508
10250
  insert(_el$2, createComponent(TabBar, {}), null);