@quanta-intellect/vessel-browser 0.1.56 → 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,19 +1488,44 @@ const TitleBar = () => {
1488
1488
  delegateEvents(["click"]);
1489
1489
  const [tabs, setTabs] = createSignal([]);
1490
1490
  const [activeTabId, setActiveTabId] = createSignal("");
1491
- let initialized$3 = false;
1492
- function init$3() {
1493
- if (initialized$3) return;
1494
- initialized$3 = true;
1495
- window.vessel.tabs.onStateUpdate(
1496
- (newTabs, newActiveId) => {
1497
- setTabs(newTabs);
1498
- setActiveTabId(newActiveId);
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 () => {
1499
+ try {
1500
+ if (unsubscribeStateUpdate) {
1501
+ unsubscribeStateUpdate();
1502
+ unsubscribeStateUpdate = null;
1503
+ }
1504
+ unsubscribeStateUpdate = window.vessel.tabs.onStateUpdate(
1505
+ (newTabs, newActiveId) => {
1506
+ setTabs(newTabs);
1507
+ setActiveTabId(newActiveId);
1508
+ }
1509
+ );
1510
+ const initialState = await window.vessel.tabs.getState();
1511
+ setTabs(initialState.tabs);
1512
+ setActiveTabId(initialState.activeId);
1513
+ } catch (error) {
1514
+ initialized$4 = false;
1515
+ console.error("Failed to initialize tabs store", error);
1516
+ } finally {
1517
+ initPromise$3 = null;
1499
1518
  }
1500
- );
1519
+ })();
1520
+ return initPromise$3;
1501
1521
  }
1522
+ const patchTab = (id, patch) => {
1523
+ setTabs(
1524
+ (prev) => prev.map((t) => t.id === id ? { ...t, ...patch } : t)
1525
+ );
1526
+ };
1502
1527
  function useTabs() {
1503
- init$3();
1528
+ init$4();
1504
1529
  return {
1505
1530
  tabs,
1506
1531
  activeTabId,
@@ -1523,6 +1548,13 @@ function useTabs() {
1523
1548
  reload: () => {
1524
1549
  const id = activeTabId();
1525
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;
1526
1558
  }
1527
1559
  };
1528
1560
  }
@@ -1553,13 +1585,13 @@ const DEFAULT_RUNTIME_STATE = {
1553
1585
  const [runtimeState, setRuntimeState] = createSignal(
1554
1586
  DEFAULT_RUNTIME_STATE
1555
1587
  );
1556
- let initialized$2 = false;
1557
- let initPromise$1 = null;
1558
- async function init$2() {
1559
- if (initPromise$1) return initPromise$1;
1560
- if (initialized$2) return;
1561
- initialized$2 = true;
1562
- 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 () => {
1563
1595
  try {
1564
1596
  const initial = await window.vessel.ai.getRuntime();
1565
1597
  setRuntimeState(initial);
@@ -1567,16 +1599,16 @@ async function init$2() {
1567
1599
  setRuntimeState(state);
1568
1600
  });
1569
1601
  } catch (error) {
1570
- initialized$2 = false;
1602
+ initialized$3 = false;
1571
1603
  console.error("Failed to initialize runtime store", error);
1572
1604
  } finally {
1573
- initPromise$1 = null;
1605
+ initPromise$2 = null;
1574
1606
  }
1575
1607
  })();
1576
- return initPromise$1;
1608
+ return initPromise$2;
1577
1609
  }
1578
1610
  function useRuntime() {
1579
- void init$2();
1611
+ void init$3();
1580
1612
  return {
1581
1613
  runtimeState,
1582
1614
  pause: () => window.vessel.ai.pause(),
@@ -1697,7 +1729,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
1697
1729
  }
1698
1730
  return "idle";
1699
1731
  }
1700
- 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>`);
1701
1733
  const TAB_CLOSE_MS = 200;
1702
1734
  function stringToHue(str) {
1703
1735
  let hash = 0;
@@ -1724,14 +1756,14 @@ const TabFavicon = (props) => {
1724
1756
  },
1725
1757
  get fallback() {
1726
1758
  return (() => {
1727
- var _el$2 = _tmpl$2$b();
1759
+ var _el$2 = _tmpl$2$e();
1728
1760
  insert(_el$2, letter);
1729
1761
  createRenderEffect((_$p) => setStyleProperty(_el$2, "--favicon-hue", `${hue()}`));
1730
1762
  return _el$2;
1731
1763
  })();
1732
1764
  },
1733
1765
  get children() {
1734
- var _el$ = _tmpl$$d();
1766
+ var _el$ = _tmpl$$g();
1735
1767
  _el$.addEventListener("error", () => setFailed(true));
1736
1768
  createRenderEffect(() => setAttribute(_el$, "src", props.favicon));
1737
1769
  return _el$;
@@ -1764,13 +1796,13 @@ const TabBar = () => {
1764
1796
  }, TAB_CLOSE_MS);
1765
1797
  };
1766
1798
  return (() => {
1767
- 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;
1768
1800
  insert(_el$4, createComponent(For, {
1769
1801
  get each() {
1770
1802
  return tabs2();
1771
1803
  },
1772
1804
  children: (tab) => (() => {
1773
- 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;
1774
1806
  _el$6.addEventListener("auxclick", (e) => {
1775
1807
  if (e.button === 1) handleClose(tab.id);
1776
1808
  });
@@ -1788,12 +1820,12 @@ const TabBar = () => {
1788
1820
  }), _el$7);
1789
1821
  insert(_el$6, (() => {
1790
1822
  var _c$ = memo(() => !!modelActiveTabIds().has(tab.id));
1791
- return () => _c$() && _tmpl$5$7();
1823
+ return () => _c$() && _tmpl$5$a();
1792
1824
  })(), _el$7);
1793
1825
  insert(_el$7, () => tab.title || "New Tab");
1794
1826
  insert(_el$6, (() => {
1795
1827
  var _c$2 = memo(() => !!tab.isLoading);
1796
- return () => _c$2() && _tmpl$6$7();
1828
+ return () => _c$2() && _tmpl$6$9();
1797
1829
  })(), _el$8);
1798
1830
  _el$8.$$click = (e) => {
1799
1831
  e.stopPropagation();
@@ -2019,14 +2051,16 @@ function buildPageSnapshotKey(rawUrl) {
2019
2051
  function matchesPageSnapshotUrl(left, right) {
2020
2052
  return buildPageSnapshotKey(left) === buildPageSnapshotKey(right);
2021
2053
  }
2022
- 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>`);
2023
2055
  const AddressBar = () => {
2024
2056
  const {
2025
2057
  activeTab,
2058
+ activeTabId: activeTabId2,
2026
2059
  navigate,
2027
2060
  goBack,
2028
2061
  goForward,
2029
- reload
2062
+ reload,
2063
+ toggleAdBlock
2030
2064
  } = useTabs();
2031
2065
  const {
2032
2066
  runtimeState: runtimeState2
@@ -2131,9 +2165,9 @@ const AddressBar = () => {
2131
2165
  };
2132
2166
  const formatSectionLabel = (section) => section === "title" ? "Title" : section === "headings" ? "Headings" : "Content";
2133
2167
  return (() => {
2134
- 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;
2135
- _el$27.firstChild;
2136
- 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;
2137
2171
  addEventListener(_el$3, "click", goBack, true);
2138
2172
  addEventListener(_el$4, "click", goForward, true);
2139
2173
  addEventListener(_el$5, "click", reload, true);
@@ -2149,7 +2183,7 @@ const AddressBar = () => {
2149
2183
  return pageDiff();
2150
2184
  },
2151
2185
  get children() {
2152
- var _el$10 = _tmpl$$c();
2186
+ var _el$10 = _tmpl$$f();
2153
2187
  _el$10.$$click = () => setDiffExpanded(!diffExpanded());
2154
2188
  return _el$10;
2155
2189
  }
@@ -2159,7 +2193,7 @@ const AddressBar = () => {
2159
2193
  return memo(() => !!pageDiff())() && diffExpanded();
2160
2194
  },
2161
2195
  get children() {
2162
- 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;
2163
2197
  _el$14.firstChild;
2164
2198
  var _el$21 = _el$13.nextSibling;
2165
2199
  insert(_el$14, () => formatRelativeTime(pageDiff().oldSnapshot.capturedAt), null);
@@ -2168,7 +2202,7 @@ const AddressBar = () => {
2168
2202
  return memo(() => !!((pageDiff().burstCount || 0) > 1 && pageDiff().firstDetectedAt))() && pageDiff().lastDetectedAt;
2169
2203
  },
2170
2204
  get children() {
2171
- 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;
2172
2206
  _el$20.nextSibling;
2173
2207
  insert(_el$16, () => pageDiff().burstCount, _el$20);
2174
2208
  insert(_el$16, () => formatElapsed(pageDiff().firstDetectedAt, pageDiff().lastDetectedAt), null);
@@ -2181,17 +2215,17 @@ const AddressBar = () => {
2181
2215
  return memo(() => !!pageDiff().recentBursts?.length)() && (pageDiff().recentBursts?.length || 0) > 1;
2182
2216
  },
2183
2217
  get children() {
2184
- var _el$22 = _tmpl$3$8();
2218
+ var _el$22 = _tmpl$3$a();
2185
2219
  _el$22.firstChild;
2186
2220
  insert(_el$22, createComponent(For, {
2187
2221
  get each() {
2188
2222
  return pageDiff().recentBursts;
2189
2223
  },
2190
2224
  children: (burst) => (() => {
2191
- var _el$31 = _tmpl$7$4(), _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling;
2192
- insert(_el$32, () => formatRelativeTime(burst.detectedAt));
2193
- insert(_el$33, () => burst.summary);
2194
- 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;
2195
2229
  })()
2196
2230
  }), null);
2197
2231
  return _el$22;
@@ -2202,108 +2236,132 @@ const AddressBar = () => {
2202
2236
  return pageDiff().changes;
2203
2237
  },
2204
2238
  children: (change) => (() => {
2205
- var _el$34 = _tmpl$11$4(), _el$35 = _el$34.firstChild, _el$36 = _el$35.firstChild, _el$37 = _el$36.nextSibling;
2206
- insert(_el$36, () => formatSectionLabel(change.section));
2207
- insert(_el$37, () => change.summary);
2208
- 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, {
2209
2243
  get when() {
2210
2244
  return change.before || change.after;
2211
2245
  },
2212
2246
  get children() {
2213
- var _el$38 = _tmpl$0$4();
2214
- insert(_el$38, createComponent(Show, {
2247
+ var _el$43 = _tmpl$10$4();
2248
+ insert(_el$43, createComponent(Show, {
2215
2249
  get when() {
2216
2250
  return change.before;
2217
2251
  },
2218
2252
  get children() {
2219
- var _el$39 = _tmpl$8$4(), _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
2220
- insert(_el$41, () => change.before);
2221
- 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;
2222
2256
  }
2223
2257
  }), null);
2224
- insert(_el$38, createComponent(Show, {
2258
+ insert(_el$43, createComponent(Show, {
2225
2259
  get when() {
2226
2260
  return change.after;
2227
2261
  },
2228
2262
  get children() {
2229
- var _el$42 = _tmpl$9$4(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling;
2230
- insert(_el$44, () => change.after);
2231
- 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;
2232
2266
  }
2233
2267
  }), null);
2234
- return _el$38;
2268
+ return _el$43;
2235
2269
  }
2236
2270
  }), null);
2237
- insert(_el$34, createComponent(Show, {
2271
+ insert(_el$39, createComponent(Show, {
2238
2272
  get when() {
2239
2273
  return change.addedItems?.length;
2240
2274
  },
2241
2275
  get children() {
2242
- var _el$45 = _tmpl$1$4(), _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling;
2243
- 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, {
2244
2278
  get each() {
2245
2279
  return change.addedItems;
2246
2280
  },
2247
2281
  children: (item) => (() => {
2248
- var _el$51 = _tmpl$12$4();
2249
- insert(_el$51, item);
2250
- return _el$51;
2282
+ var _el$56 = _tmpl$14$3();
2283
+ insert(_el$56, item);
2284
+ return _el$56;
2251
2285
  })()
2252
2286
  }));
2253
- return _el$45;
2287
+ return _el$50;
2254
2288
  }
2255
2289
  }), null);
2256
- insert(_el$34, createComponent(Show, {
2290
+ insert(_el$39, createComponent(Show, {
2257
2291
  get when() {
2258
2292
  return change.removedItems?.length;
2259
2293
  },
2260
2294
  get children() {
2261
- var _el$48 = _tmpl$10$4(), _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
2262
- 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, {
2263
2297
  get each() {
2264
2298
  return change.removedItems;
2265
2299
  },
2266
2300
  children: (item) => (() => {
2267
- var _el$52 = _tmpl$12$4();
2268
- insert(_el$52, item);
2269
- return _el$52;
2301
+ var _el$57 = _tmpl$14$3();
2302
+ insert(_el$57, item);
2303
+ return _el$57;
2270
2304
  })()
2271
2305
  }));
2272
- return _el$48;
2306
+ return _el$53;
2273
2307
  }
2274
2308
  }), null);
2275
- createRenderEffect(() => className(_el$34, `page-diff-item page-diff-${change.kind}`));
2276
- return _el$34;
2309
+ createRenderEffect(() => className(_el$39, `page-diff-item page-diff-${change.kind}`));
2310
+ return _el$39;
2277
2311
  })()
2278
2312
  }), null);
2279
2313
  return _el$11;
2280
2314
  }
2281
2315
  }), _el$24);
2282
- _el$25.$$click = () => window.vessel.content.toggleReader();
2283
- addEventListener(_el$26, "click", toggleDevTools, true);
2284
- addEventListener(_el$27, "click", toggleSidebar, true);
2285
- 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, {
2286
2341
  get when() {
2287
2342
  return pendingApprovalCount() > 0;
2288
2343
  },
2289
2344
  get children() {
2290
- var _el$29 = _tmpl$5$6();
2291
- insert(_el$29, pendingApprovalCount);
2292
- createRenderEffect(() => setAttribute(_el$29, "aria-label", `${pendingApprovalCount()} pending`));
2293
- 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;
2294
2349
  }
2295
2350
  }), null);
2296
- addEventListener(_el$30, "click", openSettings, true);
2351
+ addEventListener(_el$35, "click", openSettings, true);
2297
2352
  createRenderEffect((_p$) => {
2298
- 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)";
2299
2354
  _v$ !== _p$.e && (_el$3.disabled = _p$.e = _v$);
2300
2355
  _v$2 !== _p$.t && (_el$4.disabled = _p$.t = _v$2);
2301
2356
  _v$3 !== _p$.a && className(_el$9, _p$.a = _v$3);
2302
2357
  _v$4 !== _p$.o && setAttribute(_el$9, "title", _p$.o = _v$4);
2303
2358
  _v$5 !== _p$.i && _el$25.classList.toggle("active", _p$.i = _v$5);
2304
- _v$6 !== _p$.n && _el$26.classList.toggle("active", _p$.n = _v$6);
2305
- _v$7 !== _p$.s && _el$27.classList.toggle("has-approvals", _p$.s = _v$7);
2306
- _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);
2307
2365
  return _p$;
2308
2366
  }, {
2309
2367
  e: void 0,
@@ -2313,16 +2371,19 @@ const AddressBar = () => {
2313
2371
  i: void 0,
2314
2372
  n: void 0,
2315
2373
  s: void 0,
2316
- h: void 0
2374
+ h: void 0,
2375
+ r: void 0,
2376
+ d: void 0,
2377
+ l: void 0
2317
2378
  });
2318
2379
  createRenderEffect(() => _el$8.value = inputValue());
2319
2380
  return _el$;
2320
2381
  })();
2321
2382
  };
2322
2383
  delegateEvents(["click", "input"]);
2323
- 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>`);
2324
2385
  const TOAST_DURATION_MS$1 = 4200;
2325
- const TOAST_EXIT_MS$1 = 300;
2386
+ const TOAST_EXIT_MS$2 = 300;
2326
2387
  function isBookmarkToastCandidate(action) {
2327
2388
  return (action.source === "ai" || action.source === "mcp") && action.status === "completed" && (action.name === "create_bookmark_folder" || action.name === "save_bookmark");
2328
2389
  }
@@ -2346,7 +2407,7 @@ const BookmarkNotifications = () => {
2346
2407
  } : t));
2347
2408
  window.setTimeout(() => {
2348
2409
  setToasts((current) => current.filter((t) => t.id !== toastId));
2349
- }, TOAST_EXIT_MS$1);
2410
+ }, TOAST_EXIT_MS$2);
2350
2411
  };
2351
2412
  createEffect(() => {
2352
2413
  const actions = runtimeState2().actions;
@@ -2380,13 +2441,13 @@ const BookmarkNotifications = () => {
2380
2441
  timeoutIds.clear();
2381
2442
  });
2382
2443
  return (() => {
2383
- var _el$ = _tmpl$$b();
2444
+ var _el$ = _tmpl$$e();
2384
2445
  insert(_el$, createComponent(For, {
2385
2446
  get each() {
2386
2447
  return toasts();
2387
2448
  },
2388
2449
  children: (toast) => (() => {
2389
- 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;
2390
2451
  insert(_el$3, () => toast.title);
2391
2452
  insert(_el$4, () => toast.message);
2392
2453
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!toast.leaving));
@@ -2396,9 +2457,9 @@ const BookmarkNotifications = () => {
2396
2457
  return _el$;
2397
2458
  })();
2398
2459
  };
2399
- 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>`);
2400
2461
  const TOAST_DURATION_MS = 3e3;
