@quanta-intellect/vessel-browser 0.1.58 → 0.1.60

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,15 +1488,20 @@ 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 () => {
1491
+ let initialized$4 = false;
1492
+ let initPromise$3 = null;
1493
+ let unsubscribeStateUpdate = null;
1494
+ function init$4() {
1495
+ if (initPromise$3) return initPromise$3;
1496
+ if (initialized$4) return;
1497
+ initialized$4 = true;
1498
+ initPromise$3 = (async () => {
1498
1499
  try {
1499
- window.vessel.tabs.onStateUpdate(
1500
+ if (unsubscribeStateUpdate) {
1501
+ unsubscribeStateUpdate();
1502
+ unsubscribeStateUpdate = null;
1503
+ }
1504
+ unsubscribeStateUpdate = window.vessel.tabs.onStateUpdate(
1500
1505
  (newTabs, newActiveId) => {
1501
1506
  setTabs(newTabs);
1502
1507
  setActiveTabId(newActiveId);
@@ -1506,16 +1511,21 @@ function init$3() {
1506
1511
  setTabs(initialState.tabs);
1507
1512
  setActiveTabId(initialState.activeId);
1508
1513
  } catch (error) {
1509
- initialized$3 = false;
1514
+ initialized$4 = false;
1510
1515
  console.error("Failed to initialize tabs store", error);
1511
1516
  } finally {
1512
- initPromise$2 = null;
1517
+ initPromise$3 = null;
1513
1518
  }
1514
1519
  })();
1515
- return initPromise$2;
1520
+ return initPromise$3;
1516
1521
  }
1522
+ const patchTab = (id, patch) => {
1523
+ setTabs(
1524
+ (prev) => prev.map((t) => t.id === id ? { ...t, ...patch } : t)
1525
+ );
1526
+ };
1517
1527
  function useTabs() {
1518
- init$3();
1528
+ init$4();
1519
1529
  return {
1520
1530
  tabs,
1521
1531
  activeTabId,
@@ -1538,6 +1548,13 @@ function useTabs() {
1538
1548
  reload: () => {
1539
1549
  const id = activeTabId();
1540
1550
  if (id) window.vessel.tabs.reload(id);
1551
+ },
1552
+ toggleAdBlock: async (id) => {
1553
+ const newState = await window.vessel.tabs.toggleAdBlock(id);
1554
+ if (newState !== null && newState !== void 0) {
1555
+ patchTab(id, { adBlockingEnabled: newState });
1556
+ }
1557
+ return newState;
1541
1558
  }
1542
1559
  };
1543
1560
  }
@@ -1568,13 +1585,13 @@ const DEFAULT_RUNTIME_STATE = {
1568
1585
  const [runtimeState, setRuntimeState] = createSignal(
1569
1586
  DEFAULT_RUNTIME_STATE
1570
1587
  );
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 () => {
1588
+ let initialized$3 = false;
1589
+ let initPromise$2 = null;
1590
+ async function init$3() {
1591
+ if (initPromise$2) return initPromise$2;
1592
+ if (initialized$3) return;
1593
+ initialized$3 = true;
1594
+ initPromise$2 = (async () => {
1578
1595
  try {
1579
1596
  const initial = await window.vessel.ai.getRuntime();
1580
1597
  setRuntimeState(initial);
@@ -1582,16 +1599,16 @@ async function init$2() {
1582
1599
  setRuntimeState(state);
1583
1600
  });
1584
1601
  } catch (error) {
1585
- initialized$2 = false;
1602
+ initialized$3 = false;
1586
1603
  console.error("Failed to initialize runtime store", error);
1587
1604
  } finally {
1588
- initPromise$1 = null;
1605
+ initPromise$2 = null;
1589
1606
  }
1590
1607
  })();
1591
- return initPromise$1;
1608
+ return initPromise$2;
1592
1609
  }
1593
1610
  function useRuntime() {
1594
- void init$2();
1611
+ void init$3();
1595
1612
  return {
1596
1613
  runtimeState,
1597
1614
  pause: () => window.vessel.ai.pause(),
@@ -1712,7 +1729,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
1712
1729
  }
1713
1730
  return "idle";
1714
1731
  }
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>`);
1732
+ 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
1733
  const TAB_CLOSE_MS = 200;
1717
1734
  function stringToHue(str) {
1718
1735
  let hash = 0;
@@ -1739,14 +1756,14 @@ const TabFavicon = (props) => {
1739
1756
  },
1740
1757
  get fallback() {
1741
1758
  return (() => {
1742
- var _el$2 = _tmpl$2$b();
1759
+ var _el$2 = _tmpl$2$e();
1743
1760
  insert(_el$2, letter);
1744
1761
  createRenderEffect((_$p) => setStyleProperty(_el$2, "--favicon-hue", `${hue()}`));
1745
1762
  return _el$2;
1746
1763
  })();
1747
1764
  },
1748
1765
  get children() {
1749
- var _el$ = _tmpl$$d();
1766
+ var _el$ = _tmpl$$g();
1750
1767
  _el$.addEventListener("error", () => setFailed(true));
1751
1768
  createRenderEffect(() => setAttribute(_el$, "src", props.favicon));
1752
1769
  return _el$;
@@ -1779,13 +1796,13 @@ const TabBar = () => {
1779
1796
  }, TAB_CLOSE_MS);
1780
1797
  };
1781
1798
  return (() => {
1782
- var _el$3 = _tmpl$3$9(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
1799
+ var _el$3 = _tmpl$3$b(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
1783
1800
  insert(_el$4, createComponent(For, {
1784
1801
  get each() {
1785
1802
  return tabs2();
1786
1803
  },
1787
1804
  children: (tab) => (() => {
1788
- var _el$6 = _tmpl$4$9(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
1805
+ var _el$6 = _tmpl$4$b(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
1789
1806
  _el$6.addEventListener("auxclick", (e) => {
1790
1807
  if (e.button === 1) handleClose(tab.id);
1791
1808
  });
@@ -1803,12 +1820,12 @@ const TabBar = () => {
1803
1820
  }), _el$7);
1804
1821
  insert(_el$6, (() => {
1805
1822
  var _c$ = memo(() => !!modelActiveTabIds().has(tab.id));
1806
- return () => _c$() && _tmpl$5$7();
1823
+ return () => _c$() && _tmpl$5$a();
1807
1824
  })(), _el$7);
1808
1825
  insert(_el$7, () => tab.title || "New Tab");
1809
1826
  insert(_el$6, (() => {
1810
1827
  var _c$2 = memo(() => !!tab.isLoading);
1811
- return () => _c$2() && _tmpl$6$7();
1828
+ return () => _c$2() && _tmpl$6$9();
1812
1829
  })(), _el$8);
1813
1830
  _el$8.$$click = (e) => {
1814
1831
  e.stopPropagation();
@@ -2034,14 +2051,16 @@ function buildPageSnapshotKey(rawUrl) {
2034
2051
  function matchesPageSnapshotUrl(left, right) {
2035
2052
  return buildPageSnapshotKey(left) === buildPageSnapshotKey(right);
2036
2053
  }
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>`);
2054
+ 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
2055
  const AddressBar = () => {
2039
2056
  const {
2040
2057
  activeTab,
2058
+ activeTabId: activeTabId2,
2041
2059
  navigate,
2042
2060
  goBack,
2043
2061
  goForward,
2044
- reload
2062
+ reload,
2063
+ toggleAdBlock
2045
2064
  } = useTabs();
2046
2065
  const {
2047
2066
  runtimeState: runtimeState2
@@ -2146,9 +2165,9 @@ const AddressBar = () => {
2146
2165
  };
2147
2166
  const formatSectionLabel = (section) => section === "title" ? "Title" : section === "headings" ? "Headings" : "Content";
2148
2167
  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;
2168
+ 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;
2169
+ _el$32.firstChild;
2170
+ var _el$35 = _el$32.nextSibling;
2152
2171
  addEventListener(_el$3, "click", goBack, true);
2153
2172
  addEventListener(_el$4, "click", goForward, true);
2154
2173
  addEventListener(_el$5, "click", reload, true);
@@ -2164,7 +2183,7 @@ const AddressBar = () => {
2164
2183
  return pageDiff();
2165
2184
  },
2166
2185
  get children() {
2167
- var _el$10 = _tmpl$$c();
2186
+ var _el$10 = _tmpl$$f();
2168
2187
  _el$10.$$click = () => setDiffExpanded(!diffExpanded());
2169
2188
  return _el$10;
2170
2189
  }
@@ -2174,7 +2193,7 @@ const AddressBar = () => {
2174
2193
  return memo(() => !!pageDiff())() && diffExpanded();
2175
2194
  },
2176
2195
  get children() {
2177
- var _el$11 = _tmpl$4$8(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild;
2196
+ var _el$11 = _tmpl$4$a(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild;
2178
2197
  _el$14.firstChild;
2179
2198
  var _el$21 = _el$13.nextSibling;
2180
2199
  insert(_el$14, () => formatRelativeTime(pageDiff().oldSnapshot.capturedAt), null);
@@ -2183,7 +2202,7 @@ const AddressBar = () => {
2183
2202
  return memo(() => !!((pageDiff().burstCount || 0) > 1 && pageDiff().firstDetectedAt))() && pageDiff().lastDetectedAt;
2184
2203
  },
2185
2204
  get children() {
2186
- var _el$16 = _tmpl$2$a(), _el$17 = _el$16.firstChild, _el$20 = _el$17.nextSibling;
2205
+ var _el$16 = _tmpl$2$d(), _el$17 = _el$16.firstChild, _el$20 = _el$17.nextSibling;
2187
2206
  _el$20.nextSibling;
2188
2207
  insert(_el$16, () => pageDiff().burstCount, _el$20);
2189
2208
  insert(_el$16, () => formatElapsed(pageDiff().firstDetectedAt, pageDiff().lastDetectedAt), null);
@@ -2196,17 +2215,17 @@ const AddressBar = () => {
2196
2215
  return memo(() => !!pageDiff().recentBursts?.length)() && (pageDiff().recentBursts?.length || 0) > 1;
2197
2216
  },
2198
2217
  get children() {
2199
- var _el$22 = _tmpl$3$8();
2218
+ var _el$22 = _tmpl$3$a();
2200
2219
  _el$22.firstChild;
2201
2220
  insert(_el$22, createComponent(For, {
2202
2221
  get each() {
2203
2222
  return pageDiff().recentBursts;
2204
2223
  },
2205
2224
  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;
2225
+ var _el$36 = _tmpl$9$4(), _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling;
2226
+ insert(_el$37, () => formatRelativeTime(burst.detectedAt));
2227
+ insert(_el$38, () => burst.summary);
2228
+ return _el$36;
2210
2229
  })()
2211
2230
  }), null);
2212
2231
  return _el$22;
@@ -2217,108 +2236,132 @@ const AddressBar = () => {
2217
2236
  return pageDiff().changes;
2218
2237
  },
2219
2238
  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, {
2239
+ var _el$39 = _tmpl$13$3(), _el$40 = _el$39.firstChild, _el$41 = _el$40.firstChild, _el$42 = _el$41.nextSibling;
2240
+ insert(_el$41, () => formatSectionLabel(change.section));
2241
+ insert(_el$42, () => change.summary);
2242
+ insert(_el$39, createComponent(Show, {
2224
2243
  get when() {
2225
2244
  return change.before || change.after;
2226
2245
  },
2227
2246
  get children() {
2228
- var _el$38 = _tmpl$0$4();
2229
- insert(_el$38, createComponent(Show, {
2247
+ var _el$43 = _tmpl$10$4();
2248
+ insert(_el$43, createComponent(Show, {
2230
2249
  get when() {
2231
2250
  return change.before;
2232
2251
  },
2233
2252
  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;
2253
+ var _el$44 = _tmpl$0$4(), _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
2254
+ insert(_el$46, () => change.before);
2255
+ return _el$44;
2237
2256
  }
2238
2257
  }), null);
2239
- insert(_el$38, createComponent(Show, {
2258
+ insert(_el$43, createComponent(Show, {
2240
2259
  get when() {
2241
2260
  return change.after;
2242
2261
  },
2243
2262
  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;
2263
+ var _el$47 = _tmpl$1$4(), _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
2264
+ insert(_el$49, () => change.after);
2265
+ return _el$47;
2247
2266
  }
2248
2267
  }), null);
2249
- return _el$38;
2268
+ return _el$43;
2250
2269
  }
2251
2270
  }), null);
2252
- insert(_el$34, createComponent(Show, {
2271
+ insert(_el$39, createComponent(Show, {
2253
2272
  get when() {
2254
2273
  return change.addedItems?.length;
2255
2274
  },
2256
2275
  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, {
2276
+ var _el$50 = _tmpl$11$4(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling;
2277
+ insert(_el$52, createComponent(For, {
2259
2278
  get each() {
2260
2279
  return change.addedItems;
2261
2280
  },
2262
2281
  children: (item) => (() => {
2263
- var _el$51 = _tmpl$12$4();
2264
- insert(_el$51, item);
2265
- return _el$51;
2282
+ var _el$56 = _tmpl$14$3();
2283
+ insert(_el$56, item);
2284
+ return _el$56;
2266
2285
  })()
2267
2286
  }));
2268
- return _el$45;
2287
+ return _el$50;
2269
2288
  }
2270
2289
  }), null);
2271
- insert(_el$34, createComponent(Show, {
2290
+ insert(_el$39, createComponent(Show, {
2272
2291
  get when() {
2273
2292
  return change.removedItems?.length;
2274
2293
  },
2275
2294
  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, {
2295
+ var _el$53 = _tmpl$12$4(), _el$54 = _el$53.firstChild, _el$55 = _el$54.nextSibling;
2296
+ insert(_el$55, createComponent(For, {
2278
2297
  get each() {
2279
2298
  return change.removedItems;
2280
2299
  },
2281
2300
  children: (item) => (() => {
2282
- var _el$52 = _tmpl$12$4();
2283
- insert(_el$52, item);
2284
- return _el$52;
2301
+ var _el$57 = _tmpl$14$3();
2302
+ insert(_el$57, item);
2303
+ return _el$57;
2285
2304
  })()
2286
2305
  }));
2287
- return _el$48;
2306
+ return _el$53;
2288
2307
  }
2289
2308
  }), null);
2290
- createRenderEffect(() => className(_el$34, `page-diff-item page-diff-${change.kind}`));
2291
- return _el$34;
2309
+ createRenderEffect(() => className(_el$39, `page-diff-item page-diff-${change.kind}`));
2310
+ return _el$39;
2292
2311
  })()
2293
2312
  }), null);
2294
2313
  return _el$11;
2295
2314
  }
2296
2315
  }), _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, {
2316
+ _el$25.$$click = async () => {
2317
+ const id = activeTabId2();
2318
+ if (!id) return;
2319
+ await toggleAdBlock(id);
2320
+ };
2321
+ insert(_el$26, createComponent(Show, {
2322
+ get when() {
2323
+ return activeTab()?.adBlockingEnabled;
2324
+ },
2325
+ get children() {
2326
+ return _tmpl$5$9();
2327
+ }
2328
+ }), null);
2329
+ insert(_el$26, createComponent(Show, {
2330
+ get when() {
2331
+ return !activeTab()?.adBlockingEnabled;
2332
+ },
2333
+ get children() {
2334
+ return [_tmpl$5$9(), _tmpl$6$8()];
2335
+ }
2336
+ }), null);
2337
+ _el$30.$$click = () => window.vessel.content.toggleReader();
2338
+ addEventListener(_el$31, "click", toggleDevTools, true);
2339
+ addEventListener(_el$32, "click", toggleSidebar, true);
2340
+ insert(_el$32, createComponent(Show, {
2301
2341
  get when() {
2302
2342
  return pendingApprovalCount() > 0;
2303
2343
  },
2304
2344
  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;
2345
+ var _el$34 = _tmpl$7$6();
2346
+ insert(_el$34, pendingApprovalCount);
2347
+ createRenderEffect(() => setAttribute(_el$34, "aria-label", `${pendingApprovalCount()} pending`));
2348
+ return _el$34;
2309
2349
  }
2310
2350
  }), null);
2311
- addEventListener(_el$30, "click", openSettings, true);
2351
+ addEventListener(_el$35, "click", openSettings, true);
2312
2352
  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)";
2353
+ 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
2354
  _v$ !== _p$.e && (_el$3.disabled = _p$.e = _v$);
2315
2355
  _v$2 !== _p$.t && (_el$4.disabled = _p$.t = _v$2);
2316
2356
  _v$3 !== _p$.a && className(_el$9, _p$.a = _v$3);
2317
2357
  _v$4 !== _p$.o && setAttribute(_el$9, "title", _p$.o = _v$4);
2318
2358
  _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);
2359
+ _v$6 !== _p$.n && _el$25.classList.toggle("nav-btn-muted", _p$.n = _v$6);
2360
+ _v$7 !== _p$.s && setAttribute(_el$25, "title", _p$.s = _v$7);
2361
+ _v$8 !== _p$.h && _el$30.classList.toggle("active", _p$.h = _v$8);
2362
+ _v$9 !== _p$.r && _el$31.classList.toggle("active", _p$.r = _v$9);
2363
+ _v$0 !== _p$.d && _el$32.classList.toggle("has-approvals", _p$.d = _v$0);
2364
+ _v$1 !== _p$.l && setAttribute(_el$32, "title", _p$.l = _v$1);
2322
2365
  return _p$;
2323
2366
  }, {
2324
2367
  e: void 0,
@@ -2328,16 +2371,19 @@ const AddressBar = () => {
2328
2371
  i: void 0,
2329
2372
  n: void 0,
2330
2373
  s: void 0,
2331
- h: void 0
2374
+ h: void 0,
2375
+ r: void 0,
2376
+ d: void 0,
2377
+ l: void 0
2332
2378
  });
2333
2379
  createRenderEffect(() => _el$8.value = inputValue());
2334
2380
  return _el$;
2335
2381
  })();
2336
2382
  };
2337
2383
  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>`);
2384
+ 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
2385
  const TOAST_DURATION_MS$1 = 4200;
2340
- const TOAST_EXIT_MS$1 = 300;
2386
+ const TOAST_EXIT_MS$2 = 300;
2341
2387
  function isBookmarkToastCandidate(action) {
2342
2388
  return (action.source === "ai" || action.source === "mcp") && action.status === "completed" && (action.name === "create_bookmark_folder" || action.name === "save_bookmark");
2343
2389
  }
@@ -2361,7 +2407,7 @@ const BookmarkNotifications = () => {
2361
2407
  } : t));
2362
2408
  window.setTimeout(() => {
2363
2409
  setToasts((current) => current.filter((t) => t.id !== toastId));
2364
- }, TOAST_EXIT_MS$1);
2410
+ }, TOAST_EXIT_MS$2);
2365
2411
  };
2366
2412
  createEffect(() => {
2367
2413
  const actions = runtimeState2().actions;
@@ -2395,13 +2441,13 @@ const BookmarkNotifications = () => {
2395
2441
  timeoutIds.clear();
2396
2442
  });
2397
2443
  return (() => {
2398
- var _el$ = _tmpl$$b();
2444
+ var _el$ = _tmpl$$e();
2399
2445
  insert(_el$, createComponent(For, {
2400
2446
  get each() {
2401
2447
  return toasts();
2402
2448
  },
2403
2449
  children: (toast) => (() => {
2404
- var _el$2 = _tmpl$2$9(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2450
+ var _el$2 = _tmpl$2$c(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2405
2451
  insert(_el$3, () => toast.title);
2406
2452
  insert(_el$4, () => toast.message);
2407
2453
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!toast.leaving));
@@ -2411,9 +2457,9 @@ const BookmarkNotifications = () => {
2411
2457
  return _el$;
2412
2458
  })();
2413
2459
  };
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>`);
2460
+ 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
2461
  const TOAST_DURATION_MS = 3e3;
2416
- const TOAST_EXIT_MS = 300;
2462
+ const TOAST_EXIT_MS$1 = 300;
2417
2463
  const HighlightNotifications = (props) => {
2418
2464
  const [visible, setVisible] = createSignal(false);
2419
2465
  const [leaving, setLeaving] = createSignal(false);
@@ -2428,7 +2474,7 @@ const HighlightNotifications = (props) => {
2428
2474
  setLeaving(false);
2429
2475
  setCurrent(null);
2430
2476
  props.onDismiss();
2431
- }, TOAST_EXIT_MS);
2477
+ }, TOAST_EXIT_MS$1);
2432
2478
  };
2433
2479
  createEffect(() => {
2434
2480
  const toast = props.toast;
@@ -2450,7 +2496,7 @@ const HighlightNotifications = (props) => {
2450
2496
  return memo(() => !!visible())() && current();
2451
2497
  },
2452
2498
  get children() {
2453
- var _el$ = _tmpl$$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2499
+ var _el$ = _tmpl$$d(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
2454
2500
  insert(_el$3, () => current().title);
2455
2501
  insert(_el$4, () => current().message);
2456
2502
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!leaving()));
@@ -2458,6 +2504,371 @@ const HighlightNotifications = (props) => {
2458
2504
  }
2459
2505
  });
2460
2506
  };
2507
+ 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>`);
2508
+ const TOAST_DONE_DURATION_MS = 4200;
2509
+ const TOAST_EXIT_MS = 300;
2510
+ function formatBytes(bytes) {
2511
+ if (bytes <= 0) return "";
2512
+ const units = ["B", "KB", "MB", "GB"];
2513
+ let i = 0;
2514
+ let val = bytes;
2515
+ while (val >= 1024 && i < units.length - 1) {
2516
+ val /= 1024;
2517
+ i++;
2518
+ }
2519
+ return `${val.toFixed(i === 0 ? 0 : 1)} ${units[i]}`;
2520
+ }
2521
+ const DownloadToast = () => {
2522
+ const [downloads, setDownloads] = createSignal([]);
2523
+ const downloadMap = /* @__PURE__ */ new Map();
2524
+ const timeoutIds = /* @__PURE__ */ new Map();
2525
+ let idCounter = 0;
2526
+ const scheduleRemoval = (id) => {
2527
+ const timeoutId = window.setTimeout(() => dismissDownload(id), TOAST_EXIT_MS);
2528
+ timeoutIds.set(id, timeoutId);
2529
+ setDownloads((current) => current.map((d) => d.id === id ? {
2530
+ ...d,
2531
+ leaving: true
2532
+ } : d));
2533
+ };
2534
+ const dismissDownload = (id) => {
2535
+ setDownloads((current) => {
2536
+ const item = current.find((d) => d.id === id);
2537
+ if (item) downloadMap.delete(item.savePath);
2538
+ return current.filter((d) => d.id !== id);
2539
+ });
2540
+ };
2541
+ const scheduleDoneRemoval = (id) => {
2542
+ const tid = window.setTimeout(() => scheduleRemoval(id), TOAST_DONE_DURATION_MS);
2543
+ timeoutIds.set(id, tid);
2544
+ };
2545
+ onMount(() => {
2546
+ const cleanupStarted = window.vessel.downloads.onStarted((info) => {
2547
+ const id = `dl-${++idCounter}`;
2548
+ const item = {
2549
+ id,
2550
+ savePath: info.savePath,
2551
+ filename: info.filename,
2552
+ totalBytes: info.totalBytes,
2553
+ receivedBytes: info.receivedBytes,
2554
+ state: "progressing",
2555
+ leaving: false
2556
+ };
2557
+ downloadMap.set(info.savePath, item);
2558
+ setDownloads((current) => [...current.slice(-4), item]);
2559
+ });
2560
+ const cleanupProgress = window.vessel.downloads.onProgress((info) => {
2561
+ const item = downloadMap.get(info.savePath);
2562
+ if (!item) return;
2563
+ item.receivedBytes = info.receivedBytes;
2564
+ item.totalBytes = info.totalBytes;
2565
+ setDownloads((current) => current.map((d) => d.id === item.id ? {
2566
+ ...d,
2567
+ receivedBytes: info.receivedBytes,
2568
+ totalBytes: info.totalBytes
2569
+ } : d));
2570
+ });
2571
+ const cleanupDone = window.vessel.downloads.onDone((info) => {
2572
+ const item = downloadMap.get(info.savePath);
2573
+ if (!item) return;
2574
+ const finalState = info.state === "completed" ? "completed" : info.state === "cancelled" ? "cancelled" : "interrupted";
2575
+ item.state = finalState;
2576
+ setDownloads((current) => current.map((d) => d.id === item.id ? {
2577
+ ...d,
2578
+ state: finalState,
2579
+ receivedBytes: info.receivedBytes
2580
+ } : d));
2581
+ scheduleDoneRemoval(item.id);
2582
+ });
2583
+ onCleanup(() => {
2584
+ cleanupStarted();
2585
+ cleanupProgress();
2586
+ cleanupDone();
2587
+ for (const tid of timeoutIds.values()) {
2588
+ window.clearTimeout(tid);
2589
+ }
2590
+ timeoutIds.clear();
2591
+ });
2592
+ });
2593
+ const progressPercent = (d) => {
2594
+ if (d.totalBytes <= 0) return 0;
2595
+ return Math.min(100, Math.round(d.receivedBytes / d.totalBytes * 100));
2596
+ };
2597
+ return (() => {
2598
+ var _el$ = _tmpl$$c();
2599
+ insert(_el$, createComponent(For, {
2600
+ get each() {
2601
+ return downloads();
2602
+ },
2603
+ children: (dl) => (() => {
2604
+ var _el$2 = _tmpl$7$5(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
2605
+ insert(_el$4, () => dl.filename);
2606
+ insert(_el$3, createComponent(Show, {
2607
+ get when() {
2608
+ return dl.state === "completed";
2609
+ },
2610
+ get children() {
2611
+ return _tmpl$2$b();
2612
+ }
2613
+ }), null);
2614
+ insert(_el$3, createComponent(Show, {
2615
+ get when() {
2616
+ return dl.state === "cancelled" || dl.state === "interrupted";
2617
+ },
2618
+ get children() {
2619
+ return _tmpl$3$9();
2620
+ }
2621
+ }), null);
2622
+ insert(_el$2, createComponent(Show, {
2623
+ get when() {
2624
+ return dl.state === "progressing";
2625
+ },
2626
+ get children() {
2627
+ return [(() => {
2628
+ var _el$7 = _tmpl$4$9(), _el$8 = _el$7.firstChild;
2629
+ createRenderEffect((_$p) => setStyleProperty(_el$8, "width", `${progressPercent(dl)}%`));
2630
+ return _el$7;
2631
+ })(), (() => {
2632
+ var _el$9 = _tmpl$5$8();
2633
+ insert(_el$9, () => formatBytes(dl.receivedBytes), null);
2634
+ insert(_el$9, createComponent(Show, {
2635
+ get when() {
2636
+ return dl.totalBytes > 0;
2637
+ },
2638
+ get children() {
2639
+ return [" / ", memo(() => formatBytes(dl.totalBytes))];
2640
+ }
2641
+ }), null);
2642
+ return _el$9;
2643
+ })()];
2644
+ }
2645
+ }), null);
2646
+ insert(_el$2, createComponent(Show, {
2647
+ get when() {
2648
+ return dl.state === "completed";
2649
+ },
2650
+ get children() {
2651
+ var _el$0 = _tmpl$6$7(), _el$1 = _el$0.firstChild;
2652
+ insert(_el$0, () => formatBytes(dl.receivedBytes), _el$1);
2653
+ return _el$0;
2654
+ }
2655
+ }), null);
2656
+ createRenderEffect(() => _el$2.classList.toggle("download-toast-leaving", !!dl.leaving));
2657
+ return _el$2;
2658
+ })()
2659
+ }));
2660
+ return _el$;
2661
+ })();
2662
+ };
2663
+ 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>`);
2664
+ const FindBar = () => {
2665
+ const [open, setOpen] = createSignal(false);
2666
+ const [query, setQuery] = createSignal("");
2667
+ const [result, setResult] = createSignal(null);
2668
+ let inputRef;
2669
+ const startFind = (text2) => {
2670
+ if (!text2) {
2671
+ window.vessel.find.stop();
2672
+ setResult(null);
2673
+ return;
2674
+ }
2675
+ window.vessel.find.start(text2, {
2676
+ forward: true
2677
+ });
2678
+ };
2679
+ const findNext = (forward = true) => {
2680
+ const q = query();
2681
+ if (!q) return;
2682
+ window.vessel.find.next(forward);
2683
+ };
2684
+ const close = () => {
2685
+ setOpen(false);
2686
+ setQuery("");
2687
+ setResult(null);
2688
+ window.vessel.find.stop();
2689
+ };
2690
+ onMount(() => {
2691
+ const cleanupResult = window.vessel.find.onResult((r) => {
2692
+ if (r.finalUpdate) {
2693
+ setResult(r);
2694
+ }
2695
+ });
2696
+ const listener = (e) => {
2697
+ const ctrl = e.ctrlKey || e.metaKey;
2698
+ if (ctrl && e.key === "f") {
2699
+ e.preventDefault();
2700
+ if (!open()) {
2701
+ setOpen(true);
2702
+ setTimeout(() => inputRef?.focus(), 0);
2703
+ } else {
2704
+ inputRef?.focus();
2705
+ inputRef?.select();
2706
+ }
2707
+ return;
2708
+ }
2709
+ if (!open()) return;
2710
+ if (e.key === "Escape") {
2711
+ e.preventDefault();
2712
+ close();
2713
+ return;
2714
+ }
2715
+ if (e.key === "Enter") {
2716
+ e.preventDefault();
2717
+ findNext(!e.shiftKey);
2718
+ return;
2719
+ }
2720
+ };
2721
+ document.addEventListener("keydown", listener);
2722
+ onCleanup(() => {
2723
+ document.removeEventListener("keydown", listener);
2724
+ cleanupResult();
2725
+ });
2726
+ });
2727
+ createEffect(() => {
2728
+ if (open() && inputRef) {
2729
+ inputRef.focus();
2730
+ }
2731
+ });
2732
+ const handleInput = (value) => {
2733
+ setQuery(value);
2734
+ startFind(value);
2735
+ };
2736
+ return createComponent(Show, {
2737
+ get when() {
2738
+ return open();
2739
+ },
2740
+ get children() {
2741
+ var _el$ = _tmpl$$b(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
2742
+ _el$2.$$input = (e) => handleInput(e.currentTarget.value);
2743
+ var _ref$ = inputRef;
2744
+ typeof _ref$ === "function" ? use(_ref$, _el$2) : inputRef = _el$2;
2745
+ setAttribute(_el$2, "spellcheck", false);
2746
+ insert(_el$, createComponent(Show, {
2747
+ get when() {
2748
+ return result();
2749
+ },
2750
+ children: (r) => (() => {
2751
+ var _el$6 = _tmpl$2$a();
2752
+ insert(_el$6, (() => {
2753
+ var _c$ = memo(() => r().matches > 0);
2754
+ return () => _c$() ? `${r().activeMatchOrdinal} / ${r().matches}` : "No results";
2755
+ })());
2756
+ return _el$6;
2757
+ })()
2758
+ }), _el$3);
2759
+ _el$3.$$click = () => findNext(false);
2760
+ _el$4.$$click = () => findNext(true);
2761
+ _el$5.$$click = close;
2762
+ createRenderEffect(() => _el$2.value = query());
2763
+ return _el$;
2764
+ }
2765
+ });
2766
+ };
2767
+ delegateEvents(["input", "click"]);
2768
+ 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>`);
2769
+ const FlowProgress = () => {
2770
+ const {
2771
+ runtimeState: runtimeState2
2772
+ } = useRuntime();
2773
+ const flow = createMemo(() => runtimeState2().flowState);
2774
+ const tracker = createMemo(() => runtimeState2().taskTracker);
2775
+ const stepStatusClass = (status) => {
2776
+ switch (status) {
2777
+ case "done":
2778
+ return "flow-step-done";
2779
+ case "active":
2780
+ return "flow-step-active";
2781
+ case "failed":
2782
+ return "flow-step-failed";
2783
+ case "skipped":
2784
+ return "flow-step-skipped";
2785
+ default:
2786
+ return "flow-step-pending";
2787
+ }
2788
+ };
2789
+ const progressPercent = (steps) => {
2790
+ if (steps.length === 0) return 0;
2791
+ const done = steps.filter((s) => s.status === "done" || s.status === "skipped").length;
2792
+ return Math.round(done / steps.length * 100);
2793
+ };
2794
+ return createComponent(Show, {
2795
+ get when() {
2796
+ return flow() || tracker();
2797
+ },
2798
+ get children() {
2799
+ var _el$ = _tmpl$$a();
2800
+ insert(_el$, createComponent(Show, {
2801
+ get when() {
2802
+ return tracker();
2803
+ },
2804
+ children: (t) => (() => {
2805
+ 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;
2806
+ insert(_el$4, () => t().goal);
2807
+ insert(_el$5, () => progressPercent(t().steps), _el$6);
2808
+ insert(_el$9, createComponent(For, {
2809
+ get each() {
2810
+ return t().steps;
2811
+ },
2812
+ children: (step) => (() => {
2813
+ var _el$12 = _tmpl$5$7(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
2814
+ insert(_el$14, () => step.label);
2815
+ createRenderEffect(() => className(_el$12, `flow-step ${stepStatusClass(step.status)}`));
2816
+ return _el$12;
2817
+ })()
2818
+ }));
2819
+ insert(_el$2, createComponent(Show, {
2820
+ get when() {
2821
+ return t().lastAction;
2822
+ },
2823
+ get children() {
2824
+ var _el$0 = _tmpl$2$9();
2825
+ _el$0.firstChild;
2826
+ insert(_el$0, () => t().lastAction, null);
2827
+ return _el$0;
2828
+ }
2829
+ }), null);
2830
+ insert(_el$2, createComponent(Show, {
2831
+ get when() {
2832
+ return memo(() => !!t().nextHint)() && !t().steps.every((s) => s.status === "done");
2833
+ },
2834
+ get children() {
2835
+ var _el$10 = _tmpl$3$8();
2836
+ _el$10.firstChild;
2837
+ insert(_el$10, () => t().nextHint, null);
2838
+ return _el$10;
2839
+ }
2840
+ }), null);
2841
+ createRenderEffect((_$p) => setStyleProperty(_el$8, "width", `${progressPercent(t().steps)}%`));
2842
+ return _el$2;
2843
+ })()
2844
+ }), null);
2845
+ insert(_el$, createComponent(Show, {
2846
+ get when() {
2847
+ return memo(() => !!flow())() && !tracker();
2848
+ },
2849
+ children: (f) => (() => {
2850
+ 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;
2851
+ insert(_el$17, () => f().goal);
2852
+ insert(_el$18, () => progressPercent(f().steps), _el$19);
2853
+ insert(_el$22, createComponent(For, {
2854
+ get each() {
2855
+ return f().steps;
2856
+ },
2857
+ children: (step) => (() => {
2858
+ var _el$23 = _tmpl$5$7(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
2859
+ insert(_el$25, () => step.label);
2860
+ createRenderEffect(() => className(_el$23, `flow-step ${stepStatusClass(step.status)}`));
2861
+ return _el$23;
2862
+ })()
2863
+ }));
2864
+ createRenderEffect((_$p) => setStyleProperty(_el$21, "width", `${progressPercent(f().steps)}%`));
2865
+ return _el$15;
2866
+ })()
2867
+ }), null);
2868
+ return _el$;
2869
+ }
2870
+ });
2871
+ };
2461
2872
  function useScrollFade(el) {
2462
2873
  const update = () => {
2463
2874
  const { scrollTop, scrollHeight, clientHeight } = el;
@@ -2485,7 +2896,7 @@ function formatTime(iso, options) {
2485
2896
  ...options?.includeSeconds && { second: "2-digit" }
2486
2897
  });
2487
2898
  }
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>`);
2899
+ 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
2900
  const AgentTranscriptDock = () => {
2490
2901
  const {
2491
2902
  runtimeState: runtimeState2
@@ -2507,66 +2918,107 @@ const AgentTranscriptDock = () => {
2507
2918
  setMode("off");
2508
2919
  await window.vessel.settings.set("agentTranscriptMode", "off");
2509
2920
  };
2921
+ const isSummary = createMemo(() => mode() === "summary");
2922
+ const latestEntry = createMemo(() => {
2923
+ const entries2 = visibleEntries();
2924
+ return entries2.length > 0 ? entries2[0] : null;
2925
+ });
2510
2926
  return createComponent(Show, {
2511
2927
  get when() {
2512
- return memo(() => mode() === "full")() && visibleEntries().length > 0;
2928
+ return memo(() => mode() !== "off")() && visibleEntries().length > 0;
2513
2929
  },
2514
2930
  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, {
2931
+ return [createComponent(Show, {
2519
2932
  get when() {
2520
- return hasStreamingEntry();
2933
+ return isSummary();
2521
2934
  },
2522
2935
  get children() {
2523
- return _tmpl$$9();
2936
+ var _el$ = _tmpl$$9();
2937
+ insert(_el$, createComponent(Show, {
2938
+ get when() {
2939
+ return latestEntry();
2940
+ },
2941
+ children: (entry) => [createComponent(Show, {
2942
+ get when() {
2943
+ return hasStreamingEntry();
2944
+ },
2945
+ get children() {
2946
+ return _tmpl$5$6();
2947
+ }
2948
+ }), (() => {
2949
+ var _el$10 = _tmpl$6$6(), _el$11 = _el$10.firstChild;
2950
+ insert(_el$10, () => entry().title || entry().kind, _el$11);
2951
+ insert(_el$10, (() => {
2952
+ var _c$ = memo(() => entry().text.length > 80);
2953
+ return () => _c$() ? entry().text.slice(0, 77) + "..." : entry().text;
2954
+ })(), null);
2955
+ return _el$10;
2956
+ })()]
2957
+ }));
2958
+ return _el$;
2524
2959
  }
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, {
2960
+ }), createComponent(Show, {
2530
2961
  get when() {
2531
- return !collapsed();
2962
+ return !isSummary();
2532
2963
  },
2533
2964
  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();
2965
+ var _el$2 = _tmpl$4$7(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
2966
+ _el$4.firstChild;
2967
+ var _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling;
2968
+ insert(_el$4, createComponent(Show, {
2969
+ get when() {
2970
+ return hasStreamingEntry();
2539
2971
  },
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
- });
2972
+ get children() {
2973
+ return _tmpl$2$8();
2974
+ }
2975
+ }), null);
2976
+ _el$8.$$click = () => setCollapsed((value) => !value);
2977
+ insert(_el$8, () => collapsed() ? "▴" : "▾");
2978
+ _el$9.$$click = () => void hideDock();
2979
+ insert(_el$2, createComponent(Show, {
2980
+ get when() {
2981
+ return !collapsed();
2982
+ },
2983
+ get children() {
2984
+ var _el$0 = _tmpl$3$7();
2985
+ use((el) => useScrollFade(el), _el$0);
2986
+ insert(_el$0, createComponent(For, {
2987
+ get each() {
2988
+ return visibleEntries();
2989
+ },
2990
+ children: (entry) => (() => {
2991
+ 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;
2992
+ insert(_el$14, () => entry.title || entry.kind);
2993
+ insert(_el$15, () => formatTime(entry.updatedAt));
2994
+ insert(_el$16, () => entry.text);
2995
+ createRenderEffect((_p$) => {
2996
+ var _v$3 = `agent-transcript-entry ${entry.kind}`, _v$4 = !!(entry.status === "streaming");
2997
+ _v$3 !== _p$.e && className(_el$12, _p$.e = _v$3);
2998
+ _v$4 !== _p$.t && _el$12.classList.toggle("streaming", _p$.t = _v$4);
2999
+ return _p$;
3000
+ }, {
3001
+ e: void 0,
3002
+ t: void 0
3003
+ });
3004
+ return _el$12;
3005
+ })()
3006
+ }));
2554
3007
  return _el$0;
2555
- })()
2556
- }));
2557
- return _el$9;
3008
+ }
3009
+ }), null);
3010
+ createRenderEffect((_p$) => {
3011
+ var _v$ = !!collapsed(), _v$2 = collapsed() ? "Expand" : "Collapse";
3012
+ _v$ !== _p$.e && _el$2.classList.toggle("collapsed", _p$.e = _v$);
3013
+ _v$2 !== _p$.t && setAttribute(_el$8, "data-tooltip", _p$.t = _v$2);
3014
+ return _p$;
3015
+ }, {
3016
+ e: void 0,
3017
+ t: void 0
3018
+ });
3019
+ return _el$2;
2558
3020
  }
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$;
3021
+ })];
2570
3022
  }
2571
3023
  });