2401
- const TOAST_EXIT_MS = 300;
2462
+ const TOAST_EXIT_MS$1 = 300;
2402
2463
  const HighlightNotifications = (props) => {
2403
2464
  const [visible, setVisible] = createSignal(false);
2404
2465
  const [leaving, setLeaving] = createSignal(false);
@@ -2413,7 +2474,7 @@ const HighlightNotifications = (props) => {
2413
2474
  setLeaving(false);
2414
2475
  setCurrent(null);
2415
2476
  props.onDismiss();
2416
- }, TOAST_EXIT_MS);
2477
+ }, TOAST_EXIT_MS$1);
2417
2478
  };
2418
2479
  createEffect(() => {
2419
2480
  const toast = props.toast;
@@ -2435,7 +2496,7 @@ const HighlightNotifications = (props) => {
2435
2496
  return memo(() => !!visible())() && current();
2436
2497
  },
2437
2498
  get children() {
2438
- 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;
2439
2500
  insert(_el$3, () => current().title);
2440
2501
  insert(_el$4, () => current().message);
2441
2502
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!leaving()));
@@ -2443,6 +2504,371 @@ const HighlightNotifications = (props) => {
2443
2504
  }
2444
2505
  });
2445
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
+ };
2446
2872
  function useScrollFade(el) {
2447
2873
  const update = () => {
2448
2874
  const { scrollTop, scrollHeight, clientHeight } = el;
@@ -2470,7 +2896,7 @@ function formatTime(iso, options) {
2470
2896
  ...options?.includeSeconds && { second: "2-digit" }
2471
2897
  });
2472
2898
  }
2473
- 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>`);
2474
2900
  const AgentTranscriptDock = () => {
2475
2901
  const {
2476
2902
  runtimeState: runtimeState2
@@ -2492,66 +2918,107 @@ const AgentTranscriptDock = () => {
2492
2918
  setMode("off");
2493
2919
  await window.vessel.settings.set("agentTranscriptMode", "off");
2494
2920
  };
2921
+ const isSummary = createMemo(() => mode() === "summary");
2922
+ const latestEntry = createMemo(() => {
2923
+ const entries2 = visibleEntries();
2924
+ return entries2.length > 0 ? entries2[0] : null;
2925
+ });
2495
2926
  return createComponent(Show, {
2496
2927
  get when() {
2497
- return memo(() => mode() === "full")() && visibleEntries().length > 0;
2928
+ return memo(() => mode() !== "off")() && visibleEntries().length > 0;
2498
2929
  },
2499
2930
  get children() {
2500
- var _el$ = _tmpl$3$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
2501
- _el$3.firstChild;
2502
- var _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
2503
- insert(_el$3, createComponent(Show, {
2931
+ return [createComponent(Show, {
2504
2932
  get when() {
2505
- return hasStreamingEntry();
2933
+ return isSummary();
2506
2934
  },
2507
2935
  get children() {
2508
- 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$;
2509
2959
  }
2510
- }), null);
2511
- _el$7.$$click = () => setCollapsed((value) => !value);
2512
- insert(_el$7, () => collapsed() ? "▴" : "▾");
2513
- _el$8.$$click = () => void hideDock();
2514
- insert(_el$, createComponent(Show, {
2960
+ }), createComponent(Show, {
2515
2961
  get when() {
2516
- return !collapsed();
2962
+ return !isSummary();
2517
2963
  },
2518
2964
  get children() {
2519
- var _el$9 = _tmpl$2$8();
2520
- use((el) => useScrollFade(el), _el$9);
2521
- insert(_el$9, createComponent(For, {
2522
- get each() {
2523
- 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();
2524
2971
  },
2525
- children: (entry) => (() => {
2526
- 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;
2527
- insert(_el$10, () => entry.title || entry.kind);
2528
- insert(_el$11, () => formatTime(entry.updatedAt));
2529
- insert(_el$12, () => entry.text);
2530
- createRenderEffect((_p$) => {
2531
- var _v$3 = `agent-transcript-entry ${entry.kind}`, _v$4 = !!(entry.status === "streaming");
2532
- _v$3 !== _p$.e && className(_el$0, _p$.e = _v$3);
2533
- _v$4 !== _p$.t && _el$0.classList.toggle("streaming", _p$.t = _v$4);
2534
- return _p$;
2535
- }, {
2536
- e: void 0,
2537
- t: void 0
2538
- });
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
+ }));
2539
3007
  return _el$0;
2540
- })()
2541
- }));
2542
- 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;
2543
3020
  }
2544
- }), null);
2545
- createRenderEffect((_p$) => {
2546
- var _v$ = !!collapsed(), _v$2 = collapsed() ? "Expand" : "Collapse";
2547
- _v$ !== _p$.e && _el$.classList.toggle("collapsed", _p$.e = _v$);
2548
- _v$2 !== _p$.t && setAttribute(_el$7, "data-tooltip", _p$.t = _v$2);
2549
- return _p$;
2550
- }, {
2551
- e: void 0,
2552
- t: void 0
2553
- });
2554
- return _el$;
3021
+ })];
2555
3022
  }
2556
3023
  });
2557
3024
  };
@@ -2651,7 +3118,7 @@ const [pendingQueries, setPendingQueries] = createSignal([]);
2651
3118
  const [pendingQueryActivities, setPendingQueryActivities] = createSignal([]);
2652
3119
  const [queueNotice, setQueueNotice] = createSignal(null);
2653
3120
  const [automationActivities, setAutomationActivities] = createSignal([]);
2654
- let initialized$1 = false;
3121
+ let initialized$2 = false;
2655
3122
  let pendingDrainScheduled = false;
2656
3123
  let listenerCleanups = [];
2657
3124
  let pendingAutomationActivity = null;
@@ -2709,9 +3176,9 @@ function schedulePendingDrain() {
2709
3176
  }
2710
3177
  });
2711
3178
  }
2712
- function init$1() {
2713
- if (initialized$1) return;
2714
- initialized$1 = true;
3179
+ function init$2() {
3180
+ if (initialized$2) return;
3181
+ initialized$2 = true;
2715
3182
  listenerCleanups.push(window.vessel.ai.onStreamStart((prompt) => {
2716
3183
  setMessages((prev) => {
2717
3184
  const next = [...prev, { role: "user", content: prompt }];
@@ -2794,7 +3261,7 @@ function init$1() {
2794
3261
  }));
2795
3262
  }
2796
3263
  function useAI() {
2797
- init$1();
3264
+ init$2();
2798
3265
  const query = async (prompt, activity = null) => {
2799
3266
  recordRecentQuery(prompt);
2800
3267
  if (isStreaming()) {
@@ -3010,6 +3477,36 @@ const CommandBar = () => {
3010
3477
  });
3011
3478
  };
3012
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
+ }
3013
3510
  const INITIAL = { folders: [], bookmarks: [] };
3014
3511
  const [bookmarksState, setBookmarksState] = createSignal(INITIAL);
3015
3512
  let initialized = false;
@@ -4972,7 +5469,7 @@ function renderKitPrompt(kit, values) {
4972
5469
  (_, key) => values[key] ?? ""
4973
5470
  );
4974
5471
  }
4975
- 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>`);
4976
5473
  const ICON_MAP = {
4977
5474
  BookOpen: book_open_default,
4978
5475
  Tag: tag_default,
@@ -5630,7 +6127,7 @@ const AutomationTab = (props) => {
5630
6127
  return !isStreaming2();
5631
6128
  },
5632
6129
  get fallback() {
5633
- return [_tmpl$39$1(), "Agent busy…"];
6130
+ return [_tmpl$39$2(), "Agent busy…"];
5634
6131
  },
5635
6132
  children: "Run Kit"
5636
6133
  }));
@@ -5651,7 +6148,7 @@ const AutomationTab = (props) => {
5651
6148
  insert(_el$38, createComponent(For, {
5652
6149
  each: ["once", "hourly", "daily", "weekly"],
5653
6150
  children: (type) => (() => {
5654
- var _el$117 = _tmpl$40$1(), _el$118 = _el$117.firstChild;
6151
+ var _el$117 = _tmpl$40$2(), _el$118 = _el$117.firstChild;
5655
6152
  _el$118.addEventListener("change", () => setSchedType(type));
5656
6153
  _el$118.value = type;
5657
6154
  insert(_el$117, () => type.charAt(0).toUpperCase() + type.slice(1), null);
@@ -5692,7 +6189,7 @@ const AutomationTab = (props) => {
5692
6189
  insert(_el$47, createComponent(For, {
5693
6190
  each: DAY_NAMES,
5694
6191
  children: (day, i) => (() => {
5695
- var _el$119 = _tmpl$41$1();
6192
+ var _el$119 = _tmpl$41$2();
5696
6193
  insert(_el$119, day);
5697
6194
  createRenderEffect(() => _el$119.value = i());
5698
6195
  return _el$119;
@@ -5741,7 +6238,7 @@ const AutomationTab = (props) => {
5741
6238
  insert(_el$59, createComponent(For, {
5742
6239
  each: ["once", "hourly", "daily", "weekly"],
5743
6240
  children: (t) => (() => {
5744
- var _el$120 = _tmpl$42$1(), _el$121 = _el$120.firstChild;
6241
+ var _el$120 = _tmpl$42$2(), _el$121 = _el$120.firstChild;
5745
6242
  _el$121.addEventListener("change", () => setEditType(t));
5746
6243
  _el$121.value = t;
5747
6244
  insert(_el$120, () => t.charAt(0).toUpperCase() + t.slice(1), null);
@@ -5775,7 +6272,7 @@ const AutomationTab = (props) => {
5775
6272
  insert(_el$65, createComponent(For, {
5776
6273
  each: DAY_NAMES,
5777
6274
  children: (name, i) => (() => {
5778
- var _el$122 = _tmpl$41$1();
6275
+ var _el$122 = _tmpl$41$2();
5779
6276
  insert(_el$122, name);
5780
6277
  createRenderEffect(() => _el$122.value = i());
5781
6278
  return _el$122;
@@ -5812,7 +6309,7 @@ const AutomationTab = (props) => {
5812
6309
  };
5813
6310
  delegateEvents(["click", "input", "keydown", "contextmenu"]);
5814
6311
  const vesselLogo = "" + new URL("vessel-logo-transparent-IT25qr-Z.png", import.meta.url).href;
5815
- 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>×`);
5816
6313
  const UNSORTED_FOLDER = {
5817
6314
  id: "unsorted",
5818
6315
  name: "Unsorted",
@@ -5887,6 +6384,7 @@ const Sidebar = (props) => {
5887
6384
  activeTab,
5888
6385
  createTab
5889
6386
  } = useTabs();
6387
+ const history = useHistory();
5890
6388
  const {
5891
6389
  bookmarksState: bookmarksState2,
5892
6390
  saveBookmark,
@@ -6270,9 +6768,9 @@ ${contextBlock}` : contextBlock);
6270
6768
  return props.forceOpen || sidebarOpen2();
6271
6769
  },
6272
6770
  get children() {
6273
- 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;
6274
6772
  _el$16.firstChild;
6275
- 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;
6276
6774
  _el$0.$$pointerdown = startResize;
6277
6775
  setAttribute(_el$11, "src", vesselLogo);
6278
6776
  addEventListener(_el$13, "click", clearHistory, true);
@@ -6292,20 +6790,21 @@ ${contextBlock}` : contextBlock);
6292
6790
  _el$20.$$click = () => setSidebarTab("checkpoints");
6293
6791
  _el$21.$$click = () => setSidebarTab("chat");
6294
6792
  _el$22.$$click = () => setSidebarTab("automation");
6793
+ _el$23.$$click = () => setSidebarTab("history");
6295
6794
  use((el) => {
6296
6795
  messagesContainerRef = el;
6297
6796
  useScrollFade(el);
6298
- }, _el$23);
6299
- insert(_el$23, createComponent(Show, {
6797
+ }, _el$24);
6798
+ insert(_el$24, createComponent(Show, {
6300
6799
  get when() {
6301
6800
  return sidebarTab() === "supervisor";
6302
6801
  },
6303
6802
  get children() {
6304
- 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;
6305
- _el$35.firstChild;
6306
- insert(_el$28, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
6307
- insert(_el$29, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
6308
- 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, {
6309
6808
  "class": "agent-select",
6310
6809
  get value() {
6311
6810
  return runtimeState2().supervisor.approvalMode;
@@ -6315,17 +6814,17 @@ ${contextBlock}` : contextBlock);
6315
6814
  },
6316
6815
  ariaLabel: "Approval mode",
6317
6816
  onChange: (value) => void setApprovalMode(value)
6318
- }), _el$31);
6319
- _el$31.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
6320
- insert(_el$31, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
6321
- _el$32.$$click = () => void restoreSession();
6322
- insert(_el$33, approvalModeDescription);
6323
- 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, {
6324
6823
  get when() {
6325
6824
  return runtimeState2().supervisor.pendingApprovals.length > 0;
6326
6825
  },
6327
6826
  get fallback() {
6328
- return _tmpl$24$1();
6827
+ return _tmpl$26$1();
6329
6828
  },
6330
6829
  get children() {
6331
6830
  return [_tmpl$4$3(), createComponent(For, {
@@ -6333,37 +6832,37 @@ ${contextBlock}` : contextBlock);
6333
6832
  return runtimeState2().supervisor.pendingApprovals;
6334
6833
  },
6335
6834
  children: (approval) => (() => {
6336
- 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;
6337
- insert(_el$106, () => approval.name);
6338
- insert(_el$107, () => approval.argsSummary);
6339
- insert(_el$108, () => approval.reason);
6340
- _el$110.$$click = () => void resolveApproval(approval.id, true);
6341
- _el$111.$$click = () => void resolveApproval(approval.id, false);
6342
- 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;
6343
6842
  })()
6344
6843
  })];
6345
6844
  }
6346
- }), _el$35);
6347
- insert(_el$35, createComponent(Show, {
6845
+ }), _el$36);
6846
+ insert(_el$36, createComponent(Show, {
6348
6847
  get when() {
6349
6848
  return recentActions().length > 0;
6350
6849
  },
6351
6850
  get children() {
6352
- var _el$37 = _tmpl$5$3();
6353
- _el$37.$$click = () => setActionsExpanded((current) => !current);
6354
- insert(_el$37, (() => {
6851
+ var _el$38 = _tmpl$5$3();
6852
+ _el$38.$$click = () => setActionsExpanded((current) => !current);
6853
+ insert(_el$38, (() => {
6355
6854
  var _c$ = memo(() => !!actionsExpanded());
6356
6855
  return () => _c$() ? "Hide history" : `Show history (${recentActions().length})`;
6357
6856
  })());
6358
- return _el$37;
6857
+ return _el$38;
6359
6858
  }
6360
6859
  }), null);
6361
- insert(_el$24, createComponent(Show, {
6860
+ insert(_el$25, createComponent(Show, {
6362
6861
  get when() {
6363
6862
  return recentActions().length > 0;
6364
6863
  },
6365
6864
  get fallback() {
6366
- return _tmpl$26$1();
6865
+ return _tmpl$28$1();
6367
6866
  },
6368
6867
  get children() {
6369
6868
  return createComponent(Show, {
@@ -6371,7 +6870,7 @@ ${contextBlock}` : contextBlock);
6371
6870
  return actionsExpanded();
6372
6871
  },
6373
6872
  get fallback() {
6374
- return _tmpl$27$1();
6873
+ return _tmpl$29$1();
6375
6874
  },
6376
6875
  get children() {
6377
6876
  return createComponent(For, {
@@ -6379,53 +6878,53 @@ ${contextBlock}` : contextBlock);
6379
6878
  return recentActions();
6380
6879
  },
6381
6880
  children: (action) => (() => {
6382
- 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;
6383
- insert(_el$116, () => action.name);
6384
- insert(_el$117, () => action.status);
6385
- insert(_el$118, () => action.argsSummary);
6386
- 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, {
6387
6886
  get when() {
6388
6887
  return action.resultSummary;
6389
6888
  },
6390
6889
  get children() {
6391
- var _el$119 = _tmpl$28$1();
6392
- insert(_el$119, () => action.resultSummary);
6393
- return _el$119;
6890
+ var _el$126 = _tmpl$30$1();
6891
+ insert(_el$126, () => action.resultSummary);
6892
+ return _el$126;
6394
6893
  }
6395
6894
  }), null);
6396
- insert(_el$114, createComponent(Show, {
6895
+ insert(_el$121, createComponent(Show, {
6397
6896
  get when() {
6398
6897
  return action.error;
6399
6898
  },
6400
6899
  get children() {
6401
- var _el$120 = _tmpl$29$1();
6402
- insert(_el$120, () => action.error);
6403
- return _el$120;
6900
+ var _el$127 = _tmpl$31$1();
6901
+ insert(_el$127, () => action.error);
6902
+ return _el$127;
6404
6903
  }
6405
6904
  }), null);
6406
- createRenderEffect(() => className(_el$117, `agent-action-status ${action.status}`));
6407
- return _el$114;
6905
+ createRenderEffect(() => className(_el$124, `agent-action-status ${action.status}`));
6906
+ return _el$121;
6408
6907
  })()
6409
6908
  });
6410
6909
  }
6411
6910
  });
6412
6911
  }
6413
6912
  }), null);
6414
- createRenderEffect(() => _el$29.classList.toggle("paused", !!runtimeState2().supervisor.paused));
6415
- return _el$24;
6913
+ createRenderEffect(() => _el$30.classList.toggle("paused", !!runtimeState2().supervisor.paused));
6914
+ return _el$25;
6416
6915
  }
6417
- }), _el$86);
6418
- insert(_el$23, createComponent(Show, {
6916
+ }), _el$93);
6917
+ insert(_el$24, createComponent(Show, {
6419
6918
  get when() {
6420
6919
  return sidebarTab() === "bookmarks";
6421
6920
  },
6422
6921
  get children() {
6423
- 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;
6424
- 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, (() => {
6425
6924
  var _c$2 = memo(() => !!normalizedBookmarkSearch());
6426
6925
  return () => _c$2() ? `${bookmarkMatchCount()} matches for "${bookmarkSearchQuery().trim()}"` : `${bookmarksState2().bookmarks.length} saved across ${bookmarkFolders().length} folders`;
6427
6926
  })());
6428
- insert(_el$39, createComponent(Show, {
6927
+ insert(_el$40, createComponent(Show, {
6429
6928
  get when() {
6430
6929
  return currentTabSaved();
6431
6930
  },
@@ -6433,17 +6932,17 @@ ${contextBlock}` : contextBlock);
6433
6932
  return _tmpl$7$2();
6434
6933
  }
6435
6934
  }), null);
6436
- _el$44.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
6437
- _el$46.$$click = () => setBookmarkSaveExpanded((current) => !current);
6438
- 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, {
6439
6938
  get when() {
6440
6939
  return bookmarkSaveExpanded();
6441
6940
  },
6442
6941
  get children() {
6443
- 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;
6444
- insert(_el$50, () => currentTab()?.title || "No active page");
6445
- insert(_el$51, () => currentTab()?.url || "Open a page to save it here.");
6446
- 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, {
6447
6946
  "class": "bookmark-select",
6448
6947
  get value() {
6449
6948
  return selectedFolderId();
@@ -6453,29 +6952,29 @@ ${contextBlock}` : contextBlock);
6453
6952
  },
6454
6953
  ariaLabel: "Bookmark folder",
6455
6954
  onChange: (value) => setSelectedFolderId(value)
6456
- }), _el$53);
6457
- _el$53.$$click = () => void handleSaveBookmark();
6458
- _el$54.$$input = (e) => setBookmarkNote(e.currentTarget.value);
6459
- createRenderEffect(() => _el$53.disabled = !currentTab()?.url);
6460
- createRenderEffect(() => _el$54.value = bookmarkNote());
6461
- 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;
6462
6961
  }
6463
6962
  }), null);
6464
- _el$55.addEventListener("submit", handleCreateFolder);
6465
- _el$57.$$input = (e) => setNewFolderName(e.currentTarget.value);
6466
- _el$58.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
6467
- 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, {
6468
6967
  get when() {
6469
6968
  return filteredGroupedBookmarks().length > 0;
6470
6969
  },
6471
6970
  get fallback() {
6472
6971
  return (() => {
6473
- var _el$121 = _tmpl$31$1();
6474
- insert(_el$121, (() => {
6972
+ var _el$128 = _tmpl$33$1();
6973
+ insert(_el$128, (() => {
6475
6974
  var _c$5 = memo(() => !!normalizedBookmarkSearch());
6476
6975
  return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
6477
6976
  })());
6478
- return _el$121;
6977
+ return _el$128;
6479
6978
  })();
6480
6979
  },
6481
6980
  get children() {
@@ -6484,100 +6983,100 @@ ${contextBlock}` : contextBlock);
6484
6983
  return filteredGroupedBookmarks();
6485
6984
  },
6486
6985
  children: (folder) => (() => {
6487
- 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;
6488
- _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) => {
6489
6988
  if (e.key === "Enter" || e.key === " ") {
6490
6989
  e.preventDefault();
6491
6990
  toggleFolderExpanded(folder.id);
6492
6991
  }
6493
6992
  };
6494
- _el$123.$$click = () => toggleFolderExpanded(folder.id);
6495
- insert(_el$127, () => folder.name);
6496
- insert(_el$128, () => folder.items.length, _el$129);
6497
- 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, {
6498
6997
  get when() {
6499
6998
  return folder.summary;
6500
6999
  },
6501
7000
  get children() {
6502
- var _el$130 = _tmpl$32$1();
6503
- insert(_el$130, () => folder.summary);
6504
- return _el$130;
7001
+ var _el$137 = _tmpl$34$1();
7002
+ insert(_el$137, () => folder.summary);
7003
+ return _el$137;
6505
7004
  }
6506
7005
  }), null);
6507
- insert(_el$123, createComponent(Show, {
7006
+ insert(_el$130, createComponent(Show, {
6508
7007
  get when() {
6509
7008
  return folder.id !== UNSORTED_FOLDER.id;
6510
7009
  },
6511
7010
  get children() {
6512
- var _el$131 = _tmpl$33$1(), _el$132 = _el$131.firstChild, _el$133 = _el$132.nextSibling;
6513
- _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) => {
6514
7013
  e.stopPropagation();
6515
7014
  setEditingFolderId(folder.id);
6516
7015
  setEditingFolderName(folder.name);
6517
7016
  setEditingFolderSummary(folder.summary || "");
6518
7017
  };
6519
- _el$133.$$click = (e) => {
7018
+ _el$140.$$click = (e) => {
6520
7019
  e.stopPropagation();
6521
7020
  setDeletingFolderId(folder.id);
6522
7021
  };
6523
- return _el$131;
7022
+ return _el$138;
6524
7023
  }
6525
7024
  }), null);
6526
- insert(_el$122, createComponent(Show, {
7025
+ insert(_el$129, createComponent(Show, {
6527
7026
  get when() {
6528
7027
  return deletingFolderId() === folder.id;
6529
7028
  },
6530
7029
  get children() {
6531
- var _el$134 = _tmpl$35$1(), _el$135 = _el$134.firstChild, _el$136 = _el$135.firstChild, _el$138 = _el$136.nextSibling;
6532
- _el$138.nextSibling;
6533
- var _el$139 = _el$135.nextSibling, _el$141 = _el$139.firstChild, _el$142 = _el$141.nextSibling;
6534
- insert(_el$135, () => folder.name, _el$138);
6535
- 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, (() => {
6536
7035
  var _c$6 = memo(() => folder.items.length > 0);
6537
7036
  return () => _c$6() ? ` This folder has ${folder.items.length} bookmark${folder.items.length === 1 ? "" : "s"}.` : "";
6538
7037
  })(), null);
6539
- insert(_el$139, createComponent(Show, {
7038
+ insert(_el$146, createComponent(Show, {
6540
7039
  get when() {
6541
7040
  return folder.items.length > 0;
6542
7041
  },
6543
7042
  get children() {
6544
- var _el$140 = _tmpl$34$1();
6545
- _el$140.$$click = () => void handleRemoveFolder(folder.id, false);
6546
- return _el$140;
7043
+ var _el$147 = _tmpl$36$1();
7044
+ _el$147.$$click = () => void handleRemoveFolder(folder.id, false);
7045
+ return _el$147;
6547
7046
  }
6548
- }), _el$141);
6549
- _el$141.$$click = () => void handleRemoveFolder(folder.id, true);
6550
- insert(_el$141, () => folder.items.length > 0 ? "Delete all" : "Delete folder");
6551
- _el$142.$$click = () => setDeletingFolderId(null);
6552
- 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;
6553
7052
  }
6554
7053
  }), null);
6555
- insert(_el$122, createComponent(Show, {
7054
+ insert(_el$129, createComponent(Show, {
6556
7055
  get when() {
6557
7056
  return editingFolderId() === folder.id;
6558
7057
  },
6559
7058
  get children() {
6560
- 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;
6561
- _el$145.$$input = (e) => setEditingFolderName(e.currentTarget.value);
6562
- _el$146.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
6563
- _el$147.$$click = () => void handleRenameFolder(folder.id);
6564
- _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 = () => {
6565
7064
  setEditingFolderId(null);
6566
7065
  setEditingFolderName("");
6567
7066
  setEditingFolderSummary("");
6568
7067
  };
6569
- createRenderEffect(() => _el$147.disabled = !editingFolderName().trim());
6570
- createRenderEffect(() => _el$145.value = editingFolderName());
6571
- createRenderEffect(() => _el$146.value = editingFolderSummary());
6572
- 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;
6573
7072
  }
6574
7073
  }), null);
6575
- insert(_el$122, createComponent(Show, {
7074
+ insert(_el$129, createComponent(Show, {
6576
7075
  get when() {
6577
7076
  return isFolderExpanded(folder.id);
6578
7077
  },
6579
7078
  get fallback() {
6580
- return _tmpl$39();
7079
+ return _tmpl$41$1();
6581
7080
  },
6582
7081
  get children() {
6583
7082
  return createComponent(Show, {
@@ -6585,116 +7084,116 @@ ${contextBlock}` : contextBlock);
6585
7084
  return folder.items.length > 0;
6586
7085
  },
6587
7086
  get fallback() {
6588
- return _tmpl$40();
7087
+ return _tmpl$42$1();
6589
7088
  },
6590
7089
  get children() {
6591
- var _el$149 = _tmpl$37$1();
6592
- insert(_el$149, createComponent(For, {
7090
+ var _el$156 = _tmpl$39$1();
7091
+ insert(_el$156, createComponent(For, {
6593
7092
  get each() {
6594
7093
  return folder.items;
6595
7094
  },
6596
7095
  children: (bookmark) => (() => {
6597
- 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;
6598
- _el$153.$$click = () => void createTab(bookmark.url);
6599
- insert(_el$154, () => bookmark.title || bookmark.url);
6600
- insert(_el$155, () => bookmark.url);
6601
- 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, {
6602
7101
  get when() {
6603
7102
  return bookmark.note;
6604
7103
  },
6605
7104
  get children() {
6606
- var _el$156 = _tmpl$41();
6607
- insert(_el$156, () => bookmark.note);
6608
- return _el$156;
7105
+ var _el$163 = _tmpl$43();
7106
+ insert(_el$163, () => bookmark.note);
7107
+ return _el$163;
6609
7108
  }
6610
- }), _el$157);
6611
- insert(_el$158, () => formatBookmarkDate(bookmark.savedAt));
6612
- _el$159.$$click = () => void removeBookmark(bookmark.id);
6613
- createRenderEffect(() => setAttribute(_el$152, "data-bookmark-id", bookmark.id));
6614
- 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;
6615
7114
  })()
6616
7115
  }));
6617
- return _el$149;
7116
+ return _el$156;
6618
7117
  }
6619
7118
  });
6620
7119
  }
6621
7120
  }), null);
6622
- createRenderEffect(() => _el$125.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
6623
- return _el$122;
7121
+ createRenderEffect(() => _el$132.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
7122
+ return _el$129;
6624
7123
  })()
6625
7124
  });
6626
7125
  }
6627
7126
  }));
6628
7127
  createRenderEffect((_p$) => {
6629
7128
  var _v$ = !!bookmarkSaveExpanded(), _v$2 = !newFolderName().trim();
6630
- _v$ !== _p$.e && _el$48.classList.toggle("expanded", _p$.e = _v$);
6631
- _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);
6632
7131
  return _p$;
6633
7132
  }, {
6634
7133
  e: void 0,
6635
7134
  t: void 0
6636
7135
  });
6637
- createRenderEffect(() => _el$44.value = bookmarkSearchQuery());
6638
- createRenderEffect(() => _el$57.value = newFolderName());
6639
- createRenderEffect(() => _el$58.value = newFolderSummary());
6640
- 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;
6641
7140
  }
6642
- }), _el$86);
6643
- insert(_el$23, createComponent(Show, {
7141
+ }), _el$93);
7142
+ insert(_el$24, createComponent(Show, {
6644
7143
  get when() {
6645
7144
  return sidebarTab() === "checkpoints";
6646
7145
  },
6647
7146
  get children() {
6648
- 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;
6649
- _el$67.nextSibling;
6650
- 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, (() => {
6651
7150
  var _c$3 = memo(() => recentCheckpoints().length > 0);
6652
7151
  return () => _c$3() ? `${recentCheckpoints().length} saved snapshots` : "Save and restore session snapshots";
6653
7152
  })());
6654
- _el$68.$$input = (e) => setCheckpointName(e.currentTarget.value);
6655
- _el$69.$$click = async () => {
7153
+ _el$69.$$input = (e) => setCheckpointName(e.currentTarget.value);
7154
+ _el$70.$$click = async () => {
6656
7155
  const name = checkpointName().trim();
6657
7156
  await createCheckpoint(name || void 0);
6658
7157
  setCheckpointName("");
6659
7158
  };
6660
- insert(_el$66, createComponent(Show, {
7159
+ insert(_el$67, createComponent(Show, {
6661
7160
  get when() {
6662
7161
  return recentCheckpoints().length > 0;
6663
7162
  },
6664
7163
  get fallback() {
6665
- return _tmpl$43();
7164
+ return _tmpl$45();
6666
7165
  },
6667
7166
  get children() {
6668
- var _el$71 = _tmpl$0$2();
6669
- insert(_el$71, createComponent(For, {
7167
+ var _el$72 = _tmpl$0$2();
7168
+ insert(_el$72, createComponent(For, {
6670
7169
  get each() {
6671
7170
  return recentCheckpoints();
6672
7171
  },
6673
7172
  children: (checkpoint, i) => (() => {
6674
- 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;
6675
- 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, {
6676
7175
  get when() {
6677
7176
  return i() < recentCheckpoints().length - 1;
6678
7177
  },
6679
7178
  get children() {
6680
- return _tmpl$44();
7179
+ return _tmpl$46();
6681
7180
  }
6682
7181
  }), null);
6683
- insert(_el$166, () => checkpoint.name);
6684
- insert(_el$167, () => new Date(checkpoint.createdAt).toLocaleString());
6685
- _el$168.$$click = () => void restoreCheckpoint(checkpoint.id);
6686
- createRenderEffect(() => _el$163.classList.toggle("latest", !!(i() === 0)));
6687
- 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;
6688
7187
  })()
6689
7188
  }));
6690
- return _el$71;
7189
+ return _el$72;
6691
7190
  }
6692
7191
  }), null);
6693
- createRenderEffect(() => _el$68.value = checkpointName());
6694
- return _el$61;
7192
+ createRenderEffect(() => _el$69.value = checkpointName());
7193
+ return _el$62;
6695
7194
  }
6696
- }), _el$86);
6697
- insert(_el$23, createComponent(Show, {
7195
+ }), _el$93);
7196
+ insert(_el$24, createComponent(Show, {
6698
7197
  get when() {
6699
7198
  return sidebarTab() === "automation";
6700
7199
  },
@@ -6703,8 +7202,41 @@ ${contextBlock}` : contextBlock);
6703
7202
  onRun: () => setSidebarTab("supervisor")
6704
7203
  });
6705
7204
  }
6706
- }), _el$86);
6707
- 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, {
6708
7240
  get when() {
6709
7241
  return sidebarTab() === "chat";
6710
7242
  },
@@ -6714,23 +7246,23 @@ ${contextBlock}` : contextBlock);
6714
7246
  return !isPremium();
6715
7247
  },
6716
7248
  get children() {
6717
- 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;
6718
- _el$76.$$click = () => openPremiumCheckout("chat_banner_clicked");
6719
- _el$77.$$click = openPremiumDetails;
6720
- 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;
6721
7253
  }
6722
7254
  }), createComponent(For, {
6723
7255
  get each() {
6724
7256
  return messages2();
6725
7257
  },
6726
7258
  children: (msg) => (() => {
6727
- var _el$169 = _tmpl$46();
6728
- insert(_el$169, createComponent(MarkdownMessage, {
7259
+ var _el$180 = _tmpl$49();
7260
+ insert(_el$180, createComponent(MarkdownMessage, {
6729
7261
  get content() {
6730
7262
  return msg.content;
6731
7263
  }
6732
7264
  }), null);
6733
- insert(_el$169, createComponent(Show, {
7265
+ insert(_el$180, createComponent(Show, {
6734
7266
  get when() {
6735
7267
  return memo(() => msg.role === "assistant")() ? getPremiumPromptKind(msg.content) : null;
6736
7268
  },
@@ -6743,31 +7275,31 @@ ${contextBlock}` : contextBlock);
6743
7275
  onOpenSettings: openPremiumDetails
6744
7276
  })
6745
7277
  }), null);
6746
- createRenderEffect(() => className(_el$169, `message message-${msg.role}`));
6747
- return _el$169;
7278
+ createRenderEffect(() => className(_el$180, `message message-${msg.role}`));
7279
+ return _el$180;
6748
7280
  })()
6749
7281
  }), createComponent(Show, {
6750
7282
  get when() {
6751
7283
  return isStreaming2();
6752
7284
  },
6753
7285
  get children() {
6754
- var _el$78 = _tmpl$13$1(), _el$79 = _el$78.firstChild;
6755
- insert(_el$79, createComponent(Show, {
7286
+ var _el$85 = _tmpl$15$1(), _el$86 = _el$85.firstChild;
7287
+ insert(_el$86, createComponent(Show, {
6756
7288
  get when() {
6757
7289
  return hasFirstChunk2();
6758
7290
  },
6759
7291
  get fallback() {
6760
- return _tmpl$47();
7292
+ return _tmpl$50();
6761
7293
  },
6762
7294
  get children() {
6763
- var _el$80 = _tmpl$12$2(), _el$81 = _el$80.firstChild, _el$82 = _el$81.firstChild;
6764
- _el$82.nextSibling;
6765
- 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, {
6766
7298
  get content() {
6767
7299
  return streamingText2();
6768
7300
  }
6769
- }), _el$81);
6770
- insert(_el$80, createComponent(Show, {
7301
+ }), _el$88);
7302
+ insert(_el$87, createComponent(Show, {
6771
7303
  get when() {
6772
7304
  return getPremiumPromptKind(streamingText2());
6773
7305
  },
@@ -6779,21 +7311,21 @@ ${contextBlock}` : contextBlock);
6779
7311
  onStartTrial: () => openPremiumCheckout(kind() === "premium_gate" ? "premium_gate_clicked" : "iteration_limit_clicked"),
6780
7312
  onOpenSettings: openPremiumDetails
6781
7313
  })
6782
- }), _el$81);
6783
- insert(_el$81, createComponent(Show, {
7314
+ }), _el$88);
7315
+ insert(_el$88, createComponent(Show, {
6784
7316
  get when() {
6785
7317
  return elapsedSeconds() > 0;
6786
7318
  },
6787
7319
  get children() {
6788
- var _el$84 = _tmpl$11$2();
6789
- insert(_el$84, () => ` • ${elapsedSeconds()}s`);
6790
- return _el$84;
7320
+ var _el$91 = _tmpl$13$1();
7321
+ insert(_el$91, () => ` • ${elapsedSeconds()}s`);
7322
+ return _el$91;
6791
7323
  }
6792
7324
  }), null);
6793
- return _el$80;
7325
+ return _el$87;
6794
7326
  }
6795
7327
  }));
6796
- return _el$78;
7328
+ return _el$85;
6797
7329
  }
6798
7330
  }), createComponent(Show, {
6799
7331
  get when() {
@@ -6805,22 +7337,22 @@ ${contextBlock}` : contextBlock);
6805
7337
  return runtimeState2().supervisor.pendingApprovals;
6806
7338
  },
6807
7339
  children: (approval) => (() => {
6808
- 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;
6809
- insert(_el$176, () => approval.name);
6810
- 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, {
6811
7343
  get when() {
6812
7344
  return approval.argsSummary;
6813
7345
  },
6814
7346
  get children() {
6815
- var _el$177 = _tmpl$48();
6816
- insert(_el$177, () => approval.argsSummary);
6817
- return _el$177;
7347
+ var _el$188 = _tmpl$51();
7348
+ insert(_el$188, () => approval.argsSummary);
7349
+ return _el$188;
6818
7350
  }
6819
- }), _el$178);
6820
- insert(_el$178, () => approval.reason);
6821
- _el$180.$$click = () => void resolveApproval(approval.id, true);
6822
- _el$181.$$click = () => void resolveApproval(approval.id, false);
6823
- 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;
6824
7356
  })()
6825
7357
  });
6826
7358
  }
@@ -6829,13 +7361,13 @@ ${contextBlock}` : contextBlock);
6829
7361
  return memo(() => messages2().length === 0)() && !isStreaming2();
6830
7362
  },
6831
7363
  get children() {
6832
- return _tmpl$14$1();
7364
+ return _tmpl$16$1();
6833
7365
  }
6834
7366
  })];
6835
7367
  }
6836
- }), _el$86);
7368
+ }), _el$93);
6837
7369
  var _ref$ = messagesEndRef;
6838
- typeof _ref$ === "function" ? use(_ref$, _el$86) : messagesEndRef = _el$86;
7370
+ typeof _ref$ === "function" ? use(_ref$, _el$93) : messagesEndRef = _el$93;
6839
7371
  insert(_el$9, createComponent(Show, {
6840
7372
  get when() {
6841
7373
  return sidebarTab() === "chat";
@@ -6846,125 +7378,125 @@ ${contextBlock}` : contextBlock);
6846
7378
  return isStreaming2() || messages2().length > 0;
6847
7379
  },
6848
7380
  get children() {
6849
- var _el$87 = _tmpl$17$1();
6850
- insert(_el$87, createComponent(Show, {
7381
+ var _el$94 = _tmpl$19$1();
7382
+ insert(_el$94, createComponent(Show, {
6851
7383
  get when() {
6852
7384
  return isStreaming2();
6853
7385
  },
6854
7386
  get children() {
6855
- var _el$88 = _tmpl$15$1();
6856
- _el$88.$$click = () => cancel();
6857
- return _el$88;
7387
+ var _el$95 = _tmpl$17$1();
7388
+ _el$95.$$click = () => cancel();
7389
+ return _el$95;
6858
7390
  }
6859
7391
  }), null);
6860
- insert(_el$87, createComponent(Show, {
7392
+ insert(_el$94, createComponent(Show, {
6861
7393
  get when() {
6862
7394
  return memo(() => !!!isStreaming2())() && messages2().length > 0;
6863
7395
  },
6864
7396
  get children() {
6865
- var _el$89 = _tmpl$16$1();
6866
- _el$89.$$click = handleRetry;
6867
- return _el$89;
7397
+ var _el$96 = _tmpl$18$1();
7398
+ _el$96.$$click = handleRetry;
7399
+ return _el$96;
6868
7400
  }
6869
7401
  }), null);
6870
- return _el$87;
7402
+ return _el$94;
6871
7403
  }
6872
7404
  }), createComponent(Show, {
6873
7405
  get when() {
6874
7406
  return highlightCount() > 0;
6875
7407
  },
6876
7408
  get children() {
6877
- var _el$90 = _tmpl$18$1(), _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling;
6878
- _el$92.firstChild;
6879
- var _el$94 = _el$92.nextSibling;
6880
- _el$91.$$click = () => void scrollToHighlight(highlightIndex() - 1);
6881
- _el$92.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
6882
- 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, (() => {
6883
7415
  var _c$4 = memo(() => highlightIndex() >= 0);
6884
7416
  return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
6885
7417
  })(), null);
6886
- _el$94.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
7418
+ _el$101.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
6887
7419
  createRenderEffect((_p$) => {
6888
7420
  var _v$3 = highlightIndex() <= 0, _v$4 = highlightIndex() >= highlightCount() - 1;
6889
- _v$3 !== _p$.e && (_el$91.disabled = _p$.e = _v$3);
6890
- _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);
6891
7423
  return _p$;
6892
7424
  }, {
6893
7425
  e: void 0,
6894
7426
  t: void 0
6895
7427
  });
6896
- return _el$90;
7428
+ return _el$97;
6897
7429
  }
6898
7430
  }), createComponent(Show, {
6899
7431
  get when() {
6900
7432
  return queueNotice2() !== null || pendingQueryCount() > 0;
6901
7433
  },
6902
7434
  get children() {
6903
- var _el$95 = _tmpl$21$1(), _el$96 = _el$95.firstChild, _el$97 = _el$96.firstChild;
6904
- insert(_el$97, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
6905
- 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, {
6906
7438
  get when() {
6907
7439
  return pendingQueryCount() > 0;
6908
7440
  },
6909
7441
  get children() {
6910
- var _el$98 = _tmpl$19$1();
6911
- _el$98.$$click = () => clearPendingQueries();
6912
- return _el$98;
7442
+ var _el$105 = _tmpl$21$1();
7443
+ _el$105.$$click = () => clearPendingQueries();
7444
+ return _el$105;
6913
7445
  }
6914
7446
  }), null);
6915
- insert(_el$95, createComponent(Show, {
7447
+ insert(_el$102, createComponent(Show, {
6916
7448
  get when() {
6917
7449
  return pendingQueries2().length > 0;
6918
7450
  },
6919
7451
  get children() {
6920
- var _el$99 = _tmpl$20$1();
6921
- insert(_el$99, createComponent(For, {
7452
+ var _el$106 = _tmpl$22$1();
7453
+ insert(_el$106, createComponent(For, {
6922
7454
  get each() {
6923
7455
  return pendingQueries2();
6924
7456
  },
6925
7457
  children: (pendingPrompt, index) => (() => {
6926
- var _el$182 = _tmpl$50(), _el$183 = _el$182.firstChild, _el$184 = _el$183.nextSibling;
6927
- setAttribute(_el$183, "title", pendingPrompt);
6928
- insert(_el$183, pendingPrompt);
6929
- _el$184.$$click = () => removePendingQuery(index());
6930
- createRenderEffect(() => setAttribute(_el$184, "aria-label", `Remove queued prompt ${index() + 1}`));
6931
- 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;
6932
7464
  })()
6933
7465
  }));
6934
- return _el$99;
7466
+ return _el$106;
6935
7467
  }
6936
7468
  }), null);
6937
- return _el$95;
7469
+ return _el$102;
6938
7470
  }
6939
7471
  }), (() => {
6940
- var _el$100 = _tmpl$22$1(), _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling;
6941
- _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) => {
6942
7474
  if (e.key === "Enter" && !e.shiftKey) {
6943
7475
  e.preventDefault();
6944
7476
  void handleChatSend();
6945
7477
  }
6946
7478
  };
6947
- _el$101.$$input = (e) => setChatInput(e.currentTarget.value);
7479
+ _el$108.$$input = (e) => setChatInput(e.currentTarget.value);
6948
7480
  var _ref$2 = chatInputRef;
6949
- typeof _ref$2 === "function" ? use(_ref$2, _el$101) : chatInputRef = _el$101;
6950
- _el$102.$$click = () => void handleChatSend();
6951
- 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");
6952
7484
  createRenderEffect((_p$) => {
6953
7485
  var _v$5 = isStreaming2() ? "Send now to queue the next prompt..." : "Ask anything...", _v$6 = !chatInput().trim();
6954
- _v$5 !== _p$.e && setAttribute(_el$101, "placeholder", _p$.e = _v$5);
6955
- _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);
6956
7488
  return _p$;
6957
7489
  }, {
6958
7490
  e: void 0,
6959
7491
  t: void 0
6960
7492
  });
6961
- createRenderEffect(() => _el$101.value = chatInput());
6962
- return _el$100;
7493
+ createRenderEffect(() => _el$108.value = chatInput());
7494
+ return _el$107;
6963
7495
  })()];
6964
7496
  }
6965
7497
  }), null);
6966
7498
  createRenderEffect((_p$) => {
6967
- 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";
6968
7500
  _v$7 !== _p$.e && setStyleProperty(_el$9, "width", _p$.e = _v$7);
6969
7501
  _v$8 !== _p$.t && _el$0.classList.toggle("dragging", _p$.t = _v$8);
6970
7502
  _v$9 !== _p$.a && _el$16.classList.toggle("active", _p$.a = _v$9);
@@ -6977,6 +7509,8 @@ ${contextBlock}` : contextBlock);
6977
7509
  _v$14 !== _p$.d && setAttribute(_el$21, "aria-selected", _p$.d = _v$14);
6978
7510
  _v$15 !== _p$.l && _el$22.classList.toggle("active", _p$.l = _v$15);
6979
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);
6980
7514
  return _p$;
6981
7515
  }, {
6982
7516
  e: void 0,
@@ -6990,7 +7524,9 @@ ${contextBlock}` : contextBlock);
6990
7524
  r: void 0,
6991
7525
  d: void 0,
6992
7526
  l: void 0,
6993
- u: void 0
7527
+ u: void 0,
7528
+ c: void 0,
7529
+ w: void 0
6994
7530
  });
6995
7531
  return _el$9;
6996
7532
  }
@@ -7518,7 +8054,7 @@ const PROVIDERS = {
7518
8054
  apiKeyHint: "Optional — only if your endpoint requires authentication"
7519
8055
  }
7520
8056
  };
7521
- 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>
7522
8058
  .settings-panel {
7523
8059
  width: min(440px, calc(100vw - 32px));
7524
8060
  max-height: calc(100vh - 48px);
@@ -7638,6 +8174,14 @@ var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><butt
7638
8174
  .settings-select {
7639
8175
  appearance: none;
7640
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
+ }
7641
8185
  .settings-input:focus {
7642
8186
  border-color: var(--accent-primary);
7643
8187
  box-shadow: 0 0 0 2px rgba(196, 160, 90, 0.1);
@@ -8052,7 +8596,7 @@ var _tmpl$$2 = /* @__PURE__ */ template(`<div class=welcome-banner-actions><butt
8052
8596
  justify-content: flex-end;
8053
8597
  margin-top: 4px;
8054
8598
  }
8055
- `), _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;`);
8056
8600
  const CHAT_PROVIDERS = Object.values(PROVIDERS).map((p) => ({
8057
8601
  id: p.id,
8058
8602
  name: p.name,
@@ -8080,8 +8624,21 @@ const Settings = () => {
8080
8624
  const [agentTranscriptMode, setAgentTranscriptMode] = createSignal("summary");
8081
8625
  const [health, setHealth] = createSignal(null);
8082
8626
  const [defaultUrl, setDefaultUrl] = createSignal("https://start.duckduckgo.com");
8627
+ const [downloadPath, setDownloadPath] = createSignal("");
8083
8628
  const [status, setStatus] = createSignal(null);
8084
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
+ };
8085
8642
  const [vaultEntries, setVaultEntries] = createSignal([]);
8086
8643
  const [vaultExpanded, setVaultExpanded] = createSignal(false);
8087
8644
  const [vaultAdding, setVaultAdding] = createSignal(false);
@@ -8348,7 +8905,9 @@ const Settings = () => {
8348
8905
  const loadState = async () => {
8349
8906
  const settings = await window.vessel.settings.get();
8350
8907
  const runtimeHealth = await window.vessel.settings.getHealth();
8908
+ setTheme(settings.theme ?? "dark");
8351
8909
  setDefaultUrl(settings.defaultUrl ?? "https://start.duckduckgo.com");
8910
+ setDownloadPath(settings.downloadPath ?? "");
8352
8911
  setAutoRestoreSession(settings.autoRestoreSession ?? true);
8353
8912
  setClearBookmarksOnLaunch(settings.clearBookmarksOnLaunch ?? false);
8354
8913
  setObsidianVaultPath(settings.obsidianVaultPath ?? "");
@@ -8369,6 +8928,20 @@ const Settings = () => {
8369
8928
  setChatHasStoredApiKey(false);
8370
8929
  }
8371
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
+ }
8372
8945
  try {
8373
8946
  const ps = await window.vessel.premium.getState();
8374
8947
  setPremiumState(ps);
@@ -8376,6 +8949,7 @@ const Settings = () => {
8376
8949
  } catch {
8377
8950
  }
8378
8951
  await loadVaultEntries();
8952
+ await loadSessionList();
8379
8953
  };
8380
8954
  onMount(() => {
8381
8955
  void loadState();
@@ -8422,6 +8996,8 @@ const Settings = () => {
8422
8996
  });
8423
8997
  return;
8424
8998
  }
8999
+ await window.vessel.settings.set("theme", theme());
9000
+ await window.vessel.settings.set("downloadPath", downloadPath().trim());
8425
9001
  await window.vessel.settings.set("defaultUrl", defaultUrl().trim() || "https://start.duckduckgo.com");
8426
9002
  await window.vessel.settings.set("autoRestoreSession", autoRestoreSession());
8427
9003
  await window.vessel.settings.set("clearBookmarksOnLaunch", clearBookmarksOnLaunch());
@@ -8431,6 +9007,18 @@ const Settings = () => {
8431
9007
  await window.vessel.settings.set("maxToolIterations", Math.max(10, Math.min(1e3, parsedIterations)));
8432
9008
  await window.vessel.settings.set("agentTranscriptMode", agentTranscriptMode());
8433
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);
8434
9022
  const chatConfig = chatEnabled() ? {
8435
9023
  id: chatProviderId(),
8436
9024
  apiKey: chatApiKey().trim(),
@@ -8460,13 +9048,13 @@ const Settings = () => {
8460
9048
  },
8461
9049
  get children() {
8462
9050
  return [(() => {
8463
- 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;
8464
- _el$65.firstChild;
8465
- 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;
8466
9052
  _el$76.firstChild;
8467
- var _el$92 = _el$75.nextSibling, _el$93 = _el$92.nextSibling, _el$94 = _el$93.firstChild;
8468
- _el$94.nextSibling;
8469
- 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;
8470
9058
  addEventListener(_el$, "click", closeSettings, true);
8471
9059
  _el$2.$$keydown = handleKeyDown;
8472
9060
  _el$2.$$click = (e) => e.stopPropagation();
@@ -8516,23 +9104,25 @@ const Settings = () => {
8516
9104
  }), _el$18);
8517
9105
  _el$20.$$input = (e) => setDefaultUrl(e.currentTarget.value);
8518
9106
  setAttribute(_el$20, "spellcheck", false);
8519
- _el$23.$$input = (e) => setMcpPort(e.currentTarget.value);
9107
+ _el$23.$$input = (e) => setDownloadPath(e.currentTarget.value);
8520
9108
  setAttribute(_el$23, "spellcheck", false);
8521
- 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, {
8522
9112
  get when() {
8523
9113
  return premiumActive();
8524
9114
  },
8525
9115
  get fallback() {
8526
- return _tmpl$23();
9116
+ return _tmpl$26();
8527
9117
  },
8528
9118
  get children() {
8529
- var _el$26 = _tmpl$4$1();
8530
- _el$26.$$input = (e) => setMaxToolIterations(e.currentTarget.value);
8531
- createRenderEffect(() => _el$26.value = maxToolIterations());
8532
- 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;
8533
9123
  }
8534
- }), _el$27);
8535
- insert(_el$27, createComponent(Show, {
9124
+ }), _el$30);
9125
+ insert(_el$30, createComponent(Show, {
8536
9126
  get when() {
8537
9127
  return premiumActive();
8538
9128
  },
@@ -8544,71 +9134,133 @@ const Settings = () => {
8544
9134
  return health();
8545
9135
  },
8546
9136
  children: (currentHealth) => (() => {
8547
- 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;
8548
- _el$131.nextSibling;
8549
- insert(_el$131, () => currentHealth().mcp.status);
8550
- insert(_el$128, () => currentHealth().mcp.message, null);
8551
- 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, {
8552
9142
  get when() {
8553
9143
  return currentHealth().mcp.endpoint;
8554
9144
  },
8555
9145
  children: (endpoint) => (() => {
8556
- var _el$134 = _tmpl$26(), _el$135 = _el$134.firstChild, _el$136 = _el$135.nextSibling;
8557
- insert(_el$136, endpoint);
8558
- 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;
8559
9149
  })()
8560
9150
  }), null);
8561
- insert(_el$126, createComponent(Show, {
9151
+ insert(_el$147, createComponent(Show, {
8562
9152
  get when() {
8563
9153
  return currentHealth().startupIssues.length > 0;
8564
9154
  },
8565
9155
  get children() {
8566
- var _el$133 = _tmpl$24();
8567
- insert(_el$133, () => currentHealth().startupIssues.map((issue) => (() => {
8568
- var _el$137 = _tmpl$27(), _el$138 = _el$137.firstChild, _el$139 = _el$138.nextSibling;
8569
- insert(_el$138, () => issue.title);
8570
- insert(_el$139, () => issue.detail);
8571
- 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, {
8572
9162
  get when() {
8573
9163
  return issue.action;
8574
9164
  },
8575
9165
  children: (action) => (() => {
8576
- var _el$140 = _tmpl$28();
8577
- insert(_el$140, action);
8578
- return _el$140;
9166
+ var _el$161 = _tmpl$31();
9167
+ insert(_el$161, action);
9168
+ return _el$161;
8579
9169
  })()
8580
9170
  }), null);
8581
9171
  createRenderEffect((_p$) => {
8582
- var _v$0 = !!(issue.severity === "warning"), _v$1 = !!(issue.severity === "error");
8583
- _v$0 !== _p$.e && _el$137.classList.toggle("warning", _p$.e = _v$0);
8584
- _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);
8585
9175
  return _p$;
8586
9176
  }, {
8587
9177
  e: void 0,
8588
9178
  t: void 0
8589
9179
  });
8590
- return _el$137;
9180
+ return _el$158;
8591
9181
  })()));
8592
- return _el$133;
9182
+ return _el$154;
8593
9183
  }
8594
9184
  }), null);
8595
- return _el$126;
9185
+ return _el$147;
8596
9186
  })()
8597
- }), _el$28);
8598
- _el$30.$$input = (e) => setObsidianVaultPath(e.currentTarget.value);
8599
- setAttribute(_el$30, "spellcheck", false);
8600
- _el$33.addEventListener("change", (e) => setAgentTranscriptMode(e.currentTarget.value));
8601
- _el$36.$$click = () => setAutoRestoreSession(!autoRestoreSession());
8602
- _el$39.$$click = () => setClearBookmarksOnLaunch(!clearBookmarksOnLaunch());
8603
- _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());
8604
9256
  insert(_el$2, createComponent(Show, {
8605
9257
  get when() {
8606
9258
  return chatEnabled();
8607
9259
  },
8608
9260
  get children() {
8609
9261
  return [(() => {
8610
- var _el$44 = _tmpl$5$1(), _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
8611
- _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) => {
8612
9264
  const id = e.currentTarget.value;
8613
9265
  setChatProviderId(id);
8614
9266
  setChatModel("");
@@ -8618,145 +9270,145 @@ const Settings = () => {
8618
9270
  setProviderModels([]);
8619
9271
  setModelFetchState("idle");
8620
9272
  });
8621
- insert(_el$46, createComponent(For, {
9273
+ insert(_el$57, createComponent(For, {
8622
9274
  each: CHAT_PROVIDERS,
8623
9275
  children: (p) => (() => {
8624
- var _el$141 = _tmpl$29();
8625
- insert(_el$141, () => p.name);
8626
- createRenderEffect(() => _el$141.value = p.id);
8627
- 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;
8628
9280
  })()
8629
9281
  }));
8630
- createRenderEffect(() => _el$46.value = chatProviderId());
8631
- return _el$44;
9282
+ createRenderEffect(() => _el$57.value = chatProviderId());
9283
+ return _el$55;
8632
9284
  })(), createComponent(Show, {
8633
9285
  get when() {
8634
9286
  return chatProviderMeta().requiresKey || chatProviderId() === "custom";
8635
9287
  },
8636
9288
  get children() {
8637
- var _el$47 = _tmpl$9(), _el$48 = _el$47.firstChild;
8638
- _el$48.firstChild;
8639
- var _el$51 = _el$48.nextSibling;
8640
- 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, {
8641
9293
  get when() {
8642
9294
  return !chatProviderMeta().requiresKey;
8643
9295
  },
8644
9296
  get children() {
8645
- return _tmpl$6$1();
9297
+ return _tmpl$7();
8646
9298
  }
8647
9299
  }), null);
8648
- _el$51.$$input = (e) => {
9300
+ _el$62.$$input = (e) => {
8649
9301
  setChatApiKey(e.currentTarget.value);
8650
9302
  if (e.currentTarget.value.trim()) {
8651
9303
  setChatHasStoredApiKey(true);
8652
9304
  }
8653
9305
  };
8654
- setAttribute(_el$51, "spellcheck", false);
8655
- insert(_el$47, createComponent(Show, {
9306
+ setAttribute(_el$62, "spellcheck", false);
9307
+ insert(_el$58, createComponent(Show, {
8656
9308
  get when() {
8657
9309
  return memo(() => !!chatHasStoredApiKey())() && !chatApiKey().trim();
8658
9310
  },
8659
9311
  get children() {
8660
- return _tmpl$7();
9312
+ return _tmpl$8();
8661
9313
  }
8662
9314
  }), null);
8663
- insert(_el$47, createComponent(Show, {
9315
+ insert(_el$58, createComponent(Show, {
8664
9316
  get when() {
8665
9317
  return chatProviderId() === "custom";
8666
9318
  },
8667
9319
  get children() {
8668
- return _tmpl$8();
9320
+ return _tmpl$9();
8669
9321
  }
8670
9322
  }), null);
8671
- createRenderEffect(() => setAttribute(_el$51, "placeholder", chatHasStoredApiKey() && !chatApiKey().trim() ? "Stored securely. Enter a new key to replace it." : chatProviderMeta().keyPlaceholder || "Bearer token or API key"));
8672
- createRenderEffect(() => _el$51.value = chatApiKey());
8673
- 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;
8674
9326
  }
8675
9327
  }), (() => {
8676
- var _el$54 = _tmpl$10(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$58 = _el$56.firstChild;
8677
- 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, {
8678
9330
  get when() {
8679
9331
  return providerModels().length > 0;
8680
9332
  },
8681
9333
  get fallback() {
8682
9334
  return (() => {
8683
- var _el$142 = _tmpl$30();
8684
- _el$142.$$input = (e) => setChatModel(e.currentTarget.value);
8685
- setAttribute(_el$142, "spellcheck", false);
8686
- createRenderEffect(() => setAttribute(_el$142, "placeholder", modelFetchState() === "loading" ? "Fetching models…" : chatProviderMeta().requiresKey && !chatApiKey().trim() && !chatHasStoredApiKey() ? "Enter API key to load models" : chatProviderMeta().defaultModel || "model name"));
8687
- createRenderEffect(() => _el$142.value = chatModel());
8688
- 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;
8689
9341
  })();
8690
9342
  },
8691
9343
  get children() {
8692
- var _el$57 = _tmpl$0();
8693
- _el$57.addEventListener("change", (e) => setChatModel(e.currentTarget.value));
8694
- 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, {
8695
9347
  get each() {
8696
9348
  return providerModels();
8697
9349
  },
8698
9350
  children: (m) => (() => {
8699
- var _el$143 = _tmpl$29();
8700
- _el$143.value = m;
8701
- insert(_el$143, m);
8702
- return _el$143;
9351
+ var _el$179 = _tmpl$33();
9352
+ _el$179.value = m;
9353
+ insert(_el$179, m);
9354
+ return _el$179;
8703
9355
  })()
8704
9356
  }));
8705
- createRenderEffect(() => _el$57.value = chatModel());
8706
- return _el$57;
9357
+ createRenderEffect(() => _el$68.value = chatModel());
9358
+ return _el$68;
8707
9359
  }
8708
- }), _el$58);
8709
- _el$58.$$click = doFetchModels;
8710
- insert(_el$54, createComponent(Show, {
9360
+ }), _el$69);
9361
+ _el$69.$$click = doFetchModels;
9362
+ insert(_el$65, createComponent(Show, {
8711
9363
  get when() {
8712
9364
  return modelFetchState() === "error";
8713
9365
  },
8714
9366
  get children() {
8715
- return _tmpl$1();
9367
+ return _tmpl$10();
8716
9368
  }
8717
9369
  }), null);
8718
- insert(_el$54, createComponent(Show, {
9370
+ insert(_el$65, createComponent(Show, {
8719
9371
  get when() {
8720
9372
  return modelFetchWarning();
8721
9373
  },
8722
9374
  children: (warning) => (() => {
8723
- var _el$144 = _tmpl$31();
8724
- insert(_el$144, warning);
8725
- return _el$144;
9375
+ var _el$180 = _tmpl$35();
9376
+ insert(_el$180, warning);
9377
+ return _el$180;
8726
9378
  })()
8727
9379
  }), null);
8728
- createRenderEffect(() => _el$58.disabled = modelFetchState() === "loading");
8729
- return _el$54;
9380
+ createRenderEffect(() => _el$69.disabled = modelFetchState() === "loading");
9381
+ return _el$65;
8730
9382
  })(), createComponent(Show, {
8731
9383
  get when() {
8732
9384
  return chatProviderMeta().needsBaseUrl || chatProviderId() === "custom";
8733
9385
  },
8734
9386
  get children() {
8735
- var _el$60 = _tmpl$11(), _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling;
8736
- _el$62.$$input = (e) => setChatBaseUrl(e.currentTarget.value);
8737
- setAttribute(_el$62, "spellcheck", false);
8738
- createRenderEffect(() => setAttribute(_el$62, "placeholder", chatProviderMeta().defaultBaseUrl ?? "https://..."));
8739
- createRenderEffect(() => _el$62.value = chatBaseUrl());
8740
- 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;
8741
9393
  }
8742
9394
  }), createComponent(Show, {
8743
9395
  get when() {
8744
9396
  return chatProviderId() === "llama_cpp";
8745
9397
  },
8746
9398
  get children() {
8747
- return _tmpl$12();
9399
+ return _tmpl$13();
8748
9400
  }
8749
9401
  })];
8750
9402
  }
8751
- }), _el$64);
8752
- insert(_el$65, createComponent(Show, {
9403
+ }), _el$75);
9404
+ insert(_el$76, createComponent(Show, {
8753
9405
  get when() {
8754
9406
  return premiumActive();
8755
9407
  },
8756
9408
  get fallback() {
8757
9409
  return (() => {
8758
- 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;
8759
- _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) => {
8760
9412
  const nextEmail = e.currentTarget.value;
8761
9413
  if (nextEmail.trim().toLowerCase() !== premiumEmail().trim().toLowerCase()) {
8762
9414
  resetPremiumActivationFlow();
@@ -8764,8 +9416,8 @@ const Settings = () => {
8764
9416
  }
8765
9417
  setPremiumEmail(nextEmail);
8766
9418
  };
8767
- setAttribute(_el$148, "spellcheck", false);
8768
- _el$149.$$click = async () => {
9419
+ setAttribute(_el$184, "spellcheck", false);
9420
+ _el$185.$$click = async () => {
8769
9421
  setPremiumLoading(true);
8770
9422
  setPremiumMessage(null);
8771
9423
  try {
@@ -8794,23 +9446,23 @@ const Settings = () => {
8794
9446
  setPremiumLoading(false);
8795
9447
  }
8796
9448
  };
8797
- insert(_el$149, (() => {
9449
+ insert(_el$185, (() => {
8798
9450
  var _c$ = memo(() => !!premiumLoading());
8799
9451
  return () => _c$() ? "Sending..." : premiumCodeSent() ? "Resend Code" : "Send Code";
8800
9452
  })());
8801
- insert(_el$145, createComponent(Show, {
9453
+ insert(_el$181, createComponent(Show, {
8802
9454
  get when() {
8803
9455
  return premiumCodeSent();
8804
9456
  },
8805
9457
  get children() {
8806
- var _el$150 = _tmpl$32(), _el$151 = _el$150.firstChild, _el$152 = _el$151.nextSibling;
8807
- _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) => {
8808
9460
  const nextCode = e.currentTarget.value.replace(/\D+/g, "").slice(0, 6);
8809
9461
  setPremiumCode(nextCode);
8810
9462
  setPremiumMessage(null);
8811
9463
  };
8812
- setAttribute(_el$151, "spellcheck", false);
8813
- _el$152.$$click = async () => {
9464
+ setAttribute(_el$187, "spellcheck", false);
9465
+ _el$188.$$click = async () => {
8814
9466
  setPremiumLoading(true);
8815
9467
  setPremiumMessage(null);
8816
9468
  try {
@@ -8837,60 +9489,60 @@ const Settings = () => {
8837
9489
  setPremiumLoading(false);
8838
9490
  }
8839
9491
  };
8840
- insert(_el$152, () => premiumLoading() ? "Verifying..." : "Verify Code");
8841
- createRenderEffect(() => _el$152.disabled = premiumLoading() || !premiumEmail().trim() || premiumCode().trim().length !== 6 || !premiumChallengeToken());
8842
- createRenderEffect(() => _el$151.value = premiumCode());
8843
- 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;
8844
9496
  }
8845
- }), _el$153);
8846
- _el$153.$$click = () => {
9497
+ }), _el$189);
9498
+ _el$189.$$click = () => {
8847
9499
  startPremiumCheckout();
8848
9500
  };
8849
- insert(_el$145, createComponent(Show, {
9501
+ insert(_el$181, createComponent(Show, {
8850
9502
  get when() {
8851
9503
  return premiumMessage();
8852
9504
  },
8853
9505
  children: (msg) => (() => {
8854
- var _el$155 = _tmpl$35();
8855
- insert(_el$155, () => msg().text);
9506
+ var _el$191 = _tmpl$39();
9507
+ insert(_el$191, () => msg().text);
8856
9508
  createRenderEffect((_p$) => {
8857
- var _v$10 = !!(msg().kind === "success"), _v$11 = !!(msg().kind === "error");
8858
- _v$10 !== _p$.e && _el$155.classList.toggle("success", _p$.e = _v$10);
8859
- _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);
8860
9512
  return _p$;
8861
9513
  }, {
8862
9514
  e: void 0,
8863
9515
  t: void 0
8864
9516
  });
8865
- return _el$155;
9517
+ return _el$191;
8866
9518
  })()
8867
9519
  }), null);
8868
- insert(_el$145, createComponent(Show, {
9520
+ insert(_el$181, createComponent(Show, {
8869
9521
  get when() {
8870
9522
  return premiumState().email || premiumEmail();
8871
9523
  },
8872
9524
  get children() {
8873
- var _el$154 = _tmpl$33();
8874
- _el$154.$$click = async () => {
9525
+ var _el$190 = _tmpl$37();
9526
+ _el$190.$$click = async () => {
8875
9527
  const state = await window.vessel.premium.reset();
8876
9528
  setPremiumState(state);
8877
9529
  setPremiumEmail("");
8878
9530
  resetPremiumActivationFlow();
8879
9531
  setPremiumMessage(null);
8880
9532
  };
8881
- return _el$154;
9533
+ return _el$190;
8882
9534
  }
8883
9535
  }), null);
8884
- createRenderEffect(() => _el$149.disabled = premiumLoading() || !premiumEmail().trim());
8885
- createRenderEffect(() => _el$148.value = premiumEmail());
8886
- return _el$145;
9536
+ createRenderEffect(() => _el$185.disabled = premiumLoading() || !premiumEmail().trim());
9537
+ createRenderEffect(() => _el$184.value = premiumEmail());
9538
+ return _el$181;
8887
9539
  })();
8888
9540
  },
8889
9541
  get children() {
8890
- var _el$67 = _tmpl$13(), _el$68 = _el$67.firstChild;
8891
- _el$68.firstChild;
8892
- var _el$70 = _el$68.nextSibling, _el$71 = _el$70.nextSibling, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling;
8893
- 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, {
8894
9546
  get when() {
8895
9547
  return premiumState().status === "trialing";
8896
9548
  },
@@ -8898,8 +9550,8 @@ const Settings = () => {
8898
9550
  return [" ", "(Trial)"];
8899
9551
  }
8900
9552
  }), null);
8901
- insert(_el$70, () => premiumState().email, null);
8902
- insert(_el$70, createComponent(Show, {
9553
+ insert(_el$81, () => premiumState().email, null);
9554
+ insert(_el$81, createComponent(Show, {
8903
9555
  get when() {
8904
9556
  return premiumState().expiresAt;
8905
9557
  },
@@ -8907,51 +9559,77 @@ const Settings = () => {
8907
9559
  return [" ", "· Renews", " ", memo(() => new Date(premiumState().expiresAt).toLocaleDateString())];
8908
9560
  }
8909
9561
  }), null);
8910
- _el$72.$$click = () => {
8911
- 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
+ }
8912
9571
  };
8913
- _el$73.$$click = async () => {
9572
+ _el$84.$$click = async () => {
8914
9573
  const state = await window.vessel.premium.reset();
8915
9574
  setPremiumState(state);
8916
9575
  setPremiumEmail("");
8917
9576
  resetPremiumActivationFlow();
8918
9577
  setPremiumMessage(null);
8919
9578
  };
8920
- 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;
8921
9599
  }
8922
9600
  }), null);
8923
- insert(_el$76, createComponent(Show, {
9601
+ insert(_el$87, createComponent(Show, {
8924
9602
  get when() {
8925
9603
  return !premiumActive();
8926
9604
  },
8927
9605
  get children() {
8928
- return _tmpl$14();
9606
+ return _tmpl$15();
8929
9607
  }
8930
9608
  }), null);
8931
- insert(_el$75, createComponent(Show, {
9609
+ insert(_el$86, createComponent(Show, {
8932
9610
  get when() {
8933
9611
  return premiumActive();
8934
9612
  },
8935
9613
  get fallback() {
8936
- return _tmpl$36();
9614
+ return _tmpl$40();
8937
9615
  },
8938
9616
  get children() {
8939
- return [_tmpl$15(), createComponent(Show, {
9617
+ return [_tmpl$16(), createComponent(Show, {
8940
9618
  get when() {
8941
9619
  return vaultEntries().length > 0;
8942
9620
  },
8943
9621
  get children() {
8944
- var _el$80 = _tmpl$16();
8945
- insert(_el$80, createComponent(For, {
9622
+ var _el$91 = _tmpl$5$1();
9623
+ insert(_el$91, createComponent(For, {
8946
9624
  get each() {
8947
9625
  return vaultEntries();
8948
9626
  },
8949
9627
  children: (entry) => (() => {
8950
- 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;
8951
- insert(_el$159, () => entry.label);
8952
- insert(_el$160, () => entry.username, _el$161);
8953
- insert(_el$160, () => entry.domainPattern, null);
8954
- 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, {
8955
9633
  get when() {
8956
9634
  return entry.useCount > 0;
8957
9635
  },
@@ -8959,43 +9637,43 @@ const Settings = () => {
8959
9637
  return [" ", "· Used ", memo(() => entry.useCount), "x"];
8960
9638
  }
8961
9639
  }), null);
8962
- _el$162.$$click = () => handleVaultRemove(entry.id);
8963
- return _el$157;
9640
+ _el$199.$$click = () => handleVaultRemove(entry.id);
9641
+ return _el$194;
8964
9642
  })()
8965
9643
  }));
8966
- return _el$80;
9644
+ return _el$91;
8967
9645
  }
8968
9646
  }), createComponent(Show, {
8969
9647
  get when() {
8970
9648
  return !vaultAdding();
8971
9649
  },
8972
9650
  get children() {
8973
- var _el$81 = _tmpl$17();
8974
- _el$81.$$click = () => {
9651
+ var _el$92 = _tmpl$17();
9652
+ _el$92.$$click = () => {
8975
9653
  setVaultAdding(true);
8976
9654
  setVaultMessage(null);
8977
9655
  };
8978
- return _el$81;
9656
+ return _el$92;
8979
9657
  }
8980
9658
  }), createComponent(Show, {
8981
9659
  get when() {
8982
9660
  return vaultAdding();
8983
9661
  },
8984
9662
  get children() {
8985
- 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;
8986
- _el$83.$$input = (e) => setVaultNewLabel(e.currentTarget.value);
8987
- setAttribute(_el$83, "spellcheck", false);
8988
- _el$84.$$input = (e) => setVaultNewDomain(e.currentTarget.value);
8989
- setAttribute(_el$84, "spellcheck", false);
8990
- _el$85.$$input = (e) => setVaultNewUsername(e.currentTarget.value);
8991
- setAttribute(_el$85, "spellcheck", false);
8992
- _el$86.$$input = (e) => setVaultNewPassword(e.currentTarget.value);
8993
- _el$87.$$input = (e) => setVaultNewTotp(e.currentTarget.value);
8994
- setAttribute(_el$87, "spellcheck", false);
8995
- _el$88.$$input = (e) => setVaultNewNotes(e.currentTarget.value);
8996
- setAttribute(_el$88, "spellcheck", false);
8997
- _el$90.$$click = handleVaultAdd;
8998
- _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 = () => {
8999
9677
  setVaultAdding(false);
9000
9678
  setVaultNewLabel("");
9001
9679
  setVaultNewDomain("");
@@ -9004,100 +9682,100 @@ const Settings = () => {
9004
9682
  setVaultNewTotp("");
9005
9683
  setVaultNewNotes("");
9006
9684
  };
9007
- createRenderEffect(() => _el$83.value = vaultNewLabel());
9008
- createRenderEffect(() => _el$84.value = vaultNewDomain());
9009
- createRenderEffect(() => _el$85.value = vaultNewUsername());
9010
- createRenderEffect(() => _el$86.value = vaultNewPassword());
9011
- createRenderEffect(() => _el$87.value = vaultNewTotp());
9012
- createRenderEffect(() => _el$88.value = vaultNewNotes());
9013
- 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;
9014
9692
  }
9015
9693
  }), createComponent(Show, {
9016
9694
  get when() {
9017
9695
  return vaultMessage();
9018
9696
  },
9019
9697
  children: (msg) => (() => {
9020
- var _el$163 = _tmpl$35();
9021
- insert(_el$163, () => msg().text);
9698
+ var _el$200 = _tmpl$39();
9699
+ insert(_el$200, () => msg().text);
9022
9700
  createRenderEffect((_p$) => {
9023
- var _v$12 = !!(msg().kind === "success"), _v$13 = !!(msg().kind === "error");
9024
- _v$12 !== _p$.e && _el$163.classList.toggle("success", _p$.e = _v$12);
9025
- _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);
9026
9704
  return _p$;
9027
9705
  }, {
9028
9706
  e: void 0,
9029
9707
  t: void 0
9030
9708
  });
9031
- return _el$163;
9709
+ return _el$200;
9032
9710
  })()
9033
9711
  })];
9034
9712
  }
9035
9713
  }), null);
9036
- insert(_el$93, createComponent(Show, {
9714
+ insert(_el$104, createComponent(Show, {
9037
9715
  get when() {
9038
9716
  return autofillProfiles().length > 0;
9039
9717
  },
9040
9718
  get children() {
9041
- var _el$96 = _tmpl$16();
9042
- insert(_el$96, createComponent(For, {
9719
+ var _el$107 = _tmpl$5$1();
9720
+ insert(_el$107, createComponent(For, {
9043
9721
  get each() {
9044
9722
  return autofillProfiles();
9045
9723
  },
9046
9724
  children: (profile) => (() => {
9047
- 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;
9048
- insert(_el$166, () => profile.label);
9049
- insert(_el$167, () => profile.firstName, null);
9050
- 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, (() => {
9051
9729
  var _c$2 = memo(() => !!profile.lastName);
9052
9730
  return () => _c$2() ? ` ${profile.lastName}` : "";
9053
9731
  })(), null);
9054
- insert(_el$167, (() => {
9732
+ insert(_el$204, (() => {
9055
9733
  var _c$3 = memo(() => !!profile.email);
9056
9734
  return () => _c$3() ? ` · ${profile.email}` : "";
9057
9735
  })(), null);
9058
- _el$169.$$click = () => handleAutofillFill(profile.id);
9059
- _el$170.$$click = () => handleAutofillRemove(profile.id);
9060
- return _el$164;
9736
+ _el$206.$$click = () => handleAutofillFill(profile.id);
9737
+ _el$207.$$click = () => handleAutofillRemove(profile.id);
9738
+ return _el$201;
9061
9739
  })()
9062
9740
  }));
9063
- return _el$96;
9741
+ return _el$107;
9064
9742
  }
9065
9743
  }), null);
9066
- insert(_el$93, createComponent(Show, {
9744
+ insert(_el$104, createComponent(Show, {
9067
9745
  get when() {
9068
9746
  return !autofillAdding();
9069
9747
  },
9070
9748
  get children() {
9071
- var _el$97 = _tmpl$19();
9072
- _el$97.$$click = () => {
9749
+ var _el$108 = _tmpl$19();
9750
+ _el$108.$$click = () => {
9073
9751
  setAutofillAdding(true);
9074
9752
  setAutofillMessage(null);
9075
9753
  };
9076
- return _el$97;
9754
+ return _el$108;
9077
9755
  }
9078
9756
  }), null);
9079
- insert(_el$93, createComponent(Show, {
9757
+ insert(_el$104, createComponent(Show, {
9080
9758
  get when() {
9081
9759
  return autofillAdding();
9082
9760
  },
9083
9761
  get children() {
9084
- 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;
9085
- _el$99.$$input = (e) => setAutofillLabel(e.currentTarget.value);
9086
- setAttribute(_el$99, "spellcheck", false);
9087
- _el$101.$$input = (e) => setAutofillFirstName(e.currentTarget.value);
9088
- _el$102.$$input = (e) => setAutofillLastName(e.currentTarget.value);
9089
- _el$104.$$input = (e) => setAutofillEmail(e.currentTarget.value);
9090
- setAttribute(_el$104, "spellcheck", false);
9091
- _el$105.$$input = (e) => setAutofillPhone(e.currentTarget.value);
9092
- _el$106.$$input = (e) => setAutofillOrg(e.currentTarget.value);
9093
- _el$107.$$input = (e) => setAutofillAddr1(e.currentTarget.value);
9094
- _el$108.$$input = (e) => setAutofillAddr2(e.currentTarget.value);
9095
- _el$110.$$input = (e) => setAutofillCity(e.currentTarget.value);
9096
- _el$111.$$input = (e) => setAutofillState(e.currentTarget.value);
9097
- _el$112.$$input = (e) => setAutofillZip(e.currentTarget.value);
9098
- _el$113.$$input = (e) => setAutofillCountry(e.currentTarget.value);
9099
- _el$115.$$click = handleAutofillAdd;
9100
- _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 = () => {
9101
9779
  setAutofillAdding(false);
9102
9780
  setAutofillLabel("");
9103
9781
  setAutofillFirstName("");
@@ -9112,73 +9790,103 @@ const Settings = () => {
9112
9790
  setAutofillZip("");
9113
9791
  setAutofillCountry("");
9114
9792
  };
9115
- createRenderEffect(() => _el$99.value = autofillLabel());
9116
- createRenderEffect(() => _el$101.value = autofillFirstName());
9117
- createRenderEffect(() => _el$102.value = autofillLastName());
9118
- createRenderEffect(() => _el$104.value = autofillEmail());
9119
- createRenderEffect(() => _el$105.value = autofillPhone());
9120
- createRenderEffect(() => _el$106.value = autofillOrg());
9121
- createRenderEffect(() => _el$107.value = autofillAddr1());
9122
- createRenderEffect(() => _el$108.value = autofillAddr2());
9123
- createRenderEffect(() => _el$110.value = autofillCity());
9124
- createRenderEffect(() => _el$111.value = autofillState());
9125
- createRenderEffect(() => _el$112.value = autofillZip());
9126
- createRenderEffect(() => _el$113.value = autofillCountry());
9127
- 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;
9128
9806
  }
9129
9807
  }), null);
9130
- insert(_el$93, createComponent(Show, {
9808
+ insert(_el$104, createComponent(Show, {
9131
9809
  get when() {
9132
9810
  return autofillMessage();
9133
9811
  },
9134
9812
  children: (msg) => (() => {
9135
- var _el$171 = _tmpl$35();
9136
- insert(_el$171, () => msg().text);
9813
+ var _el$208 = _tmpl$39();
9814
+ insert(_el$208, () => msg().text);
9137
9815
  createRenderEffect((_p$) => {
9138
- var _v$14 = !!(msg().kind === "success"), _v$15 = !!(msg().kind === "error");
9139
- _v$14 !== _p$.e && _el$171.classList.toggle("success", _p$.e = _v$14);
9140
- _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);
9141
9819
  return _p$;
9142
9820
  }, {
9143
9821
  e: void 0,
9144
9822
  t: void 0
9145
9823
  });
9146
- return _el$171;
9824
+ return _el$208;
9147
9825
  })()
9148
9826
  }), null);
9149
- _el$120.$$click = () => setTelemetryEnabled(!telemetryEnabled());
9150
- _el$122.$$click = handleSave;
9151
- 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);
9152
9859
  insert(_el$2, createComponent(Show, {
9153
9860
  get when() {
9154
9861
  return status();
9155
9862
  },
9156
9863
  children: (currentStatus) => (() => {
9157
- var _el$172 = _tmpl$35();
9158
- insert(_el$172, () => currentStatus().text);
9864
+ var _el$209 = _tmpl$39();
9865
+ insert(_el$209, () => currentStatus().text);
9159
9866
  createRenderEffect((_p$) => {
9160
- var _v$16 = !!(currentStatus().kind === "success"), _v$17 = !!(currentStatus().kind === "error");
9161
- _v$16 !== _p$.e && _el$172.classList.toggle("success", _p$.e = _v$16);
9162
- _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);
9163
9870
  return _p$;
9164
9871
  }, {
9165
9872
  e: void 0,
9166
9873
  t: void 0
9167
9874
  });
9168
- return _el$172;
9875
+ return _el$209;
9169
9876
  })()
9170
9877
  }), null);
9171
9878
  createRenderEffect((_p$) => {
9172
- 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();
9173
9880
  _v$ !== _p$.e && _el$.classList.toggle("closing", _p$.e = _v$);
9174
- _v$2 !== _p$.t && _el$36.classList.toggle("on", _p$.t = _v$2);
9175
- _v$3 !== _p$.a && setAttribute(_el$36, "aria-checked", _p$.a = _v$3);
9176
- _v$4 !== _p$.o && _el$39.classList.toggle("on", _p$.o = _v$4);
9177
- _v$5 !== _p$.i && setAttribute(_el$39, "aria-checked", _p$.i = _v$5);
9178
- _v$6 !== _p$.n && _el$43.classList.toggle("on", _p$.n = _v$6);
9179
- _v$7 !== _p$.s && setAttribute(_el$43, "aria-checked", _p$.s = _v$7);
9180
- _v$8 !== _p$.h && _el$120.classList.toggle("on", _p$.h = _v$8);
9181
- _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);
9182
9890
  return _p$;
9183
9891
  }, {
9184
9892
  e: void 0,
@@ -9189,14 +9897,19 @@ const Settings = () => {
9189
9897
  n: void 0,
9190
9898
  s: void 0,
9191
9899
  h: void 0,
9192
- r: void 0
9900
+ r: void 0,
9901
+ d: void 0
9193
9902
  });
9194
9903
  createRenderEffect(() => _el$20.value = defaultUrl());
9195
- createRenderEffect(() => _el$23.value = mcpPort());
9196
- createRenderEffect(() => _el$30.value = obsidianVaultPath());
9197
- 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());
9198
9911
  return _el$;
9199
- })(), _tmpl$22()];
9912
+ })(), _tmpl$25()];
9200
9913
  }
9201
9914
  });
9202
9915
  };
@@ -9403,6 +10116,13 @@ function setupKeybindings(handlers) {
9403
10116
  return () => document.removeEventListener("keydown", listener);
9404
10117
  }
9405
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
+ }
9406
10126
  const App = () => {
9407
10127
  const view = new URLSearchParams(window.location.search).get("view") || "chrome";
9408
10128
  const {
@@ -9446,7 +10166,18 @@ const App = () => {
9446
10166
  });
9447
10167
  }
9448
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
+ };
9449
10178
  onMount(() => {
10179
+ void applyTheme();
10180
+ window.vessel.ui.rendererReady(view);
9450
10181
  if (view !== "chrome") return;
9451
10182
  const cleanupKeys = setupKeybindings({
9452
10183
  openCommandBar,
@@ -9465,9 +10196,13 @@ const App = () => {
9465
10196
  toggleKeyboardHelp: () => setKeyboardHelpOpen((v) => !v)
9466
10197
  });
9467
10198
  const cleanupCapture = window.vessel.highlights.onCaptureResult(showHighlightResult);
10199
+ const cleanupSettings = window.vessel.settings.onUpdate(() => {
10200
+ void applyTheme();
10201
+ });
9468
10202
  onCleanup(() => {
9469
10203
  cleanupKeys();
9470
10204
  cleanupCapture();
10205
+ cleanupSettings();
9471
10206
  });
9472
10207
  });
9473
10208
  if (view === "sidebar") {
@@ -9487,6 +10222,9 @@ const App = () => {
9487
10222
  },
9488
10223
  onDismiss: () => setHighlightToast(null)
9489
10224
  }), _el$2);
10225
+ insert(_el$, createComponent(DownloadToast, {}), _el$2);
10226
+ insert(_el$, createComponent(FindBar, {}), _el$2);
10227
+ insert(_el$, createComponent(FlowProgress, {}), _el$2);
9490
10228
  insert(_el$, createComponent(AgentTranscriptDock, {}), _el$2);
9491
10229
  insert(_el$2, createComponent(TitleBar, {}), null);
9492
10230
  insert(_el$2, createComponent(TabBar, {}), null);