2572
3024
  };
@@ -2666,7 +3118,7 @@ const [pendingQueries, setPendingQueries] = createSignal([]);
2666
3118
  const [pendingQueryActivities, setPendingQueryActivities] = createSignal([]);
2667
3119
  const [queueNotice, setQueueNotice] = createSignal(null);
2668
3120
  const [automationActivities, setAutomationActivities] = createSignal([]);
2669
- let initialized$1 = false;
3121
+ let initialized$2 = false;
2670
3122
  let pendingDrainScheduled = false;
2671
3123
  let listenerCleanups = [];
2672
3124
  let pendingAutomationActivity = null;
@@ -2724,9 +3176,9 @@ function schedulePendingDrain() {
2724
3176
  }
2725
3177
  });
2726
3178
  }
2727
- function init$1() {
2728
- if (initialized$1) return;
2729
- initialized$1 = true;
3179
+ function init$2() {
3180
+ if (initialized$2) return;
3181
+ initialized$2 = true;
2730
3182
  listenerCleanups.push(window.vessel.ai.onStreamStart((prompt) => {
2731
3183
  setMessages((prev) => {
2732
3184
  const next = [...prev, { role: "user", content: prompt }];
@@ -2809,7 +3261,7 @@ function init$1() {
2809
3261
  }));
2810
3262
  }
2811
3263
  function useAI() {
2812
- init$1();
3264
+ init$2();
2813
3265
  const query = async (prompt, activity = null) => {
2814
3266
  recordRecentQuery(prompt);
2815
3267
  if (isStreaming()) {
@@ -3025,6 +3477,36 @@ const CommandBar = () => {
3025
3477
  });
3026
3478
  };
3027
3479
  delegateEvents(["click", "input", "keydown"]);
3480
+ const INITIAL$1 = { entries: [] };
3481
+ const [historyState, setHistoryState] = createSignal(INITIAL$1);
3482
+ let initialized$1 = false;
3483
+ let initPromise$1 = null;
3484
+ async function init$1() {
3485
+ if (initPromise$1) return initPromise$1;
3486
+ if (initialized$1) return;
3487
+ initialized$1 = true;
3488
+ initPromise$1 = (async () => {
3489
+ try {
3490
+ const state = await window.vessel.history.get();
3491
+ setHistoryState(state);
3492
+ window.vessel.history.onUpdate((s) => setHistoryState(s));
3493
+ } catch (error) {
3494
+ initialized$1 = false;
3495
+ console.error("Failed to initialize history store", error);
3496
+ } finally {
3497
+ initPromise$1 = null;
3498
+ }
3499
+ })();
3500
+ return initPromise$1;
3501
+ }
3502
+ function useHistory() {
3503
+ void init$1();
3504
+ return {
3505
+ historyState,
3506
+ search: (query) => window.vessel.history.search(query),
3507
+ clear: () => window.vessel.history.clear()
3508
+ };
3509
+ }
3028
3510
  const INITIAL = { folders: [], bookmarks: [] };
3029
3511
  const [bookmarksState, setBookmarksState] = createSignal(INITIAL);
3030
3512
  let initialized = false;
@@ -4987,7 +5469,7 @@ function renderKitPrompt(kit, values) {
4987
5469
  (_, key) => values[key] ?? ""
4988
5470
  );
4989
5471
  }
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>`);
5472
+ 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
5473
  const ICON_MAP = {
4992
5474
  BookOpen: book_open_default,
4993
5475
  Tag: tag_default,
@@ -5645,7 +6127,7 @@ const AutomationTab = (props) => {
5645
6127
  return !isStreaming2();
5646
6128
  },
5647
6129
  get fallback() {
5648
- return [_tmpl$39$1(), "Agent busy…"];
6130
+ return [_tmpl$39$2(), "Agent busy…"];
5649
6131
  },
5650
6132
  children: "Run Kit"
5651
6133
  }));
@@ -5666,7 +6148,7 @@ const AutomationTab = (props) => {
5666
6148
  insert(_el$38, createComponent(For, {
5667
6149
  each: ["once", "hourly", "daily", "weekly"],
5668
6150
  children: (type) => (() => {
5669
- var _el$117 = _tmpl$40$1(), _el$118 = _el$117.firstChild;
6151
+ var _el$117 = _tmpl$40$2(), _el$118 = _el$117.firstChild;
5670
6152
  _el$118.addEventListener("change", () => setSchedType(type));
5671
6153
  _el$118.value = type;
5672
6154
  insert(_el$117, () => type.charAt(0).toUpperCase() + type.slice(1), null);
@@ -5707,7 +6189,7 @@ const AutomationTab = (props) => {
5707
6189
  insert(_el$47, createComponent(For, {
5708
6190
  each: DAY_NAMES,
5709
6191
  children: (day, i) => (() => {
5710
- var _el$119 = _tmpl$41$1();
6192
+ var _el$119 = _tmpl$41$2();
5711
6193
  insert(_el$119, day);
5712
6194
  createRenderEffect(() => _el$119.value = i());
5713
6195
  return _el$119;
@@ -5756,7 +6238,7 @@ const AutomationTab = (props) => {
5756
6238
  insert(_el$59, createComponent(For, {
5757
6239
  each: ["once", "hourly", "daily", "weekly"],
5758
6240
  children: (t) => (() => {
5759
- var _el$120 = _tmpl$42$1(), _el$121 = _el$120.firstChild;
6241
+ var _el$120 = _tmpl$42$2(), _el$121 = _el$120.firstChild;
5760
6242
  _el$121.addEventListener("change", () => setEditType(t));
5761
6243
  _el$121.value = t;
5762
6244
  insert(_el$120, () => t.charAt(0).toUpperCase() + t.slice(1), null);
@@ -5790,7 +6272,7 @@ const AutomationTab = (props) => {
5790
6272
  insert(_el$65, createComponent(For, {
5791
6273
  each: DAY_NAMES,
5792
6274
  children: (name, i) => (() => {
5793
- var _el$122 = _tmpl$41$1();
6275
+ var _el$122 = _tmpl$41$2();
5794
6276
  insert(_el$122, name);
5795
6277
  createRenderEffect(() => _el$122.value = i());
5796
6278
  return _el$122;
@@ -5827,7 +6309,7 @@ const AutomationTab = (props) => {
5827
6309
  };
5828
6310
  delegateEvents(["click", "input", "keydown", "contextmenu"]);
5829
6311
  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>×`);
6312
+ 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
6313
  const UNSORTED_FOLDER = {
5832
6314
  id: "unsorted",
5833
6315
  name: "Unsorted",
@@ -5902,6 +6384,7 @@ const Sidebar = (props) => {
5902
6384
  activeTab,
5903
6385
  createTab
5904
6386
  } = useTabs();
6387
+ const history = useHistory();
5905
6388
  const {
5906
6389
  bookmarksState: bookmarksState2,
5907
6390
  saveBookmark,
@@ -6285,9 +6768,9 @@ ${contextBlock}` : contextBlock);
6285
6768
  return props.forceOpen || sidebarOpen2();
6286
6769
  },
6287
6770
  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;
6771
+ 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
6772
  _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;
6773
+ 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
6774
  _el$0.$$pointerdown = startResize;
6292
6775
  setAttribute(_el$11, "src", vesselLogo);
6293
6776
  addEventListener(_el$13, "click", clearHistory, true);
@@ -6307,20 +6790,21 @@ ${contextBlock}` : contextBlock);
6307
6790
  _el$20.$$click = () => setSidebarTab("checkpoints");
6308
6791
  _el$21.$$click = () => setSidebarTab("chat");
6309
6792
  _el$22.$$click = () => setSidebarTab("automation");
6793
+ _el$23.$$click = () => setSidebarTab("history");
6310
6794
  use((el) => {
6311
6795
  messagesContainerRef = el;
6312
6796
  useScrollFade(el);
6313
- }, _el$23);
6314
- insert(_el$23, createComponent(Show, {
6797
+ }, _el$24);
6798
+ insert(_el$24, createComponent(Show, {
6315
6799
  get when() {
6316
6800
  return sidebarTab() === "supervisor";
6317
6801
  },
6318
6802
  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, {
6803
+ 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;
6804
+ _el$36.firstChild;
6805
+ insert(_el$29, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
6806
+ insert(_el$30, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
6807
+ insert(_el$31, createComponent(DropdownSelect, {
6324
6808
  "class": "agent-select",
6325
6809
  get value() {
6326
6810
  return runtimeState2().supervisor.approvalMode;
@@ -6330,17 +6814,17 @@ ${contextBlock}` : contextBlock);
6330
6814
  },
6331
6815
  ariaLabel: "Approval mode",
6332
6816
  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, {
6817
+ }), _el$32);
6818
+ _el$32.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
6819
+ insert(_el$32, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
6820
+ _el$33.$$click = () => void restoreSession();
6821
+ insert(_el$34, approvalModeDescription);
6822
+ insert(_el$25, createComponent(Show, {
6339
6823
  get when() {
6340
6824
  return runtimeState2().supervisor.pendingApprovals.length > 0;
6341
6825
  },
6342
6826
  get fallback() {
6343
- return _tmpl$24$1();
6827
+ return _tmpl$26$1();
6344
6828
  },
6345
6829
  get children() {
6346
6830
  return [_tmpl$4$3(), createComponent(For, {
@@ -6348,37 +6832,37 @@ ${contextBlock}` : contextBlock);
6348
6832
  return runtimeState2().supervisor.pendingApprovals;
6349
6833
  },
6350
6834
  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;
6835
+ 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;
6836
+ insert(_el$113, () => approval.name);
6837
+ insert(_el$114, () => approval.argsSummary);
6838
+ insert(_el$115, () => approval.reason);
6839
+ _el$117.$$click = () => void resolveApproval(approval.id, true);
6840
+ _el$118.$$click = () => void resolveApproval(approval.id, false);
6841
+ return _el$111;
6358
6842
  })()
6359
6843
  })];
6360
6844
  }
6361
- }), _el$35);
6362
- insert(_el$35, createComponent(Show, {
6845
+ }), _el$36);
6846
+ insert(_el$36, createComponent(Show, {
6363
6847
  get when() {
6364
6848
  return recentActions().length > 0;
6365
6849
  },
6366
6850
  get children() {
6367
- var _el$37 = _tmpl$5$3();
6368
- _el$37.$$click = () => setActionsExpanded((current) => !current);
6369
- insert(_el$37, (() => {
6851
+ var _el$38 = _tmpl$5$3();
6852
+ _el$38.$$click = () => setActionsExpanded((current) => !current);
6853
+ insert(_el$38, (() => {
6370
6854
  var _c$ = memo(() => !!actionsExpanded());
6371
6855
  return () => _c$() ? "Hide history" : `Show history (${recentActions().length})`;
6372
6856
  })());
6373
- return _el$37;
6857
+ return _el$38;
6374
6858
  }
6375
6859
  }), null);
6376
- insert(_el$24, createComponent(Show, {
6860
+ insert(_el$25, createComponent(Show, {
6377
6861
  get when() {
6378
6862
  return recentActions().length > 0;
6379
6863
  },
6380
6864
  get fallback() {
6381
- return _tmpl$26$1();
6865
+ return _tmpl$28$1();
6382
6866
  },
6383
6867
  get children() {
6384
6868
  return createComponent(Show, {
@@ -6386,7 +6870,7 @@ ${contextBlock}` : contextBlock);
6386
6870
  return actionsExpanded();
6387
6871
  },
6388
6872
  get fallback() {
6389
- return _tmpl$27$1();
6873
+ return _tmpl$29$1();
6390
6874
  },
6391
6875
  get children() {
6392
6876
  return createComponent(For, {
@@ -6394,53 +6878,53 @@ ${contextBlock}` : contextBlock);
6394
6878
  return recentActions();
6395
6879
  },
6396
6880
  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, {
6881
+ 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;
6882
+ insert(_el$123, () => action.name);
6883
+ insert(_el$124, () => action.status);
6884
+ insert(_el$125, () => action.argsSummary);
6885
+ insert(_el$121, createComponent(Show, {
6402
6886
  get when() {
6403
6887
  return action.resultSummary;
6404
6888
  },
6405
6889
  get children() {
6406
- var _el$119 = _tmpl$28$1();
6407
- insert(_el$119, () => action.resultSummary);
6408
- return _el$119;
6890
+ var _el$126 = _tmpl$30$1();
6891
+ insert(_el$126, () => action.resultSummary);
6892
+ return _el$126;
6409
6893
  }
6410
6894
  }), null);
6411
- insert(_el$114, createComponent(Show, {
6895
+ insert(_el$121, createComponent(Show, {
6412
6896
  get when() {
6413
6897
  return action.error;
6414
6898
  },
6415
6899
  get children() {
6416
- var _el$120 = _tmpl$29$1();
6417
- insert(_el$120, () => action.error);
6418
- return _el$120;
6900
+ var _el$127 = _tmpl$31$1();
6901
+ insert(_el$127, () => action.error);
6902
+ return _el$127;
6419
6903
  }
6420
6904
  }), null);
6421
- createRenderEffect(() => className(_el$117, `agent-action-status ${action.status}`));
6422
- return _el$114;
6905
+ createRenderEffect(() => className(_el$124, `agent-action-status ${action.status}`));
6906
+ return _el$121;
6423
6907
  })()
6424
6908
  });
6425
6909
  }
6426
6910
  });
6427
6911
  }
6428
6912
  }), null);
6429
- createRenderEffect(() => _el$29.classList.toggle("paused", !!runtimeState2().supervisor.paused));
6430
- return _el$24;
6913
+ createRenderEffect(() => _el$30.classList.toggle("paused", !!runtimeState2().supervisor.paused));
6914
+ return _el$25;
6431
6915
  }
6432
- }), _el$86);
6433
- insert(_el$23, createComponent(Show, {
6916
+ }), _el$93);
6917
+ insert(_el$24, createComponent(Show, {
6434
6918
  get when() {
6435
6919
  return sidebarTab() === "bookmarks";
6436
6920
  },
6437
6921
  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, (() => {
6922
+ 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;
6923
+ insert(_el$43, (() => {
6440
6924
  var _c$2 = memo(() => !!normalizedBookmarkSearch());
6441
6925
  return () => _c$2() ? `${bookmarkMatchCount()} matches for "${bookmarkSearchQuery().trim()}"` : `${bookmarksState2().bookmarks.length} saved across ${bookmarkFolders().length} folders`;
6442
6926
  })());
6443
- insert(_el$39, createComponent(Show, {
6927
+ insert(_el$40, createComponent(Show, {
6444
6928
  get when() {
6445
6929
  return currentTabSaved();
6446
6930
  },
@@ -6448,17 +6932,17 @@ ${contextBlock}` : contextBlock);
6448
6932
  return _tmpl$7$2();
6449
6933
  }
6450
6934
  }), null);
6451
- _el$44.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
6452
- _el$46.$$click = () => setBookmarkSaveExpanded((current) => !current);
6453
- insert(_el$45, createComponent(Show, {
6935
+ _el$45.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
6936
+ _el$47.$$click = () => setBookmarkSaveExpanded((current) => !current);
6937
+ insert(_el$46, createComponent(Show, {
6454
6938
  get when() {
6455
6939
  return bookmarkSaveExpanded();
6456
6940
  },
6457
6941
  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, {
6942
+ 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;
6943
+ insert(_el$51, () => currentTab()?.title || "No active page");
6944
+ insert(_el$52, () => currentTab()?.url || "Open a page to save it here.");
6945
+ insert(_el$53, createComponent(DropdownSelect, {
6462
6946
  "class": "bookmark-select",
6463
6947
  get value() {
6464
6948
  return selectedFolderId();
@@ -6468,29 +6952,29 @@ ${contextBlock}` : contextBlock);
6468
6952
  },
6469
6953
  ariaLabel: "Bookmark folder",
6470
6954
  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;
6955
+ }), _el$54);
6956
+ _el$54.$$click = () => void handleSaveBookmark();
6957
+ _el$55.$$input = (e) => setBookmarkNote(e.currentTarget.value);
6958
+ createRenderEffect(() => _el$54.disabled = !currentTab()?.url);
6959
+ createRenderEffect(() => _el$55.value = bookmarkNote());
6960
+ return _el$50;
6477
6961
  }
6478
6962
  }), 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, {
6963
+ _el$56.addEventListener("submit", handleCreateFolder);
6964
+ _el$58.$$input = (e) => setNewFolderName(e.currentTarget.value);
6965
+ _el$59.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
6966
+ insert(_el$61, createComponent(Show, {
6483
6967
  get when() {
6484
6968
  return filteredGroupedBookmarks().length > 0;
6485
6969
  },
6486
6970
  get fallback() {
6487
6971
  return (() => {
6488
- var _el$121 = _tmpl$31$1();
6489
- insert(_el$121, (() => {
6972
+ var _el$128 = _tmpl$33$1();
6973
+ insert(_el$128, (() => {
6490
6974
  var _c$5 = memo(() => !!normalizedBookmarkSearch());
6491
6975
  return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
6492
6976
  })());
6493
- return _el$121;
6977
+ return _el$128;
6494
6978
  })();
6495
6979
  },
6496
6980
  get children() {
@@ -6499,100 +6983,100 @@ ${contextBlock}` : contextBlock);
6499
6983
  return filteredGroupedBookmarks();
6500
6984
  },
6501
6985
  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) => {
6986
+ 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;
6987
+ _el$130.$$keydown = (e) => {
6504
6988
  if (e.key === "Enter" || e.key === " ") {
6505
6989
  e.preventDefault();
6506
6990
  toggleFolderExpanded(folder.id);
6507
6991
  }
6508
6992
  };
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, {
6993
+ _el$130.$$click = () => toggleFolderExpanded(folder.id);
6994
+ insert(_el$134, () => folder.name);
6995
+ insert(_el$135, () => folder.items.length, _el$136);
6996
+ insert(_el$133, createComponent(Show, {
6513
6997
  get when() {
6514
6998
  return folder.summary;
6515
6999
  },
6516
7000
  get children() {
6517
- var _el$130 = _tmpl$32$1();
6518
- insert(_el$130, () => folder.summary);
6519
- return _el$130;
7001
+ var _el$137 = _tmpl$34$1();
7002
+ insert(_el$137, () => folder.summary);
7003
+ return _el$137;
6520
7004
  }
6521
7005
  }), null);
6522
- insert(_el$123, createComponent(Show, {
7006
+ insert(_el$130, createComponent(Show, {
6523
7007
  get when() {
6524
7008
  return folder.id !== UNSORTED_FOLDER.id;
6525
7009
  },
6526
7010
  get children() {
6527
- var _el$131 = _tmpl$33$1(), _el$132 = _el$131.firstChild, _el$133 = _el$132.nextSibling;
6528
- _el$132.$$click = (e) => {
7011
+ var _el$138 = _tmpl$35$1(), _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling;
7012
+ _el$139.$$click = (e) => {
6529
7013
  e.stopPropagation();
6530
7014
  setEditingFolderId(folder.id);
6531
7015
  setEditingFolderName(folder.name);
6532
7016
  setEditingFolderSummary(folder.summary || "");
6533
7017
  };
6534
- _el$133.$$click = (e) => {
7018
+ _el$140.$$click = (e) => {
6535
7019
  e.stopPropagation();
6536
7020
  setDeletingFolderId(folder.id);
6537
7021
  };
6538
- return _el$131;
7022
+ return _el$138;
6539
7023
  }
6540
7024
  }), null);
6541
- insert(_el$122, createComponent(Show, {
7025
+ insert(_el$129, createComponent(Show, {
6542
7026
  get when() {
6543
7027
  return deletingFolderId() === folder.id;
6544
7028
  },
6545
7029
  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, (() => {
7030
+ var _el$141 = _tmpl$37$1(), _el$142 = _el$141.firstChild, _el$143 = _el$142.firstChild, _el$145 = _el$143.nextSibling;
7031
+ _el$145.nextSibling;
7032
+ var _el$146 = _el$142.nextSibling, _el$148 = _el$146.firstChild, _el$149 = _el$148.nextSibling;
7033
+ insert(_el$142, () => folder.name, _el$145);
7034
+ insert(_el$142, (() => {
6551
7035
  var _c$6 = memo(() => folder.items.length > 0);
6552
7036
  return () => _c$6() ? ` This folder has ${folder.items.length} bookmark${folder.items.length === 1 ? "" : "s"}.` : "";
6553
7037
  })(), null);
6554
- insert(_el$139, createComponent(Show, {
7038
+ insert(_el$146, createComponent(Show, {
6555
7039
  get when() {
6556
7040
  return folder.items.length > 0;
6557
7041
  },
6558
7042
  get children() {
6559
- var _el$140 = _tmpl$34$1();
6560
- _el$140.$$click = () => void handleRemoveFolder(folder.id, false);
6561
- return _el$140;
7043
+ var _el$147 = _tmpl$36$1();
7044
+ _el$147.$$click = () => void handleRemoveFolder(folder.id, false);
7045
+ return _el$147;
6562
7046
  }
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;
7047
+ }), _el$148);
7048
+ _el$148.$$click = () => void handleRemoveFolder(folder.id, true);
7049
+ insert(_el$148, () => folder.items.length > 0 ? "Delete all" : "Delete folder");
7050
+ _el$149.$$click = () => setDeletingFolderId(null);
7051
+ return _el$141;
6568
7052
  }
6569
7053
  }), null);
6570
- insert(_el$122, createComponent(Show, {
7054
+ insert(_el$129, createComponent(Show, {
6571
7055
  get when() {
6572
7056
  return editingFolderId() === folder.id;
6573
7057
  },
6574
7058
  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 = () => {
7059
+ 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;
7060
+ _el$152.$$input = (e) => setEditingFolderName(e.currentTarget.value);
7061
+ _el$153.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
7062
+ _el$154.$$click = () => void handleRenameFolder(folder.id);
7063
+ _el$155.$$click = () => {
6580
7064
  setEditingFolderId(null);
6581
7065
  setEditingFolderName("");
6582
7066
  setEditingFolderSummary("");
6583
7067
  };
6584
- createRenderEffect(() => _el$147.disabled = !editingFolderName().trim());
6585
- createRenderEffect(() => _el$145.value = editingFolderName());
6586
- createRenderEffect(() => _el$146.value = editingFolderSummary());
6587
- return _el$143;
7068
+ createRenderEffect(() => _el$154.disabled = !editingFolderName().trim());
7069
+ createRenderEffect(() => _el$152.value = editingFolderName());
7070
+ createRenderEffect(() => _el$153.value = editingFolderSummary());
7071
+ return _el$150;
6588
7072
  }
6589
7073
  }), null);
6590
- insert(_el$122, createComponent(Show, {
7074
+ insert(_el$129, createComponent(Show, {
6591
7075
  get when() {
6592
7076
  return isFolderExpanded(folder.id);
6593
7077
  },
6594
7078
  get fallback() {
6595
- return _tmpl$39();
7079
+ return _tmpl$41$1();
6596
7080
  },
6597
7081
  get children() {
6598
7082
  return createComponent(Show, {
@@ -6600,116 +7084,116 @@ ${contextBlock}` : contextBlock);
6600
7084
  return folder.items.length > 0;
6601
7085
  },
6602
7086
  get fallback() {
6603
- return _tmpl$40();
7087
+ return _tmpl$42$1();
6604
7088
  },
6605
7089
  get children() {
6606
- var _el$149 = _tmpl$37$1();
6607
- insert(_el$149, createComponent(For, {
7090
+ var _el$156 = _tmpl$39$1();
7091
+ insert(_el$156, createComponent(For, {
6608
7092
  get each() {
6609
7093
  return folder.items;
6610
7094
  },
6611
7095
  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, {
7096
+ 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;
7097
+ _el$160.$$click = () => void createTab(bookmark.url);
7098
+ insert(_el$161, () => bookmark.title || bookmark.url);
7099
+ insert(_el$162, () => bookmark.url);
7100
+ insert(_el$159, createComponent(Show, {
6617
7101
  get when() {
6618
7102
  return bookmark.note;
6619
7103
  },
6620
7104
  get children() {
6621
- var _el$156 = _tmpl$41();
6622
- insert(_el$156, () => bookmark.note);
6623
- return _el$156;
7105
+ var _el$163 = _tmpl$43();
7106
+ insert(_el$163, () => bookmark.note);
7107
+ return _el$163;
6624
7108
  }
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;
7109
+ }), _el$164);
7110
+ insert(_el$165, () => formatBookmarkDate(bookmark.savedAt));
7111
+ _el$166.$$click = () => void removeBookmark(bookmark.id);
7112
+ createRenderEffect(() => setAttribute(_el$159, "data-bookmark-id", bookmark.id));
7113
+ return _el$159;
6630
7114
  })()
6631
7115
  }));
6632
- return _el$149;
7116
+ return _el$156;
6633
7117
  }
6634
7118
  });
6635
7119
  }
6636
7120
  }), null);
6637
- createRenderEffect(() => _el$125.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
6638
- return _el$122;
7121
+ createRenderEffect(() => _el$132.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
7122
+ return _el$129;
6639
7123
  })()
6640
7124
  });
6641
7125
  }
6642
7126
  }));
6643
7127
  createRenderEffect((_p$) => {
6644
7128
  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);
7129
+ _v$ !== _p$.e && _el$49.classList.toggle("expanded", _p$.e = _v$);
7130
+ _v$2 !== _p$.t && (_el$60.disabled = _p$.t = _v$2);
6647
7131
  return _p$;
6648
7132
  }, {
6649
7133
  e: void 0,
6650
7134
  t: void 0
6651
7135
  });
6652
- createRenderEffect(() => _el$44.value = bookmarkSearchQuery());
6653
- createRenderEffect(() => _el$57.value = newFolderName());
6654
- createRenderEffect(() => _el$58.value = newFolderSummary());
6655
- return _el$38;
7136
+ createRenderEffect(() => _el$45.value = bookmarkSearchQuery());
7137
+ createRenderEffect(() => _el$58.value = newFolderName());
7138
+ createRenderEffect(() => _el$59.value = newFolderSummary());
7139
+ return _el$39;
6656
7140
  }
6657
- }), _el$86);
6658
- insert(_el$23, createComponent(Show, {
7141
+ }), _el$93);
7142
+ insert(_el$24, createComponent(Show, {
6659
7143
  get when() {
6660
7144
  return sidebarTab() === "checkpoints";
6661
7145
  },
6662
7146
  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, (() => {
7147
+ 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;
7148
+ _el$68.nextSibling;
7149
+ insert(_el$66, (() => {
6666
7150
  var _c$3 = memo(() => recentCheckpoints().length > 0);
6667
7151
  return () => _c$3() ? `${recentCheckpoints().length} saved snapshots` : "Save and restore session snapshots";
6668
7152
  })());
6669
- _el$68.$$input = (e) => setCheckpointName(e.currentTarget.value);
6670
- _el$69.$$click = async () => {
7153
+ _el$69.$$input = (e) => setCheckpointName(e.currentTarget.value);
7154
+ _el$70.$$click = async () => {
6671
7155
  const name = checkpointName().trim();
6672
7156
  await createCheckpoint(name || void 0);
6673
7157
  setCheckpointName("");
6674
7158
  };
6675
- insert(_el$66, createComponent(Show, {
7159
+ insert(_el$67, createComponent(Show, {
6676
7160
  get when() {
6677
7161
  return recentCheckpoints().length > 0;
6678
7162
  },
6679
7163
  get fallback() {
6680
- return _tmpl$43();
7164
+ return _tmpl$45();
6681
7165
  },
6682
7166
  get children() {
6683
- var _el$71 = _tmpl$0$2();
6684
- insert(_el$71, createComponent(For, {
7167
+ var _el$72 = _tmpl$0$2();
7168
+ insert(_el$72, createComponent(For, {
6685
7169
  get each() {
6686
7170
  return recentCheckpoints();
6687
7171
  },
6688
7172
  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, {
7173
+ 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;
7174
+ insert(_el$169, createComponent(Show, {
6691
7175
  get when() {
6692
7176
  return i() < recentCheckpoints().length - 1;
6693
7177
  },
6694
7178
  get children() {
6695
- return _tmpl$44();
7179
+ return _tmpl$46();
6696
7180
  }
6697
7181
  }), 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;
7182
+ insert(_el$173, () => checkpoint.name);
7183
+ insert(_el$174, () => new Date(checkpoint.createdAt).toLocaleString());
7184
+ _el$175.$$click = () => void restoreCheckpoint(checkpoint.id);
7185
+ createRenderEffect(() => _el$170.classList.toggle("latest", !!(i() === 0)));
7186
+ return _el$168;
6703
7187
  })()
6704
7188
  }));
6705
- return _el$71;
7189
+ return _el$72;
6706
7190
  }
6707
7191
  }), null);
6708
- createRenderEffect(() => _el$68.value = checkpointName());
6709
- return _el$61;
7192
+ createRenderEffect(() => _el$69.value = checkpointName());
7193
+ return _el$62;
6710
7194
  }
6711
- }), _el$86);
6712
- insert(_el$23, createComponent(Show, {
7195
+ }), _el$93);
7196
+ insert(_el$24, createComponent(Show, {
6713
7197
  get when() {
6714
7198
  return sidebarTab() === "automation";
6715
7199
  },
@@ -6718,8 +7202,41 @@ ${contextBlock}` : contextBlock);
6718
7202
  onRun: () => setSidebarTab("supervisor")
6719
7203
  });
6720
7204
  }
6721
- }), _el$86);
6722
- insert(_el$23, createComponent(Show, {
7205
+ }), _el$93);
7206
+ insert(_el$24, createComponent(Show, {
7207
+ get when() {
7208
+ return sidebarTab() === "history";
7209
+ },
7210
+ get children() {
7211
+ 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;
7212
+ _el$76.$$click = async () => {
7213
+ await history.clear();
7214
+ };
7215
+ insert(_el$77, createComponent(For, {
7216
+ get each() {
7217
+ return history.historyState().entries;
7218
+ },
7219
+ children: (entry) => (() => {
7220
+ var _el$176 = _tmpl$48(), _el$177 = _el$176.firstChild, _el$178 = _el$177.nextSibling, _el$179 = _el$178.nextSibling;
7221
+ _el$176.$$click = () => createTab(entry.url);
7222
+ insert(_el$177, () => entry.title || entry.url);
7223
+ insert(_el$178, () => entry.url);
7224
+ insert(_el$179, () => new Date(entry.visitedAt).toLocaleString());
7225
+ return _el$176;
7226
+ })()
7227
+ }), null);
7228
+ insert(_el$77, createComponent(Show, {
7229
+ get when() {
7230
+ return history.historyState().entries.length === 0;
7231
+ },
7232
+ get children() {
7233
+ return _tmpl$10$2();
7234
+ }
7235
+ }), null);
7236
+ return _el$73;
7237
+ }
7238
+ }), _el$93);
7239
+ insert(_el$24, createComponent(Show, {
6723
7240
  get when() {
6724
7241
  return sidebarTab() === "chat";
6725
7242
  },
@@ -6729,23 +7246,23 @@ ${contextBlock}` : contextBlock);
6729
7246
  return !isPremium();
6730
7247
  },
6731
7248
  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;
7249
+ 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;
7250
+ _el$83.$$click = () => openPremiumCheckout("chat_banner_clicked");
7251
+ _el$84.$$click = openPremiumDetails;
7252
+ return _el$79;
6736
7253
  }
6737
7254
  }), createComponent(For, {
6738
7255
  get each() {
6739
7256
  return messages2();
6740
7257
  },
6741
7258
  children: (msg) => (() => {
6742
- var _el$169 = _tmpl$46();
6743
- insert(_el$169, createComponent(MarkdownMessage, {
7259
+ var _el$180 = _tmpl$49();
7260
+ insert(_el$180, createComponent(MarkdownMessage, {
6744
7261
  get content() {
6745
7262
  return msg.content;
6746
7263
  }
6747
7264
  }), null);
6748
- insert(_el$169, createComponent(Show, {
7265
+ insert(_el$180, createComponent(Show, {
6749
7266
  get when() {
6750
7267
  return memo(() => msg.role === "assistant")() ? getPremiumPromptKind(msg.content) : null;
6751
7268
  },
@@ -6758,31 +7275,31 @@ ${contextBlock}` : contextBlock);
6758
7275
  onOpenSettings: openPremiumDetails
6759
7276
  })
6760
7277
  }), null);
6761
- createRenderEffect(() => className(_el$169, `message message-${msg.role}`));
6762
- return _el$169;
7278
+ createRenderEffect(() => className(_el$180, `message message-${msg.role}`));
7279
+ return _el$180;
6763
7280
  })()
6764
7281
  }), createComponent(Show, {
6765
7282
  get when() {
6766
7283
  return isStreaming2();
6767
7284
  },
6768
7285
  get children() {
6769
- var _el$78 = _tmpl$13$1(), _el$79 = _el$78.firstChild;
6770
- insert(_el$79, createComponent(Show, {
7286
+ var _el$85 = _tmpl$15$1(), _el$86 = _el$85.firstChild;
7287
+ insert(_el$86, createComponent(Show, {
6771
7288
  get when() {
6772
7289
  return hasFirstChunk2();
6773
7290
  },
6774
7291
  get fallback() {
6775
- return _tmpl$47();
7292
+ return _tmpl$50();
6776
7293
  },
6777
7294
  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, {
7295
+ var _el$87 = _tmpl$14$1(), _el$88 = _el$87.firstChild, _el$89 = _el$88.firstChild;
7296
+ _el$89.nextSibling;
7297
+ insert(_el$87, createComponent(MarkdownMessage, {
6781
7298
  get content() {
6782
7299
  return streamingText2();
6783
7300
  }
6784
- }), _el$81);
6785
- insert(_el$80, createComponent(Show, {
7301
+ }), _el$88);
7302
+ insert(_el$87, createComponent(Show, {
6786
7303
  get when() {
6787
7304
  return getPremiumPromptKind(streamingText2());
6788
7305
  },
@@ -6794,21 +7311,21 @@ ${contextBlock}` : contextBlock);
6794
7311
  onStartTrial: () => openPremiumCheckout(kind() === "premium_gate" ? "premium_gate_clicked" : "iteration_limit_clicked"),
6795
7312
  onOpenSettings: openPremiumDetails
6796
7313
  })
6797
- }), _el$81);
6798
- insert(_el$81, createComponent(Show, {
7314
+ }), _el$88);
7315
+ insert(_el$88, createComponent(Show, {
6799
7316
  get when() {
6800
7317
  return elapsedSeconds() > 0;
6801
7318
  },
6802
7319
  get children() {
6803
- var _el$84 = _tmpl$11$2();
6804
- insert(_el$84, () => ` • ${elapsedSeconds()}s`);
6805
- return _el$84;
7320
+ var _el$91 = _tmpl$13$1();
7321
+ insert(_el$91, () => ` • ${elapsedSeconds()}s`);
7322
+ return _el$91;
6806
7323
  }
6807
7324
  }), null);
6808
- return _el$80;
7325
+ return _el$87;
6809
7326
  }
6810
7327
  }));
6811
- return _el$78;
7328
+ return _el$85;
6812
7329
  }
6813
7330
  }), createComponent(Show, {
6814
7331
  get when() {
@@ -6820,22 +7337,22 @@ ${contextBlock}` : contextBlock);
6820
7337
  return runtimeState2().supervisor.pendingApprovals;
6821
7338
  },
6822
7339
  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, {
7340
+ 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;
7341
+ insert(_el$187, () => approval.name);
7342
+ insert(_el$184, createComponent(Show, {
6826
7343
  get when() {
6827
7344
  return approval.argsSummary;
6828
7345
  },
6829
7346
  get children() {
6830
- var _el$177 = _tmpl$48();
6831
- insert(_el$177, () => approval.argsSummary);
6832
- return _el$177;
7347
+ var _el$188 = _tmpl$51();
7348
+ insert(_el$188, () => approval.argsSummary);
7349
+ return _el$188;
6833
7350
  }
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;
7351
+ }), _el$189);
7352
+ insert(_el$189, () => approval.reason);
7353
+ _el$191.$$click = () => void resolveApproval(approval.id, true);
7354
+ _el$192.$$click = () => void resolveApproval(approval.id, false);
7355
+ return _el$182;
6839
7356
  })()
6840
7357
  });
6841
7358
  }
@@ -6844,13 +7361,13 @@ ${contextBlock}` : contextBlock);
6844
7361
  return memo(() => messages2().length === 0)() && !isStreaming2();
6845
7362
  },
6846
7363
  get children() {
6847
- return _tmpl$14$1();
7364
+ return _tmpl$16$1();
6848
7365
  }
6849
7366
  })];
6850
7367
  }
6851
- }), _el$86);
7368
+ }), _el$93);
6852
7369
  var _ref$ = messagesEndRef;
6853
- typeof _ref$ === "function" ? use(_ref$, _el$86) : messagesEndRef = _el$86;
7370
+ typeof _ref$ === "function" ? use(_ref$, _el$93) : messagesEndRef = _el$93;
6854
7371
  insert(_el$9, createComponent(Show, {
6855
7372
  get when() {
6856
7373
  return sidebarTab() === "chat";
@@ -6861,125 +7378,125 @@ ${contextBlock}` : contextBlock);
6861
7378
  return isStreaming2() || messages2().length > 0;
6862
7379
  },
6863
7380
  get children() {
6864
- var _el$87 = _tmpl$17$1();
6865
- insert(_el$87, createComponent(Show, {
7381
+ var _el$94 = _tmpl$19$1();
7382
+ insert(_el$94, createComponent(Show, {
6866
7383
  get when() {
6867
7384
  return isStreaming2();
6868
7385
  },
6869
7386
  get children() {
6870
- var _el$88 = _tmpl$15$1();
6871
- _el$88.$$click = () => cancel();
6872
- return _el$88;
7387
+ var _el$95 = _tmpl$17$1();
7388
+ _el$95.$$click = () => cancel();
7389
+ return _el$95;
6873
7390
  }
6874
7391
  }), null);
6875
- insert(_el$87, createComponent(Show, {
7392
+ insert(_el$94, createComponent(Show, {
6876
7393
  get when() {
6877
7394
  return memo(() => !!!isStreaming2())() && messages2().length > 0;
6878
7395
  },
6879
7396
  get children() {
6880
- var _el$89 = _tmpl$16$1();
6881
- _el$89.$$click = handleRetry;
6882
- return _el$89;
7397
+ var _el$96 = _tmpl$18$1();
7398
+ _el$96.$$click = handleRetry;
7399
+ return _el$96;
6883
7400
  }
6884
7401
  }), null);
6885
- return _el$87;
7402
+ return _el$94;
6886
7403
  }
6887
7404
  }), createComponent(Show, {
6888
7405
  get when() {
6889
7406
  return highlightCount() > 0;
6890
7407
  },
6891
7408
  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, (() => {
7409
+ var _el$97 = _tmpl$20$1(), _el$98 = _el$97.firstChild, _el$99 = _el$98.nextSibling;
7410
+ _el$99.firstChild;
7411
+ var _el$101 = _el$99.nextSibling;
7412
+ _el$98.$$click = () => void scrollToHighlight(highlightIndex() - 1);
7413
+ _el$99.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
7414
+ insert(_el$99, (() => {
6898
7415
  var _c$4 = memo(() => highlightIndex() >= 0);
6899
7416
  return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
6900
7417
  })(), null);
6901
- _el$94.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
7418
+ _el$101.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
6902
7419
  createRenderEffect((_p$) => {
6903
7420
  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);
7421
+ _v$3 !== _p$.e && (_el$98.disabled = _p$.e = _v$3);
7422
+ _v$4 !== _p$.t && (_el$101.disabled = _p$.t = _v$4);
6906
7423
  return _p$;
6907
7424
  }, {
6908
7425
  e: void 0,
6909
7426
  t: void 0
6910
7427
  });
6911
- return _el$90;
7428
+ return _el$97;
6912
7429
  }
6913
7430
  }), createComponent(Show, {
6914
7431
  get when() {
6915
7432
  return queueNotice2() !== null || pendingQueryCount() > 0;
6916
7433
  },
6917
7434
  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, {
7435
+ var _el$102 = _tmpl$23$1(), _el$103 = _el$102.firstChild, _el$104 = _el$103.firstChild;
7436
+ insert(_el$104, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
7437
+ insert(_el$103, createComponent(Show, {
6921
7438
  get when() {
6922
7439
  return pendingQueryCount() > 0;
6923
7440
  },
6924
7441
  get children() {
6925
- var _el$98 = _tmpl$19$1();
6926
- _el$98.$$click = () => clearPendingQueries();
6927
- return _el$98;
7442
+ var _el$105 = _tmpl$21$1();
7443
+ _el$105.$$click = () => clearPendingQueries();
7444
+ return _el$105;
6928
7445
  }
6929
7446
  }), null);
6930
- insert(_el$95, createComponent(Show, {
7447
+ insert(_el$102, createComponent(Show, {
6931
7448
  get when() {
6932
7449
  return pendingQueries2().length > 0;
6933
7450
  },
6934
7451
  get children() {
6935
- var _el$99 = _tmpl$20$1();
6936
- insert(_el$99, createComponent(For, {
7452
+ var _el$106 = _tmpl$22$1();
7453
+ insert(_el$106, createComponent(For, {
6937
7454
  get each() {
6938
7455
  return pendingQueries2();
6939
7456
  },
6940
7457
  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;
7458
+ var _el$193 = _tmpl$53(), _el$194 = _el$193.firstChild, _el$195 = _el$194.nextSibling;
7459
+ setAttribute(_el$194, "title", pendingPrompt);
7460
+ insert(_el$194, pendingPrompt);
7461
+ _el$195.$$click = () => removePendingQuery(index());
7462
+ createRenderEffect(() => setAttribute(_el$195, "aria-label", `Remove queued prompt ${index() + 1}`));
7463
+ return _el$193;
6947
7464
  })()
6948
7465
  }));
6949
- return _el$99;
7466
+ return _el$106;
6950
7467
  }
6951
7468
  }), null);
6952
- return _el$95;
7469
+ return _el$102;
6953
7470
  }
6954
7471
  }), (() => {
6955
- var _el$100 = _tmpl$22$1(), _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling;
6956
- _el$101.$$keydown = (e) => {
7472
+ var _el$107 = _tmpl$24$1(), _el$108 = _el$107.firstChild, _el$109 = _el$108.nextSibling;
7473
+ _el$108.$$keydown = (e) => {
6957
7474
  if (e.key === "Enter" && !e.shiftKey) {
6958
7475
  e.preventDefault();
6959
7476
  void handleChatSend();
6960
7477
  }
6961
7478
  };
6962
- _el$101.$$input = (e) => setChatInput(e.currentTarget.value);
7479
+ _el$108.$$input = (e) => setChatInput(e.currentTarget.value);
6963
7480
  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");
7481
+ typeof _ref$2 === "function" ? use(_ref$2, _el$108) : chatInputRef = _el$108;
7482
+ _el$109.$$click = () => void handleChatSend();
7483
+ insert(_el$109, () => isStreaming2() ? "Queue" : "Send");
6967
7484
  createRenderEffect((_p$) => {
6968
7485
  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);
7486
+ _v$5 !== _p$.e && setAttribute(_el$108, "placeholder", _p$.e = _v$5);
7487
+ _v$6 !== _p$.t && (_el$109.disabled = _p$.t = _v$6);
6971
7488
  return _p$;
6972
7489
  }, {
6973
7490
  e: void 0,
6974
7491
  t: void 0
6975
7492
  });
6976
- createRenderEffect(() => _el$101.value = chatInput());
6977
- return _el$100;
7493
+ createRenderEffect(() => _el$108.value = chatInput());
7494
+ return _el$107;
6978
7495
  })()];
6979
7496
  }
6980
7497
  }), null);
6981
7498
  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";
7499
+ 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
7500
  _v$7 !== _p$.e && setStyleProperty(_el$9, "width", _p$.e = _v$7);
6984
7501
  _v$8 !== _p$.t && _el$0.classList.toggle("dragging", _p$.t = _v$8);
6985
7502
  _v$9 !== _p$.a && _el$16.classList.toggle("active", _p$.a = _v$9);
@@ -6992,6 +7509,8 @@ ${contextBlock}` : contextBlock);
6992
7509
  _v$14 !== _p$.d && setAttribute(_el$21, "aria-selected", _p$.d = _v$14);
6993
7510
  _v$15 !== _p$.l && _el$22.classList.toggle("active", _p$.l = _v$15);
6994
7511
  _v$16 !== _p$.u && setAttribute(_el$22, "aria-selected", _p$.u = _v$16);
7512
+ _v$17 !== _p$.c && _el$23.classList.toggle("active", _p$.c = _v$17);
7513
+ _v$18 !== _p$.w && setAttribute(_el$23, "aria-selected", _p$.w = _v$18);
6995
7514
  return _p$;
6996
7515
  }, {
6997
7516
  e: void 0,
@@ -7005,7 +7524,9 @@ ${contextBlock}` : contextBlock);
7005
7524
  r: void 0,
7006
7525
  d: void 0,
7007
7526
  l: void 0,
7008
- u: void 0
7527
+ u: void 0,
7528
+ c: void 0,
7529
+ w: void 0
7009
7530
  });
7010
7531
  return _el$9;
7011
7532
  }
@@ -7533,7 +8054,7 @@ const PROVIDERS = {
7533
8054
  apiKeyHint: "Optional — only if your endpoint requires authentication"
7534
8055
  }
7535
8056
  };
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>
8057
+ 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
8058
  .settings-panel {
7538
8059
  width: min(440px, calc(100vw - 32px));
7539
8060
  max-height: calc(100vh - 48px);
@@ -7653,6 +8174,14 @@ var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><butt
7653
8174
  .settings-select {
7654
8175
  appearance: none;
7655
8176
  }
8177
+ .settings-textarea {
8178
+ height: auto;
8179
+ min-height: 70px;
8180
+ padding: 8px 12px;
8181
+ resize: vertical;
8182
+ line-height: 1.5;
8183
+ margin-top: 8px;
8184
+ }
7656
8185
  .settings-input:focus {
7657
8186
  border-color: var(--accent-primary);
7658
8187
  box-shadow: 0 0 0 2px rgba(196, 160, 90, 0.1);
@@ -8067,7 +8596,7 @@ var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><butt
8067
8596
  justify-content: flex-end;
8068
8597
  margin-top: 4px;
8069
8598
  }
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;`);
8599
+ `), _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
8600
  const CHAT_PROVIDERS = Object.values(PROVIDERS).map((p) => ({
8072
8601
  id: p.id,
8073
8602
  name: p.name,
@@ -8095,8 +8624,21 @@ const Settings = () => {
8095
8624
  const [agentTranscriptMode, setAgentTranscriptMode] = createSignal("summary");
8096
8625
  const [health, setHealth] = createSignal(null);
8097
8626
  const [defaultUrl, setDefaultUrl] = createSignal("https://start.duckduckgo.com");
8627
+ const [downloadPath, setDownloadPath] = createSignal("");
8098
8628
  const [status, setStatus] = createSignal(null);
8099
8629
  const [telemetryEnabled, setTelemetryEnabled] = createSignal(true);
8630
+ const [theme, setTheme] = createSignal("dark");
8631
+ const [domainMode, setDomainMode] = createSignal("none");
8632
+ const [domainList, setDomainList] = createSignal("");
8633
+ const [sessionList, setSessionList] = createSignal([]);
8634
+ const [sessionSaveName, setSessionSaveName] = createSignal("");
8635
+ const loadSessionList = async () => {
8636
+ try {
8637
+ const sessions = await window.vessel.sessions.list();
8638
+ setSessionList(sessions);
8639
+ } catch {
8640
+ }
8641
+ };
8100
8642
  const [vaultEntries, setVaultEntries] = createSignal([]);
8101
8643
  const [vaultExpanded, setVaultExpanded] = createSignal(false);
8102
8644
  const [vaultAdding, setVaultAdding] = createSignal(false);
@@ -8363,7 +8905,9 @@ const Settings = () => {
8363
8905
  const loadState = async () => {
8364
8906
  const settings = await window.vessel.settings.get();
8365
8907
  const runtimeHealth = await window.vessel.settings.getHealth();
8908
+ setTheme(settings.theme ?? "dark");
8366
8909
  setDefaultUrl(settings.defaultUrl ?? "https://start.duckduckgo.com");
8910
+ setDownloadPath(settings.downloadPath ?? "");
8367
8911
  setAutoRestoreSession(settings.autoRestoreSession ?? true);
8368
8912
  setClearBookmarksOnLaunch(settings.clearBookmarksOnLaunch ?? false);
8369
8913
  setObsidianVaultPath(settings.obsidianVaultPath ?? "");
@@ -8384,6 +8928,20 @@ const Settings = () => {
8384
8928
  setChatHasStoredApiKey(false);
8385
8929
  }
8386
8930
  setTelemetryEnabled(settings.telemetryEnabled !== false);
8931
+ const dp = settings.domainPolicy ?? {
8932
+ allowedDomains: [],
8933
+ blockedDomains: []
8934
+ };
8935
+ if (dp.allowedDomains.length > 0) {
8936
+ setDomainMode("allowlist");
8937
+ setDomainList(dp.allowedDomains.join("\n"));
8938
+ } else if (dp.blockedDomains.length > 0) {
8939
+ setDomainMode("blocklist");
8940
+ setDomainList(dp.blockedDomains.join("\n"));
8941
+ } else {
8942
+ setDomainMode("none");
8943
+ setDomainList("");
8944
+ }
8387
8945
  try {
8388
8946
  const ps = await window.vessel.premium.getState();
8389
8947
  setPremiumState(ps);
@@ -8391,6 +8949,7 @@ const Settings = () => {
8391
8949
  } catch {
8392
8950
  }
8393
8951
  await loadVaultEntries();
8952
+ await loadSessionList();
8394
8953
  };
8395
8954
  onMount(() => {
8396
8955
  void loadState();
@@ -8437,6 +8996,8 @@ const Settings = () => {
8437
8996
  });
8438
8997
  return;
8439
8998
  }
8999
+ await window.vessel.settings.set("theme", theme());
9000
+ await window.vessel.settings.set("downloadPath", downloadPath().trim());
8440
9001
  await window.vessel.settings.set("defaultUrl", defaultUrl().trim() || "https://start.duckduckgo.com");
8441
9002
  await window.vessel.settings.set("autoRestoreSession", autoRestoreSession());
8442
9003
  await window.vessel.settings.set("clearBookmarksOnLaunch", clearBookmarksOnLaunch());
@@ -8446,6 +9007,18 @@ const Settings = () => {
8446
9007
  await window.vessel.settings.set("maxToolIterations", Math.max(10, Math.min(1e3, parsedIterations)));
8447
9008
  await window.vessel.settings.set("agentTranscriptMode", agentTranscriptMode());
8448
9009
  await window.vessel.settings.set("telemetryEnabled", telemetryEnabled());
9010
+ const domains = domainList().split("\n").map((d) => d.trim()).filter((d) => d.length > 0);
9011
+ const domainPolicy = domainMode() === "allowlist" ? {
9012
+ allowedDomains: domains,
9013
+ blockedDomains: []
9014
+ } : domainMode() === "blocklist" ? {
9015
+ allowedDomains: [],
9016
+ blockedDomains: domains
9017
+ } : {
9018
+ allowedDomains: [],
9019
+ blockedDomains: []
9020
+ };
9021
+ await window.vessel.settings.set("domainPolicy", domainPolicy);
8449
9022
  const chatConfig = chatEnabled() ? {
8450
9023
  id: chatProviderId(),
8451
9024
  apiKey: chatApiKey().trim(),
@@ -8475,13 +9048,13 @@ const Settings = () => {
8475
9048
  },
8476
9049
  get children() {
8477
9050
  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;
9051
+ 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
9052
  _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;
9053
+ var _el$85 = _el$76.nextSibling, _el$86 = _el$85.nextSibling, _el$87 = _el$86.firstChild;
9054
+ _el$87.firstChild;
9055
+ var _el$103 = _el$86.nextSibling, _el$104 = _el$103.nextSibling, _el$105 = _el$104.firstChild;
9056
+ _el$105.nextSibling;
9057
+ 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
9058
  addEventListener(_el$, "click", closeSettings, true);
8486
9059
  _el$2.$$keydown = handleKeyDown;
8487
9060
  _el$2.$$click = (e) => e.stopPropagation();
@@ -8531,23 +9104,25 @@ const Settings = () => {
8531
9104
  }), _el$18);
8532
9105
  _el$20.$$input = (e) => setDefaultUrl(e.currentTarget.value);
8533
9106
  setAttribute(_el$20, "spellcheck", false);
8534
- _el$23.$$input = (e) => setMcpPort(e.currentTarget.value);
9107
+ _el$23.$$input = (e) => setDownloadPath(e.currentTarget.value);
8535
9108
  setAttribute(_el$23, "spellcheck", false);
8536
- insert(_el$24, createComponent(Show, {
9109
+ _el$26.$$input = (e) => setMcpPort(e.currentTarget.value);
9110
+ setAttribute(_el$26, "spellcheck", false);
9111
+ insert(_el$27, createComponent(Show, {
8537
9112
  get when() {
8538
9113
  return premiumActive();
8539
9114
  },
8540
9115
  get fallback() {
8541
- return _tmpl$23();
9116
+ return _tmpl$26();
8542
9117
  },
8543
9118
  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;
9119
+ var _el$29 = _tmpl$4$1();
9120
+ _el$29.$$input = (e) => setMaxToolIterations(e.currentTarget.value);
9121
+ createRenderEffect(() => _el$29.value = maxToolIterations());
9122
+ return _el$29;
8548
9123
  }
8549
- }), _el$27);
8550
- insert(_el$27, createComponent(Show, {
9124
+ }), _el$30);
9125
+ insert(_el$30, createComponent(Show, {
8551
9126
  get when() {
8552
9127
  return premiumActive();
8553
9128
  },
@@ -8559,71 +9134,133 @@ const Settings = () => {
8559
9134
  return health();
8560
9135
  },
8561
9136
  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, {
9137
+ 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;
9138
+ _el$152.nextSibling;
9139
+ insert(_el$152, () => currentHealth().mcp.status);
9140
+ insert(_el$149, () => currentHealth().mcp.message, null);
9141
+ insert(_el$147, createComponent(Show, {
8567
9142
  get when() {
8568
9143
  return currentHealth().mcp.endpoint;
8569
9144
  },
8570
9145
  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;
9146
+ var _el$155 = _tmpl$29(), _el$156 = _el$155.firstChild, _el$157 = _el$156.nextSibling;
9147
+ insert(_el$157, endpoint);
9148
+ return _el$155;
8574
9149
  })()
8575
9150
  }), null);
8576
- insert(_el$126, createComponent(Show, {
9151
+ insert(_el$147, createComponent(Show, {
8577
9152
  get when() {
8578
9153
  return currentHealth().startupIssues.length > 0;
8579
9154
  },
8580
9155
  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, {
9156
+ var _el$154 = _tmpl$27();
9157
+ insert(_el$154, () => currentHealth().startupIssues.map((issue) => (() => {
9158
+ var _el$158 = _tmpl$30(), _el$159 = _el$158.firstChild, _el$160 = _el$159.nextSibling;
9159
+ insert(_el$159, () => issue.title);
9160
+ insert(_el$160, () => issue.detail);
9161
+ insert(_el$158, createComponent(Show, {
8587
9162
  get when() {
8588
9163
  return issue.action;
8589
9164
  },
8590
9165
  children: (action) => (() => {
8591
- var _el$140 = _tmpl$28();
8592
- insert(_el$140, action);
8593
- return _el$140;
9166
+ var _el$161 = _tmpl$31();
9167
+ insert(_el$161, action);
9168
+ return _el$161;
8594
9169
  })()
8595
9170
  }), null);
8596
9171
  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);
9172
+ var _v$1 = !!(issue.severity === "warning"), _v$10 = !!(issue.severity === "error");
9173
+ _v$1 !== _p$.e && _el$158.classList.toggle("warning", _p$.e = _v$1);
9174
+ _v$10 !== _p$.t && _el$158.classList.toggle("error", _p$.t = _v$10);
8600
9175
  return _p$;
8601
9176
  }, {
8602
9177
  e: void 0,
8603
9178
  t: void 0
8604
9179
  });
8605
- return _el$137;
9180
+ return _el$158;
8606
9181
  })()));
8607
- return _el$133;
9182
+ return _el$154;
8608
9183
  }
8609
9184
  }), null);
8610
- return _el$126;
9185
+ return _el$147;
8611
9186
  })()
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());
9187
+ }), _el$31);
9188
+ _el$33.$$input = (e) => setObsidianVaultPath(e.currentTarget.value);
9189
+ setAttribute(_el$33, "spellcheck", false);
9190
+ _el$36.addEventListener("change", (e) => setAgentTranscriptMode(e.currentTarget.value));
9191
+ _el$39.$$click = () => setAutoRestoreSession(!autoRestoreSession());
9192
+ _el$42.$$click = () => setClearBookmarksOnLaunch(!clearBookmarksOnLaunch());
9193
+ _el$48.$$input = (e) => setSessionSaveName(e.currentTarget.value);
9194
+ setAttribute(_el$48, "spellcheck", false);
9195
+ _el$49.$$click = async () => {
9196
+ try {
9197
+ await window.vessel.sessions.save(sessionSaveName().trim());
9198
+ setSessionSaveName("");
9199
+ await loadSessionList();
9200
+ setStatus({
9201
+ kind: "success",
9202
+ text: "Session saved."
9203
+ });
9204
+ setTimeout(() => setStatus(null), 3e3);
9205
+ } catch (err) {
9206
+ setStatus({
9207
+ kind: "error",
9208
+ text: String(err)
9209
+ });
9210
+ }
9211
+ };
9212
+ insert(_el$44, createComponent(Show, {
9213
+ get when() {
9214
+ return sessionList().length > 0;
9215
+ },
9216
+ get children() {
9217
+ var _el$50 = _tmpl$5$1();
9218
+ insert(_el$50, createComponent(For, {
9219
+ get each() {
9220
+ return sessionList();
9221
+ },
9222
+ children: (s) => (() => {
9223
+ 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;
9224
+ _el$173.nextSibling;
9225
+ var _el$174 = _el$163.nextSibling, _el$175 = _el$174.firstChild, _el$176 = _el$175.nextSibling;
9226
+ insert(_el$164, () => s.name);
9227
+ insert(_el$165, () => new Date(s.updatedAt).toLocaleDateString(), _el$166);
9228
+ insert(_el$165, () => s.cookieCount, _el$172);
9229
+ insert(_el$165, () => s.domains.length, _el$173);
9230
+ _el$175.$$click = async () => {
9231
+ try {
9232
+ await window.vessel.sessions.load(s.name);
9233
+ setStatus({
9234
+ kind: "success",
9235
+ text: `Session "${s.name}" restored.`
9236
+ });
9237
+ setTimeout(() => setStatus(null), 3e3);
9238
+ } catch (err) {
9239
+ setStatus({
9240
+ kind: "error",
9241
+ text: String(err)
9242
+ });
9243
+ }
9244
+ };
9245
+ _el$176.$$click = async () => {
9246
+ await window.vessel.sessions.delete(s.name);
9247
+ await loadSessionList();
9248
+ };
9249
+ return _el$162;
9250
+ })()
9251
+ }));
9252
+ return _el$50;
9253
+ }
9254
+ }), null);
9255
+ _el$54.$$click = () => setChatEnabled(!chatEnabled());
8619
9256
  insert(_el$2, createComponent(Show, {
8620
9257
  get when() {
8621
9258
  return chatEnabled();
8622
9259
  },
8623
9260
  get children() {
8624
9261
  return [(() => {
8625
- var _el$44 = _tmpl$5$1(), _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
8626
- _el$46.addEventListener("change", (e) => {
9262
+ var _el$55 = _tmpl$6$1(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
9263
+ _el$57.addEventListener("change", (e) => {
8627
9264
  const id = e.currentTarget.value;
8628
9265
  setChatProviderId(id);
8629
9266
  setChatModel("");
@@ -8633,145 +9270,145 @@ const Settings = () => {
8633
9270
  setProviderModels([]);
8634
9271
  setModelFetchState("idle");
8635
9272
  });
8636
- insert(_el$46, createComponent(For, {
9273
+ insert(_el$57, createComponent(For, {
8637
9274
  each: CHAT_PROVIDERS,
8638
9275
  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;
9276
+ var _el$177 = _tmpl$33();
9277
+ insert(_el$177, () => p.name);
9278
+ createRenderEffect(() => _el$177.value = p.id);
9279
+ return _el$177;
8643
9280
  })()
8644
9281
  }));
8645
- createRenderEffect(() => _el$46.value = chatProviderId());
8646
- return _el$44;
9282
+ createRenderEffect(() => _el$57.value = chatProviderId());
9283
+ return _el$55;
8647
9284
  })(), createComponent(Show, {
8648
9285
  get when() {
8649
9286
  return chatProviderMeta().requiresKey || chatProviderId() === "custom";
8650
9287
  },
8651
9288
  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, {
9289
+ var _el$58 = _tmpl$0(), _el$59 = _el$58.firstChild;
9290
+ _el$59.firstChild;
9291
+ var _el$62 = _el$59.nextSibling;
9292
+ insert(_el$59, createComponent(Show, {
8656
9293
  get when() {
8657
9294
  return !chatProviderMeta().requiresKey;
8658
9295
  },
8659
9296
  get children() {
8660
- return _tmpl$6$1();
9297
+ return _tmpl$7();
8661
9298
  }
8662
9299
  }), null);
8663
- _el$51.$$input = (e) => {
9300
+ _el$62.$$input = (e) => {
8664
9301
  setChatApiKey(e.currentTarget.value);
8665
9302
  if (e.currentTarget.value.trim()) {
8666
9303
  setChatHasStoredApiKey(true);
8667
9304
  }
8668
9305
  };
8669
- setAttribute(_el$51, "spellcheck", false);
8670
- insert(_el$47, createComponent(Show, {
9306
+ setAttribute(_el$62, "spellcheck", false);
9307
+ insert(_el$58, createComponent(Show, {
8671
9308
  get when() {
8672
9309
  return memo(() => !!chatHasStoredApiKey())() && !chatApiKey().trim();
8673
9310
  },
8674
9311
  get children() {
8675
- return _tmpl$7();
9312
+ return _tmpl$8();
8676
9313
  }
8677
9314
  }), null);
8678
- insert(_el$47, createComponent(Show, {
9315
+ insert(_el$58, createComponent(Show, {
8679
9316
  get when() {
8680
9317
  return chatProviderId() === "custom";
8681
9318
  },
8682
9319
  get children() {
8683
- return _tmpl$8();
9320
+ return _tmpl$9();
8684
9321
  }
8685
9322
  }), 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;
9323
+ createRenderEffect(() => setAttribute(_el$62, "placeholder", chatHasStoredApiKey() && !chatApiKey().trim() ? "Stored securely. Enter a new key to replace it." : chatProviderMeta().keyPlaceholder || "Bearer token or API key"));
9324
+ createRenderEffect(() => _el$62.value = chatApiKey());
9325
+ return _el$58;
8689
9326
  }
8690
9327
  }), (() => {
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, {
9328
+ var _el$65 = _tmpl$11(), _el$66 = _el$65.firstChild, _el$67 = _el$66.nextSibling, _el$69 = _el$67.firstChild;
9329
+ insert(_el$67, createComponent(Show, {
8693
9330
  get when() {
8694
9331
  return providerModels().length > 0;
8695
9332
  },
8696
9333
  get fallback() {
8697
9334
  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;
9335
+ var _el$178 = _tmpl$34();
9336
+ _el$178.$$input = (e) => setChatModel(e.currentTarget.value);
9337
+ setAttribute(_el$178, "spellcheck", false);
9338
+ createRenderEffect(() => setAttribute(_el$178, "placeholder", modelFetchState() === "loading" ? "Fetching models…" : chatProviderMeta().requiresKey && !chatApiKey().trim() && !chatHasStoredApiKey() ? "Enter API key to load models" : chatProviderMeta().defaultModel || "model name"));
9339
+ createRenderEffect(() => _el$178.value = chatModel());
9340
+ return _el$178;
8704
9341
  })();
8705
9342
  },
8706
9343
  get children() {
8707
- var _el$57 = _tmpl$0();
8708
- _el$57.addEventListener("change", (e) => setChatModel(e.currentTarget.value));
8709
- insert(_el$57, createComponent(For, {
9344
+ var _el$68 = _tmpl$1();
9345
+ _el$68.addEventListener("change", (e) => setChatModel(e.currentTarget.value));
9346
+ insert(_el$68, createComponent(For, {
8710
9347
  get each() {
8711
9348
  return providerModels();
8712
9349
  },
8713
9350
  children: (m) => (() => {
8714
- var _el$143 = _tmpl$29();
8715
- _el$143.value = m;
8716
- insert(_el$143, m);
8717
- return _el$143;
9351
+ var _el$179 = _tmpl$33();
9352
+ _el$179.value = m;
9353
+ insert(_el$179, m);
9354
+ return _el$179;
8718
9355
  })()
8719
9356
  }));
8720
- createRenderEffect(() => _el$57.value = chatModel());
8721
- return _el$57;
9357
+ createRenderEffect(() => _el$68.value = chatModel());
9358
+ return _el$68;
8722
9359
  }
8723
- }), _el$58);
8724
- _el$58.$$click = doFetchModels;
8725
- insert(_el$54, createComponent(Show, {
9360
+ }), _el$69);
9361
+ _el$69.$$click = doFetchModels;
9362
+ insert(_el$65, createComponent(Show, {
8726
9363
  get when() {
8727
9364
  return modelFetchState() === "error";
8728
9365
  },
8729
9366
  get children() {
8730
- return _tmpl$1();
9367
+ return _tmpl$10();
8731
9368
  }
8732
9369
  }), null);
8733
- insert(_el$54, createComponent(Show, {
9370
+ insert(_el$65, createComponent(Show, {
8734
9371
  get when() {
8735
9372
  return modelFetchWarning();
8736
9373
  },
8737
9374
  children: (warning) => (() => {
8738
- var _el$144 = _tmpl$31();
8739
- insert(_el$144, warning);
8740
- return _el$144;
9375
+ var _el$180 = _tmpl$35();
9376
+ insert(_el$180, warning);
9377
+ return _el$180;
8741
9378
  })()
8742
9379
  }), null);
8743
- createRenderEffect(() => _el$58.disabled = modelFetchState() === "loading");
8744
- return _el$54;
9380
+ createRenderEffect(() => _el$69.disabled = modelFetchState() === "loading");
9381
+ return _el$65;
8745
9382
  })(), createComponent(Show, {
8746
9383
  get when() {
8747
9384
  return chatProviderMeta().needsBaseUrl || chatProviderId() === "custom";
8748
9385
  },
8749
9386
  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;
9387
+ var _el$71 = _tmpl$12(), _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling;
9388
+ _el$73.$$input = (e) => setChatBaseUrl(e.currentTarget.value);
9389
+ setAttribute(_el$73, "spellcheck", false);
9390
+ createRenderEffect(() => setAttribute(_el$73, "placeholder", chatProviderMeta().defaultBaseUrl ?? "https://..."));
9391
+ createRenderEffect(() => _el$73.value = chatBaseUrl());
9392
+ return _el$71;
8756
9393
  }
8757
9394
  }), createComponent(Show, {
8758
9395
  get when() {
8759
9396
  return chatProviderId() === "llama_cpp";
8760
9397
  },
8761
9398
  get children() {
8762
- return _tmpl$12();
9399
+ return _tmpl$13();
8763
9400
  }
8764
9401
  })];
8765
9402
  }
8766
- }), _el$64);
8767
- insert(_el$65, createComponent(Show, {
9403
+ }), _el$75);
9404
+ insert(_el$76, createComponent(Show, {
8768
9405
  get when() {
8769
9406
  return premiumActive();
8770
9407
  },
8771
9408
  get fallback() {
8772
9409
  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) => {
9410
+ 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;
9411
+ _el$184.$$input = (e) => {
8775
9412
  const nextEmail = e.currentTarget.value;
8776
9413
  if (nextEmail.trim().toLowerCase() !== premiumEmail().trim().toLowerCase()) {
8777
9414
  resetPremiumActivationFlow();
@@ -8779,8 +9416,8 @@ const Settings = () => {
8779
9416
  }
8780
9417
  setPremiumEmail(nextEmail);
8781
9418
  };
8782
- setAttribute(_el$148, "spellcheck", false);
8783
- _el$149.$$click = async () => {
9419
+ setAttribute(_el$184, "spellcheck", false);
9420
+ _el$185.$$click = async () => {
8784
9421
  setPremiumLoading(true);
8785
9422
  setPremiumMessage(null);
8786
9423
  try {
@@ -8809,23 +9446,23 @@ const Settings = () => {
8809
9446
  setPremiumLoading(false);
8810
9447
  }
8811
9448
  };
8812
- insert(_el$149, (() => {
9449
+ insert(_el$185, (() => {
8813
9450
  var _c$ = memo(() => !!premiumLoading());
8814
9451
  return () => _c$() ? "Sending..." : premiumCodeSent() ? "Resend Code" : "Send Code";
8815
9452
  })());
8816
- insert(_el$145, createComponent(Show, {
9453
+ insert(_el$181, createComponent(Show, {
8817
9454
  get when() {
8818
9455
  return premiumCodeSent();
8819
9456
  },
8820
9457
  get children() {
8821
- var _el$150 = _tmpl$32(), _el$151 = _el$150.firstChild, _el$152 = _el$151.nextSibling;
8822
- _el$151.$$input = (e) => {
9458
+ var _el$186 = _tmpl$36(), _el$187 = _el$186.firstChild, _el$188 = _el$187.nextSibling;
9459
+ _el$187.$$input = (e) => {
8823
9460
  const nextCode = e.currentTarget.value.replace(/\D+/g, "").slice(0, 6);
8824
9461
  setPremiumCode(nextCode);
8825
9462
  setPremiumMessage(null);
8826
9463
  };
8827
- setAttribute(_el$151, "spellcheck", false);
8828
- _el$152.$$click = async () => {
9464
+ setAttribute(_el$187, "spellcheck", false);
9465
+ _el$188.$$click = async () => {
8829
9466
  setPremiumLoading(true);
8830
9467
  setPremiumMessage(null);
8831
9468
  try {
@@ -8852,60 +9489,60 @@ const Settings = () => {
8852
9489
  setPremiumLoading(false);
8853
9490
  }
8854
9491
  };
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;
9492
+ insert(_el$188, () => premiumLoading() ? "Verifying..." : "Verify Code");
9493
+ createRenderEffect(() => _el$188.disabled = premiumLoading() || !premiumEmail().trim() || premiumCode().trim().length !== 6 || !premiumChallengeToken());
9494
+ createRenderEffect(() => _el$187.value = premiumCode());
9495
+ return _el$186;
8859
9496
  }
8860
- }), _el$153);
8861
- _el$153.$$click = () => {
9497
+ }), _el$189);
9498
+ _el$189.$$click = () => {
8862
9499
  startPremiumCheckout();
8863
9500
  };
8864
- insert(_el$145, createComponent(Show, {
9501
+ insert(_el$181, createComponent(Show, {
8865
9502
  get when() {
8866
9503
  return premiumMessage();
8867
9504
  },
8868
9505
  children: (msg) => (() => {
8869
- var _el$155 = _tmpl$35();
8870
- insert(_el$155, () => msg().text);
9506
+ var _el$191 = _tmpl$39();
9507
+ insert(_el$191, () => msg().text);
8871
9508
  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);
9509
+ var _v$11 = !!(msg().kind === "success"), _v$12 = !!(msg().kind === "error");
9510
+ _v$11 !== _p$.e && _el$191.classList.toggle("success", _p$.e = _v$11);
9511
+ _v$12 !== _p$.t && _el$191.classList.toggle("error", _p$.t = _v$12);
8875
9512
  return _p$;
8876
9513
  }, {
8877
9514
  e: void 0,
8878
9515
  t: void 0
8879
9516
  });
8880
- return _el$155;
9517
+ return _el$191;
8881
9518
  })()
8882
9519
  }), null);
8883
- insert(_el$145, createComponent(Show, {
9520
+ insert(_el$181, createComponent(Show, {
8884
9521
  get when() {
8885
9522
  return premiumState().email || premiumEmail();
8886
9523
  },
8887
9524
  get children() {
8888
- var _el$154 = _tmpl$33();
8889
- _el$154.$$click = async () => {
9525
+ var _el$190 = _tmpl$37();
9526
+ _el$190.$$click = async () => {
8890
9527
  const state = await window.vessel.premium.reset();
8891
9528
  setPremiumState(state);
8892
9529
  setPremiumEmail("");
8893
9530
  resetPremiumActivationFlow();
8894
9531
  setPremiumMessage(null);
8895
9532
  };
8896
- return _el$154;
9533
+ return _el$190;
8897
9534
  }
8898
9535
  }), null);
8899
- createRenderEffect(() => _el$149.disabled = premiumLoading() || !premiumEmail().trim());
8900
- createRenderEffect(() => _el$148.value = premiumEmail());
8901
- return _el$145;
9536
+ createRenderEffect(() => _el$185.disabled = premiumLoading() || !premiumEmail().trim());
9537
+ createRenderEffect(() => _el$184.value = premiumEmail());
9538
+ return _el$181;
8902
9539
  })();
8903
9540
  },
8904
9541
  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, {
9542
+ var _el$78 = _tmpl$14(), _el$79 = _el$78.firstChild;
9543
+ _el$79.firstChild;
9544
+ var _el$81 = _el$79.nextSibling, _el$82 = _el$81.nextSibling, _el$83 = _el$82.firstChild, _el$84 = _el$83.nextSibling;
9545
+ insert(_el$79, createComponent(Show, {
8909
9546
  get when() {
8910
9547
  return premiumState().status === "trialing";
8911
9548
  },
@@ -8913,8 +9550,8 @@ const Settings = () => {
8913
9550
  return [" ", "(Trial)"];
8914
9551
  }
8915
9552
  }), null);
8916
- insert(_el$70, () => premiumState().email, null);
8917
- insert(_el$70, createComponent(Show, {
9553
+ insert(_el$81, () => premiumState().email, null);
9554
+ insert(_el$81, createComponent(Show, {
8918
9555
  get when() {
8919
9556
  return premiumState().expiresAt;
8920
9557
  },
@@ -8922,51 +9559,77 @@ const Settings = () => {
8922
9559
  return [" ", "· Renews", " ", memo(() => new Date(premiumState().expiresAt).toLocaleDateString())];
8923
9560
  }
8924
9561
  }), null);
8925
- _el$72.$$click = () => {
8926
- void window.vessel.premium.portal();
9562
+ _el$83.$$click = async () => {
9563
+ const result = await window.vessel.premium.portal();
9564
+ if (!result.ok) {
9565
+ setPremiumMessage({
9566
+ kind: "error",
9567
+ text: result.error || "Could not open billing portal."
9568
+ });
9569
+ setTimeout(() => setPremiumMessage(null), 5e3);
9570
+ }
8927
9571
  };
8928
- _el$73.$$click = async () => {
9572
+ _el$84.$$click = async () => {
8929
9573
  const state = await window.vessel.premium.reset();
8930
9574
  setPremiumState(state);
8931
9575
  setPremiumEmail("");
8932
9576
  resetPremiumActivationFlow();
8933
9577
  setPremiumMessage(null);
8934
9578
  };
8935
- return _el$67;
9579
+ insert(_el$78, createComponent(Show, {
9580
+ get when() {
9581
+ return premiumMessage();
9582
+ },
9583
+ children: (msg) => (() => {
9584
+ var _el$192 = _tmpl$39();
9585
+ insert(_el$192, () => msg().text);
9586
+ createRenderEffect((_p$) => {
9587
+ var _v$13 = !!(msg().kind === "success"), _v$14 = !!(msg().kind === "error");
9588
+ _v$13 !== _p$.e && _el$192.classList.toggle("success", _p$.e = _v$13);
9589
+ _v$14 !== _p$.t && _el$192.classList.toggle("error", _p$.t = _v$14);
9590
+ return _p$;
9591
+ }, {
9592
+ e: void 0,
9593
+ t: void 0
9594
+ });
9595
+ return _el$192;
9596
+ })()
9597
+ }), null);
9598
+ return _el$78;
8936
9599
  }
8937
9600
  }), null);
8938
- insert(_el$76, createComponent(Show, {
9601
+ insert(_el$87, createComponent(Show, {
8939
9602
  get when() {
8940
9603
  return !premiumActive();
8941
9604
  },
8942
9605
  get children() {
8943
- return _tmpl$14();
9606
+ return _tmpl$15();
8944
9607
  }
8945
9608
  }), null);
8946
- insert(_el$75, createComponent(Show, {
9609
+ insert(_el$86, createComponent(Show, {
8947
9610
  get when() {
8948
9611
  return premiumActive();
8949
9612
  },
8950
9613
  get fallback() {
8951
- return _tmpl$36();
9614
+ return _tmpl$40();
8952
9615
  },
8953
9616
  get children() {
8954
- return [_tmpl$15(), createComponent(Show, {
9617
+ return [_tmpl$16(), createComponent(Show, {
8955
9618
  get when() {
8956
9619
  return vaultEntries().length > 0;
8957
9620
  },
8958
9621
  get children() {
8959
- var _el$80 = _tmpl$16();
8960
- insert(_el$80, createComponent(For, {
9622
+ var _el$91 = _tmpl$5$1();
9623
+ insert(_el$91, createComponent(For, {
8961
9624
  get each() {
8962
9625
  return vaultEntries();
8963
9626
  },
8964
9627
  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, {
9628
+ 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;
9629
+ insert(_el$196, () => entry.label);
9630
+ insert(_el$197, () => entry.username, _el$198);
9631
+ insert(_el$197, () => entry.domainPattern, null);
9632
+ insert(_el$197, createComponent(Show, {
8970
9633
  get when() {
8971
9634
  return entry.useCount > 0;
8972
9635
  },
@@ -8974,43 +9637,43 @@ const Settings = () => {
8974
9637
  return [" ", "· Used ", memo(() => entry.useCount), "x"];
8975
9638
  }
8976
9639
  }), null);
8977
- _el$162.$$click = () => handleVaultRemove(entry.id);
8978
- return _el$157;
9640
+ _el$199.$$click = () => handleVaultRemove(entry.id);
9641
+ return _el$194;
8979
9642
  })()
8980
9643
  }));
8981
- return _el$80;
9644
+ return _el$91;
8982
9645
  }
8983
9646
  }), createComponent(Show, {
8984
9647
  get when() {
8985
9648
  return !vaultAdding();
8986
9649
  },
8987
9650
  get children() {
8988
- var _el$81 = _tmpl$17();
8989
- _el$81.$$click = () => {
9651
+ var _el$92 = _tmpl$17();
9652
+ _el$92.$$click = () => {
8990
9653
  setVaultAdding(true);
8991
9654
  setVaultMessage(null);
8992
9655
  };
8993
- return _el$81;
9656
+ return _el$92;
8994
9657
  }
8995
9658
  }), createComponent(Show, {
8996
9659
  get when() {
8997
9660
  return vaultAdding();
8998
9661
  },
8999
9662
  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 = () => {
9663
+ 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;
9664
+ _el$94.$$input = (e) => setVaultNewLabel(e.currentTarget.value);
9665
+ setAttribute(_el$94, "spellcheck", false);
9666
+ _el$95.$$input = (e) => setVaultNewDomain(e.currentTarget.value);
9667
+ setAttribute(_el$95, "spellcheck", false);
9668
+ _el$96.$$input = (e) => setVaultNewUsername(e.currentTarget.value);
9669
+ setAttribute(_el$96, "spellcheck", false);
9670
+ _el$97.$$input = (e) => setVaultNewPassword(e.currentTarget.value);
9671
+ _el$98.$$input = (e) => setVaultNewTotp(e.currentTarget.value);
9672
+ setAttribute(_el$98, "spellcheck", false);
9673
+ _el$99.$$input = (e) => setVaultNewNotes(e.currentTarget.value);
9674
+ setAttribute(_el$99, "spellcheck", false);
9675
+ _el$101.$$click = handleVaultAdd;
9676
+ _el$102.$$click = () => {
9014
9677
  setVaultAdding(false);
9015
9678
  setVaultNewLabel("");
9016
9679
  setVaultNewDomain("");
@@ -9019,100 +9682,100 @@ const Settings = () => {
9019
9682
  setVaultNewTotp("");
9020
9683
  setVaultNewNotes("");
9021
9684
  };
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;
9685
+ createRenderEffect(() => _el$94.value = vaultNewLabel());
9686
+ createRenderEffect(() => _el$95.value = vaultNewDomain());
9687
+ createRenderEffect(() => _el$96.value = vaultNewUsername());
9688
+ createRenderEffect(() => _el$97.value = vaultNewPassword());
9689
+ createRenderEffect(() => _el$98.value = vaultNewTotp());
9690
+ createRenderEffect(() => _el$99.value = vaultNewNotes());
9691
+ return _el$93;
9029
9692
  }
9030
9693
  }), createComponent(Show, {
9031
9694
  get when() {
9032
9695
  return vaultMessage();
9033
9696
  },
9034
9697
  children: (msg) => (() => {
9035
- var _el$163 = _tmpl$35();
9036
- insert(_el$163, () => msg().text);
9698
+ var _el$200 = _tmpl$39();
9699
+ insert(_el$200, () => msg().text);
9037
9700
  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);
9701
+ var _v$15 = !!(msg().kind === "success"), _v$16 = !!(msg().kind === "error");
9702
+ _v$15 !== _p$.e && _el$200.classList.toggle("success", _p$.e = _v$15);
9703
+ _v$16 !== _p$.t && _el$200.classList.toggle("error", _p$.t = _v$16);
9041
9704
  return _p$;
9042
9705
  }, {
9043
9706
  e: void 0,
9044
9707
  t: void 0
9045
9708
  });
9046
- return _el$163;
9709
+ return _el$200;
9047
9710
  })()
9048
9711
  })];
9049
9712
  }
9050
9713
  }), null);
9051
- insert(_el$93, createComponent(Show, {
9714
+ insert(_el$104, createComponent(Show, {
9052
9715
  get when() {
9053
9716
  return autofillProfiles().length > 0;
9054
9717
  },
9055
9718
  get children() {
9056
- var _el$96 = _tmpl$16();
9057
- insert(_el$96, createComponent(For, {
9719
+ var _el$107 = _tmpl$5$1();
9720
+ insert(_el$107, createComponent(For, {
9058
9721
  get each() {
9059
9722
  return autofillProfiles();
9060
9723
  },
9061
9724
  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, (() => {
9725
+ 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;
9726
+ insert(_el$203, () => profile.label);
9727
+ insert(_el$204, () => profile.firstName, null);
9728
+ insert(_el$204, (() => {
9066
9729
  var _c$2 = memo(() => !!profile.lastName);
9067
9730
  return () => _c$2() ? ` ${profile.lastName}` : "";
9068
9731
  })(), null);
9069
- insert(_el$167, (() => {
9732
+ insert(_el$204, (() => {
9070
9733
  var _c$3 = memo(() => !!profile.email);
9071
9734
  return () => _c$3() ? ` · ${profile.email}` : "";
9072
9735
  })(), null);
9073
- _el$169.$$click = () => handleAutofillFill(profile.id);
9074
- _el$170.$$click = () => handleAutofillRemove(profile.id);
9075
- return _el$164;
9736
+ _el$206.$$click = () => handleAutofillFill(profile.id);
9737
+ _el$207.$$click = () => handleAutofillRemove(profile.id);
9738
+ return _el$201;
9076
9739
  })()
9077
9740
  }));
9078
- return _el$96;
9741
+ return _el$107;
9079
9742
  }
9080
9743
  }), null);
9081
- insert(_el$93, createComponent(Show, {
9744
+ insert(_el$104, createComponent(Show, {
9082
9745
  get when() {
9083
9746
  return !autofillAdding();
9084
9747
  },
9085
9748
  get children() {
9086
- var _el$97 = _tmpl$19();
9087
- _el$97.$$click = () => {
9749
+ var _el$108 = _tmpl$19();
9750
+ _el$108.$$click = () => {
9088
9751
  setAutofillAdding(true);
9089
9752
  setAutofillMessage(null);
9090
9753
  };
9091
- return _el$97;
9754
+ return _el$108;
9092
9755
  }
9093
9756
  }), null);
9094
- insert(_el$93, createComponent(Show, {
9757
+ insert(_el$104, createComponent(Show, {
9095
9758
  get when() {
9096
9759
  return autofillAdding();
9097
9760
  },
9098
9761
  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 = () => {
9762
+ 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;
9763
+ _el$110.$$input = (e) => setAutofillLabel(e.currentTarget.value);
9764
+ setAttribute(_el$110, "spellcheck", false);
9765
+ _el$112.$$input = (e) => setAutofillFirstName(e.currentTarget.value);
9766
+ _el$113.$$input = (e) => setAutofillLastName(e.currentTarget.value);
9767
+ _el$115.$$input = (e) => setAutofillEmail(e.currentTarget.value);
9768
+ setAttribute(_el$115, "spellcheck", false);
9769
+ _el$116.$$input = (e) => setAutofillPhone(e.currentTarget.value);
9770
+ _el$117.$$input = (e) => setAutofillOrg(e.currentTarget.value);
9771
+ _el$118.$$input = (e) => setAutofillAddr1(e.currentTarget.value);
9772
+ _el$119.$$input = (e) => setAutofillAddr2(e.currentTarget.value);
9773
+ _el$121.$$input = (e) => setAutofillCity(e.currentTarget.value);
9774
+ _el$122.$$input = (e) => setAutofillState(e.currentTarget.value);
9775
+ _el$123.$$input = (e) => setAutofillZip(e.currentTarget.value);
9776
+ _el$124.$$input = (e) => setAutofillCountry(e.currentTarget.value);
9777
+ _el$126.$$click = handleAutofillAdd;
9778
+ _el$127.$$click = () => {
9116
9779
  setAutofillAdding(false);
9117
9780
  setAutofillLabel("");
9118
9781
  setAutofillFirstName("");
@@ -9127,73 +9790,103 @@ const Settings = () => {
9127
9790
  setAutofillZip("");
9128
9791
  setAutofillCountry("");
9129
9792
  };
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;
9793
+ createRenderEffect(() => _el$110.value = autofillLabel());
9794
+ createRenderEffect(() => _el$112.value = autofillFirstName());
9795
+ createRenderEffect(() => _el$113.value = autofillLastName());
9796
+ createRenderEffect(() => _el$115.value = autofillEmail());
9797
+ createRenderEffect(() => _el$116.value = autofillPhone());
9798
+ createRenderEffect(() => _el$117.value = autofillOrg());
9799
+ createRenderEffect(() => _el$118.value = autofillAddr1());
9800
+ createRenderEffect(() => _el$119.value = autofillAddr2());
9801
+ createRenderEffect(() => _el$121.value = autofillCity());
9802
+ createRenderEffect(() => _el$122.value = autofillState());
9803
+ createRenderEffect(() => _el$123.value = autofillZip());
9804
+ createRenderEffect(() => _el$124.value = autofillCountry());
9805
+ return _el$109;
9143
9806
  }
9144
9807
  }), null);
9145
- insert(_el$93, createComponent(Show, {
9808
+ insert(_el$104, createComponent(Show, {
9146
9809
  get when() {
9147
9810
  return autofillMessage();
9148
9811
  },
9149
9812
  children: (msg) => (() => {
9150
- var _el$171 = _tmpl$35();
9151
- insert(_el$171, () => msg().text);
9813
+ var _el$208 = _tmpl$39();
9814
+ insert(_el$208, () => msg().text);
9152
9815
  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);
9816
+ var _v$17 = !!(msg().kind === "success"), _v$18 = !!(msg().kind === "error");
9817
+ _v$17 !== _p$.e && _el$208.classList.toggle("success", _p$.e = _v$17);
9818
+ _v$18 !== _p$.t && _el$208.classList.toggle("error", _p$.t = _v$18);
9156
9819
  return _p$;
9157
9820
  }, {
9158
9821
  e: void 0,
9159
9822
  t: void 0
9160
9823
  });
9161
- return _el$171;
9824
+ return _el$208;
9162
9825
  })()
9163
9826
  }), null);
9164
- _el$120.$$click = () => setTelemetryEnabled(!telemetryEnabled());
9165
- _el$122.$$click = handleSave;
9166
- addEventListener(_el$123, "click", closeSettings, true);
9827
+ _el$131.$$click = () => setTelemetryEnabled(!telemetryEnabled());
9828
+ _el$135.addEventListener("change", (e) => setTheme(e.currentTarget.value));
9829
+ _el$138.addEventListener("change", (e) => setDomainMode(e.currentTarget.value));
9830
+ insert(_el$136, createComponent(Show, {
9831
+ get when() {
9832
+ return domainMode() !== "none";
9833
+ },
9834
+ get children() {
9835
+ return [(() => {
9836
+ var _el$139 = _tmpl$21();
9837
+ _el$139.$$input = (e) => setDomainList(e.currentTarget.value);
9838
+ setAttribute(_el$139, "spellcheck", false);
9839
+ createRenderEffect(() => setAttribute(_el$139, "placeholder", domainMode() === "allowlist" ? "example.com\napi.example.com" : "ads.example.com\ntracker.io"));
9840
+ createRenderEffect(() => _el$139.value = domainList());
9841
+ return _el$139;
9842
+ })(), (() => {
9843
+ var _el$140 = _tmpl$22();
9844
+ 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.");
9845
+ return _el$140;
9846
+ })()];
9847
+ }
9848
+ }), null);
9849
+ insert(_el$136, createComponent(Show, {
9850
+ get when() {
9851
+ return domainMode() === "none";
9852
+ },
9853
+ get children() {
9854
+ return _tmpl$23();
9855
+ }
9856
+ }), null);
9857
+ _el$143.$$click = handleSave;
9858
+ addEventListener(_el$144, "click", closeSettings, true);
9167
9859
  insert(_el$2, createComponent(Show, {
9168
9860
  get when() {
9169
9861
  return status();
9170
9862
  },
9171
9863
  children: (currentStatus) => (() => {
9172
- var _el$172 = _tmpl$35();
9173
- insert(_el$172, () => currentStatus().text);
9864
+ var _el$209 = _tmpl$39();
9865
+ insert(_el$209, () => currentStatus().text);
9174
9866
  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);
9867
+ var _v$19 = !!(currentStatus().kind === "success"), _v$20 = !!(currentStatus().kind === "error");
9868
+ _v$19 !== _p$.e && _el$209.classList.toggle("success", _p$.e = _v$19);
9869
+ _v$20 !== _p$.t && _el$209.classList.toggle("error", _p$.t = _v$20);
9178
9870
  return _p$;
9179
9871
  }, {
9180
9872
  e: void 0,
9181
9873
  t: void 0
9182
9874
  });
9183
- return _el$172;
9875
+ return _el$209;
9184
9876
  })()
9185
9877
  }), null);
9186
9878
  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();
9879
+ 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
9880
  _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);
9881
+ _v$2 !== _p$.t && _el$39.classList.toggle("on", _p$.t = _v$2);
9882
+ _v$3 !== _p$.a && setAttribute(_el$39, "aria-checked", _p$.a = _v$3);
9883
+ _v$4 !== _p$.o && _el$42.classList.toggle("on", _p$.o = _v$4);
9884
+ _v$5 !== _p$.i && setAttribute(_el$42, "aria-checked", _p$.i = _v$5);
9885
+ _v$6 !== _p$.n && (_el$49.disabled = _p$.n = _v$6);
9886
+ _v$7 !== _p$.s && _el$54.classList.toggle("on", _p$.s = _v$7);
9887
+ _v$8 !== _p$.h && setAttribute(_el$54, "aria-checked", _p$.h = _v$8);
9888
+ _v$9 !== _p$.r && _el$131.classList.toggle("on", _p$.r = _v$9);
9889
+ _v$0 !== _p$.d && setAttribute(_el$131, "aria-checked", _p$.d = _v$0);
9197
9890
  return _p$;
9198
9891
  }, {
9199
9892
  e: void 0,
@@ -9204,14 +9897,19 @@ const Settings = () => {
9204
9897
  n: void 0,
9205
9898
  s: void 0,
9206
9899
  h: void 0,
9207
- r: void 0
9900
+ r: void 0,
9901
+ d: void 0
9208
9902
  });
9209
9903
  createRenderEffect(() => _el$20.value = defaultUrl());
9210
- createRenderEffect(() => _el$23.value = mcpPort());
9211
- createRenderEffect(() => _el$30.value = obsidianVaultPath());
9212
- createRenderEffect(() => _el$33.value = agentTranscriptMode());
9904
+ createRenderEffect(() => _el$23.value = downloadPath());
9905
+ createRenderEffect(() => _el$26.value = mcpPort());
9906
+ createRenderEffect(() => _el$33.value = obsidianVaultPath());
9907
+ createRenderEffect(() => _el$36.value = agentTranscriptMode());
9908
+ createRenderEffect(() => _el$48.value = sessionSaveName());
9909
+ createRenderEffect(() => _el$135.value = theme());
9910
+ createRenderEffect(() => _el$138.value = domainMode());
9213
9911
  return _el$;
9214
- })(), _tmpl$22()];
9912
+ })(), _tmpl$25()];
9215
9913
  }
9216
9914
  });
9217
9915
  };
@@ -9418,6 +10116,13 @@ function setupKeybindings(handlers) {
9418
10116
  return () => document.removeEventListener("keydown", listener);
9419
10117
  }
9420
10118
  var _tmpl$ = /* @__PURE__ */ template(`<div class=loading-bar>`), _tmpl$2 = /* @__PURE__ */ template(`<div class=app><div class=chrome>`);
10119
+ try {
10120
+ const cached = localStorage.getItem("vessel:theme");
10121
+ if (cached) document.documentElement.setAttribute("data-theme", cached);
10122
+ else document.documentElement.setAttribute("data-theme", "dark");
10123
+ } catch {
10124
+ document.documentElement.setAttribute("data-theme", "dark");
10125
+ }
9421
10126
  const App = () => {
9422
10127
  const view = new URLSearchParams(window.location.search).get("view") || "chrome";
9423
10128
  const {
@@ -9461,7 +10166,17 @@ const App = () => {
9461
10166
  });
9462
10167
  }
9463
10168
  };
10169
+ const applyTheme = async () => {
10170
+ const s = await window.vessel.settings.get();
10171
+ const theme = s.theme ?? "dark";
10172
+ document.documentElement.setAttribute("data-theme", theme);
10173
+ try {
10174
+ localStorage.setItem("vessel:theme", theme);
10175
+ } catch {
10176
+ }
10177
+ };
9464
10178
  onMount(() => {
10179
+ void applyTheme();
9465
10180
  window.vessel.ui.rendererReady(view);
9466
10181
  if (view !== "chrome") return;
9467
10182
  const cleanupKeys = setupKeybindings({
@@ -9481,9 +10196,13 @@ const App = () => {
9481
10196
  toggleKeyboardHelp: () => setKeyboardHelpOpen((v) => !v)
9482
10197
  });
9483
10198
  const cleanupCapture = window.vessel.highlights.onCaptureResult(showHighlightResult);
10199
+ const cleanupSettings = window.vessel.settings.onUpdate(() => {
10200
+ void applyTheme();
10201
+ });
9484
10202
  onCleanup(() => {
9485
10203
  cleanupKeys();
9486
10204
  cleanupCapture();
10205
+ cleanupSettings();
9487
10206
  });
9488
10207
  });
9489
10208
  if (view === "sidebar") {
@@ -9503,6 +10222,9 @@ const App = () => {
9503
10222
  },
9504
10223
  onDismiss: () => setHighlightToast(null)
9505
10224
  }), _el$2);
10225
+ insert(_el$, createComponent(DownloadToast, {}), _el$2);
10226
+ insert(_el$, createComponent(FindBar, {}), _el$2);
10227
+ insert(_el$, createComponent(FlowProgress, {}), _el$2);
9506
10228
  insert(_el$, createComponent(AgentTranscriptDock, {}), _el$2);
9507
10229
  insert(_el$2, createComponent(TitleBar, {}), null);
9508
10230
  insert(_el$2, createComponent(TabBar, {}), null);