@quanta-intellect/vessel-browser 0.1.95 → 0.1.99

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.
@@ -1466,7 +1466,7 @@ function Dynamic(props) {
1466
1466
  const [, others] = splitProps(props, ["component"]);
1467
1467
  return createDynamic(() => props.component, others);
1468
1468
  }
1469
- var _tmpl$$q = /* @__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=Downloads>↓</button><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>`);
1469
+ var _tmpl$$r = /* @__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=Downloads>↓</button><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>`);
1470
1470
  const TitleBar = (props) => {
1471
1471
  const isPrivateWindow = new URLSearchParams(window.location.search).get("private") === "1";
1472
1472
  const [mcpStatus, setMcpStatus] = createSignal("starting");
@@ -1499,7 +1499,7 @@ const TitleBar = (props) => {
1499
1499
  window.vessel.ui.setSettingsVisibility(true);
1500
1500
  };
1501
1501
  return (() => {
1502
- var _el$ = _tmpl$$q(), _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, _el$9 = _el$8.nextSibling;
1502
+ var _el$ = _tmpl$$r(), _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, _el$9 = _el$8.nextSibling;
1503
1503
  _el$4.$$click = handleMcpClick;
1504
1504
  _el$6.$$click = () => props.onOpenDownloads?.();
1505
1505
  _el$7.$$click = () => window.vessel.window.minimize();
@@ -1541,7 +1541,7 @@ var LucideContext = createContext({
1541
1541
  absoluteStrokeWidth: false,
1542
1542
  class: ""
1543
1543
  });
1544
- var _tmpl$$p = /* @__PURE__ */ template(`<svg>`);
1544
+ var _tmpl$$q = /* @__PURE__ */ template(`<svg>`);
1545
1545
  var hasA11yProp = (props) => {
1546
1546
  for (const prop in props) {
1547
1547
  if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
@@ -1563,7 +1563,7 @@ var Icon = (props) => {
1563
1563
  const [localProps, rest] = splitProps(props, ["color", "size", "strokeWidth", "children", "class", "name", "iconNode", "absoluteStrokeWidth"]);
1564
1564
  const globalProps = useContext(LucideContext);
1565
1565
  return (() => {
1566
- var _el$ = _tmpl$$p();
1566
+ var _el$ = _tmpl$$q();
1567
1567
  spread(_el$, mergeProps(defaultAttributes_default, {
1568
1568
  get width() {
1569
1569
  return localProps.size ?? globalProps.size ?? defaultAttributes_default.width;
@@ -2032,7 +2032,7 @@ function useSecurity() {
2032
2032
  const logger$5 = createLogger("TabsStore");
2033
2033
  const [tabs, setTabs] = createSignal([]);
2034
2034
  const [activeTabId, setActiveTabId] = createSignal("");
2035
- let initialized$4 = false;
2035
+ let initialized$5 = false;
2036
2036
  let initPromise$3 = null;
2037
2037
  let unsubscribeStateUpdate = null;
2038
2038
  async function doInit() {
@@ -2048,19 +2048,19 @@ async function doInit() {
2048
2048
  pruneSecurityStates(new Set(newTabs.map((t) => t.id)));
2049
2049
  }
2050
2050
  );
2051
- const initialState = await window.vessel.tabs.getState();
2052
- setTabs(initialState.tabs);
2053
- setActiveTabId(initialState.activeId);
2051
+ const initialState2 = await window.vessel.tabs.getState();
2052
+ setTabs(initialState2.tabs);
2053
+ setActiveTabId(initialState2.activeId);
2054
2054
  } catch (error) {
2055
- initialized$4 = false;
2055
+ initialized$5 = false;
2056
2056
  logger$5.error("Failed to initialize tabs store:", error);
2057
2057
  throw error;
2058
2058
  }
2059
2059
  }
2060
- function init$4() {
2060
+ function init$5() {
2061
2061
  if (initPromise$3) return initPromise$3;
2062
- if (initialized$4) return;
2063
- initialized$4 = true;
2062
+ if (initialized$5) return;
2063
+ initialized$5 = true;
2064
2064
  initPromise$3 = doInit().finally(() => {
2065
2065
  initPromise$3 = null;
2066
2066
  });
@@ -2072,7 +2072,7 @@ const patchTab = (id, patch) => {
2072
2072
  );
2073
2073
  };
2074
2074
  function useTabs() {
2075
- init$4();
2075
+ init$5();
2076
2076
  return {
2077
2077
  tabs,
2078
2078
  activeTabId,
@@ -2150,12 +2150,12 @@ const DEFAULT_RUNTIME_STATE = {
2150
2150
  const [runtimeState, setRuntimeState] = createSignal(
2151
2151
  DEFAULT_RUNTIME_STATE
2152
2152
  );
2153
- let initialized$3 = false;
2153
+ let initialized$4 = false;
2154
2154
  let initPromise$2 = null;
2155
- async function init$3() {
2155
+ async function init$4() {
2156
2156
  if (initPromise$2) return initPromise$2;
2157
- if (initialized$3) return;
2158
- initialized$3 = true;
2157
+ if (initialized$4) return;
2158
+ initialized$4 = true;
2159
2159
  initPromise$2 = (async () => {
2160
2160
  try {
2161
2161
  const initial = await window.vessel.ai.getRuntime();
@@ -2164,7 +2164,7 @@ async function init$3() {
2164
2164
  setRuntimeState(state);
2165
2165
  });
2166
2166
  } catch (error) {
2167
- initialized$3 = false;
2167
+ initialized$4 = false;
2168
2168
  logger$4.error("Failed to initialize runtime store:", error);
2169
2169
  } finally {
2170
2170
  initPromise$2 = null;
@@ -2173,7 +2173,7 @@ async function init$3() {
2173
2173
  return initPromise$2;
2174
2174
  }
2175
2175
  function useRuntime() {
2176
- void init$3();
2176
+ void init$4();
2177
2177
  return {
2178
2178
  runtimeState,
2179
2179
  pause: () => window.vessel.ai.pause(),
@@ -2190,6 +2190,7 @@ function useRuntime() {
2190
2190
  }
2191
2191
  const AGENT_ACTIVITY_WINDOW_MS = 6e3;
2192
2192
  const AGENT_RECENT_WINDOW_MS = 3e4;
2193
+ const AGENT_RUNNING_STALE_WINDOW_MS = 5 * 6e4;
2193
2194
  function isAgentActionSource(source) {
2194
2195
  return source === "ai" || source === "mcp";
2195
2196
  }
@@ -2229,9 +2230,14 @@ function summarizeActionText(action) {
2229
2230
  }
2230
2231
  function isAgentActionActive(action, currentTime) {
2231
2232
  if (!isAgentActionSource(action.source)) return false;
2232
- if (action.status === "running" || action.status === "waiting-approval") {
2233
+ if (action.status === "waiting-approval") {
2233
2234
  return true;
2234
2235
  }
2236
+ if (action.status === "running") {
2237
+ const startedAt = new Date(action.startedAt).getTime();
2238
+ if (Number.isNaN(startedAt)) return false;
2239
+ return currentTime - startedAt < AGENT_RUNNING_STALE_WINDOW_MS;
2240
+ }
2235
2241
  if (action.status !== "completed" || !action.finishedAt) {
2236
2242
  return false;
2237
2243
  }
@@ -2274,8 +2280,7 @@ function getLatestAgentStatusMessage(state, currentTime = Date.now()) {
2274
2280
  function hasRecentActivity(state, windowMs, currentTime) {
2275
2281
  for (const action of state.actions) {
2276
2282
  if (!isAgentActionSource(action.source)) continue;
2277
- if (action.status === "running" || action.status === "waiting-approval")
2278
- return true;
2283
+ if (isAgentActionActive(action, currentTime)) return true;
2279
2284
  const ts = action.finishedAt ? new Date(action.finishedAt).getTime() : new Date(action.startedAt).getTime();
2280
2285
  if (!Number.isNaN(ts) && currentTime - ts < windowMs) return true;
2281
2286
  }
@@ -2296,7 +2301,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
2296
2301
  }
2297
2302
  return "idle";
2298
2303
  }
2299
- var _tmpl$$o = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$n = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list></div><div class=tab-actions><button class=tab-new data-tooltip="New window"data-tooltip-pos=left></button><button class=tab-new data-tooltip="Add active tab to group"data-tooltip-pos=left></button><button class=tab-new data-tooltip="New tab"data-tooltip-pos=left></button><button class="tab-new tab-new-private"data-tooltip="Private window"data-tooltip-pos=left><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11z">`), _tmpl$4$k = /* @__PURE__ */ template(`<button><span class=tab-group-dot></span><span class=tab-group-name></span><span class=tab-group-count>`), _tmpl$5$h = /* @__PURE__ */ template(`<button class="tab-audio tab-audio-pinned">`), _tmpl$6$f = /* @__PURE__ */ template(`<div role=tab>`), _tmpl$7$c = /* @__PURE__ */ template(`<span class=tab-title>`), _tmpl$8$9 = /* @__PURE__ */ template(`<button class=tab-audio>`), _tmpl$9$7 = /* @__PURE__ */ template(`<button class=tab-close>×`), _tmpl$0$6 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$1$6 = /* @__PURE__ */ template(`<span class=tab-loading>`);
2304
+ var _tmpl$$p = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$o = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$l = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list></div><div class=tab-actions><button class=tab-new data-tooltip="New window"data-tooltip-pos=left></button><button class=tab-new data-tooltip="Add active tab to group"data-tooltip-pos=left></button><button class=tab-new data-tooltip="New tab"data-tooltip-pos=left></button><button class="tab-new tab-new-private"data-tooltip="Private window"data-tooltip-pos=left><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11z">`), _tmpl$4$l = /* @__PURE__ */ template(`<button><span class=tab-group-dot></span><span class=tab-group-name></span><span class=tab-group-count>`), _tmpl$5$i = /* @__PURE__ */ template(`<button class="tab-audio tab-audio-pinned">`), _tmpl$6$g = /* @__PURE__ */ template(`<div role=tab>`), _tmpl$7$d = /* @__PURE__ */ template(`<span class=tab-title>`), _tmpl$8$a = /* @__PURE__ */ template(`<button class=tab-audio>`), _tmpl$9$8 = /* @__PURE__ */ template(`<button class=tab-close>×`), _tmpl$0$7 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$1$7 = /* @__PURE__ */ template(`<span class=tab-loading>`);
2300
2305
  const TAB_CLOSE_MS = 200;
2301
2306
  function stringToHue(str) {
2302
2307
  let hash = 0;
@@ -2323,14 +2328,14 @@ const TabFavicon = (props) => {
2323
2328
  },
2324
2329
  get fallback() {
2325
2330
  return (() => {
2326
- var _el$2 = _tmpl$2$n();
2331
+ var _el$2 = _tmpl$2$o();
2327
2332
  insert(_el$2, letter);
2328
2333
  createRenderEffect((_$p) => setStyleProperty(_el$2, "--favicon-hue", `${hue()}`));
2329
2334
  return _el$2;
2330
2335
  })();
2331
2336
  },
2332
2337
  get children() {
2333
- var _el$ = _tmpl$$o();
2338
+ var _el$ = _tmpl$$p();
2334
2339
  _el$.addEventListener("error", () => setFailed(true));
2335
2340
  createRenderEffect(() => setAttribute(_el$, "src", props.favicon));
2336
2341
  return _el$;
@@ -2390,7 +2395,7 @@ const TabBar = () => {
2390
2395
  }, TAB_CLOSE_MS);
2391
2396
  };
2392
2397
  return (() => {
2393
- var _el$3 = _tmpl$3$k(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling;
2398
+ var _el$3 = _tmpl$3$l(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling;
2394
2399
  insert(_el$4, createComponent(For, {
2395
2400
  get each() {
2396
2401
  return tabEntries();
@@ -2401,7 +2406,7 @@ const TabBar = () => {
2401
2406
  },
2402
2407
  get fallback() {
2403
2408
  return memo(() => entry.type === "group")() && (() => {
2404
- var _el$0 = _tmpl$4$k(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
2409
+ var _el$0 = _tmpl$4$l(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
2405
2410
  _el$0.$$contextmenu = (e) => {
2406
2411
  e.preventDefault();
2407
2412
  window.vessel.tabs.showGroupContextMenu(entry.groupId);
@@ -2427,7 +2432,7 @@ const TabBar = () => {
2427
2432
  return memo(() => entry.type === "tab")() && (() => {
2428
2433
  const tab = entry.tab;
2429
2434
  return (() => {
2430
- var _el$12 = _tmpl$6$f();
2435
+ var _el$12 = _tmpl$6$g();
2431
2436
  _el$12.$$contextmenu = (e) => {
2432
2437
  e.preventDefault();
2433
2438
  window.vessel.tabs.showContextMenu(tab.id);
@@ -2452,7 +2457,7 @@ const TabBar = () => {
2452
2457
  return memo(() => !!tab.isPinned)() && (tab.isAudible || tab.isMuted);
2453
2458
  },
2454
2459
  get children() {
2455
- var _el$13 = _tmpl$5$h();
2460
+ var _el$13 = _tmpl$5$i();
2456
2461
  _el$13.$$click = (e) => {
2457
2462
  e.stopPropagation();
2458
2463
  void toggleMute(tab.id);
@@ -2478,8 +2483,8 @@ const TabBar = () => {
2478
2483
  }), null);
2479
2484
  insert(_el$12, (() => {
2480
2485
  var _c$ = memo(() => !!!tab.isPinned);
2481
- return () => _c$() && [memo(() => memo(() => !!modelActiveTabIds().has(tab.id))() && _tmpl$0$6()), (() => {
2482
- var _el$14 = _tmpl$7$c();
2486
+ return () => _c$() && [memo(() => memo(() => !!modelActiveTabIds().has(tab.id))() && _tmpl$0$7()), (() => {
2487
+ var _el$14 = _tmpl$7$d();
2483
2488
  insert(_el$14, () => tab.title || "New Tab");
2484
2489
  return _el$14;
2485
2490
  })(), createComponent(Show, {
@@ -2487,7 +2492,7 @@ const TabBar = () => {
2487
2492
  return tab.isAudible || tab.isMuted;
2488
2493
  },
2489
2494
  get children() {
2490
- var _el$15 = _tmpl$8$9();
2495
+ var _el$15 = _tmpl$8$a();
2491
2496
  _el$15.$$click = (e) => {
2492
2497
  e.stopPropagation();
2493
2498
  void toggleMute(tab.id);
@@ -2510,8 +2515,8 @@ const TabBar = () => {
2510
2515
  createRenderEffect(() => setAttribute(_el$15, "title", tab.isMuted ? "Unmute tab" : "Mute tab"));
2511
2516
  return _el$15;
2512
2517
  }
2513
- }), memo(() => memo(() => !!tab.isLoading)() && _tmpl$1$6()), (() => {
2514
- var _el$16 = _tmpl$9$7();
2518
+ }), memo(() => memo(() => !!tab.isLoading)() && _tmpl$1$7()), (() => {
2519
+ var _el$16 = _tmpl$9$8();
2515
2520
  _el$16.$$click = (e) => {
2516
2521
  e.stopPropagation();
2517
2522
  handleClose(tab.id);
@@ -2556,7 +2561,7 @@ const TabBar = () => {
2556
2561
  })();
2557
2562
  };
2558
2563
  delegateEvents(["click", "contextmenu"]);
2559
- var _tmpl$$n = /* @__PURE__ */ template(`<button class=security-popup-link>Reset permissions for this site`), _tmpl$2$m = /* @__PURE__ */ template(`<div class=security-popup><div class=security-popup-content><p class=security-popup-text></p><button class=security-popup-link>Learn More</button><div class=security-popup-section><div class=security-popup-section-title>Site permissions`), _tmpl$3$j = /* @__PURE__ */ template(`<p class=security-popup-muted>No saved permission decisions for this site.`), _tmpl$4$j = /* @__PURE__ */ template(`<div class=security-popup-permission-row><span></span><strong>`), _tmpl$5$g = /* @__PURE__ */ template(`<div class=security-popup-actions><button class=security-popup-action-proceed>Proceed Anyway</button><button class=security-popup-action-back>Go Back to Safety`);
2564
+ var _tmpl$$o = /* @__PURE__ */ template(`<button class=security-popup-link>Reset permissions for this site`), _tmpl$2$n = /* @__PURE__ */ template(`<div class=security-popup><div class=security-popup-content><p class=security-popup-text></p><button class=security-popup-link>Learn More</button><div class=security-popup-section><div class=security-popup-section-title>Site permissions`), _tmpl$3$k = /* @__PURE__ */ template(`<p class=security-popup-muted>No saved permission decisions for this site.`), _tmpl$4$k = /* @__PURE__ */ template(`<div class=security-popup-permission-row><span></span><strong>`), _tmpl$5$h = /* @__PURE__ */ template(`<div class=security-popup-actions><button class=security-popup-action-proceed>Proceed Anyway</button><button class=security-popup-action-back>Go Back to Safety`);
2560
2565
  const SecurityPopup = (props) => {
2561
2566
  const statusText = () => {
2562
2567
  switch (props.state.status) {
@@ -2609,7 +2614,7 @@ const SecurityPopup = (props) => {
2609
2614
  onCleanup(() => document.removeEventListener("click", handleClickOutside, true));
2610
2615
  });
2611
2616
  return (() => {
2612
- var _el$ = _tmpl$2$m(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
2617
+ var _el$ = _tmpl$2$n(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
2613
2618
  _el$5.firstChild;
2614
2619
  _el$.$$click = (e) => e.stopPropagation();
2615
2620
  insert(_el$3, statusText);
@@ -2619,7 +2624,7 @@ const SecurityPopup = (props) => {
2619
2624
  return sitePermissions().length > 0;
2620
2625
  },
2621
2626
  get fallback() {
2622
- return _tmpl$3$j();
2627
+ return _tmpl$3$k();
2623
2628
  },
2624
2629
  get children() {
2625
2630
  return [createComponent(For, {
@@ -2627,14 +2632,14 @@ const SecurityPopup = (props) => {
2627
2632
  return sitePermissions();
2628
2633
  },
2629
2634
  children: (item) => (() => {
2630
- var _el$9 = _tmpl$4$j(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
2635
+ var _el$9 = _tmpl$4$k(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
2631
2636
  insert(_el$0, () => item.permission);
2632
2637
  insert(_el$1, () => item.decision);
2633
2638
  createRenderEffect(() => className(_el$1, item.decision));
2634
2639
  return _el$9;
2635
2640
  })()
2636
2641
  }), (() => {
2637
- var _el$7 = _tmpl$$n();
2642
+ var _el$7 = _tmpl$$o();
2638
2643
  _el$7.$$click = async () => {
2639
2644
  await window.vessel.permissions.clearOrigin(origin());
2640
2645
  await loadPermissions();
@@ -2646,7 +2651,7 @@ const SecurityPopup = (props) => {
2646
2651
  insert(_el$2, (() => {
2647
2652
  var _c$ = memo(() => !!props.state.canProceed);
2648
2653
  return () => _c$() && (() => {
2649
- var _el$10 = _tmpl$5$g(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling;
2654
+ var _el$10 = _tmpl$5$h(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling;
2650
2655
  _el$11.$$click = handleProceedAnyway;
2651
2656
  _el$12.$$click = handleGoBackToSafety;
2652
2657
  return _el$10;
@@ -2730,19 +2735,19 @@ function useUI() {
2730
2735
  const logger$3 = createLogger("HistoryStore");
2731
2736
  const INITIAL$1 = { entries: [] };
2732
2737
  const [historyState, setHistoryState] = createSignal(INITIAL$1);
2733
- let initialized$2 = false;
2738
+ let initialized$3 = false;
2734
2739
  let initPromise$1 = null;
2735
- async function init$2() {
2740
+ async function init$3() {
2736
2741
  if (initPromise$1) return initPromise$1;
2737
- if (initialized$2) return;
2738
- initialized$2 = true;
2742
+ if (initialized$3) return;
2743
+ initialized$3 = true;
2739
2744
  initPromise$1 = (async () => {
2740
2745
  try {
2741
2746
  const state = await window.vessel.history.get();
2742
2747
  setHistoryState(state);
2743
2748
  window.vessel.history.onUpdate((s) => setHistoryState(s));
2744
2749
  } catch (error) {
2745
- initialized$2 = false;
2750
+ initialized$3 = false;
2746
2751
  logger$3.error("Failed to initialize history store:", error);
2747
2752
  } finally {
2748
2753
  initPromise$1 = null;
@@ -2751,7 +2756,7 @@ async function init$2() {
2751
2756
  return initPromise$1;
2752
2757
  }
2753
2758
  function useHistory() {
2754
- void init$2();
2759
+ void init$3();
2755
2760
  return {
2756
2761
  historyState,
2757
2762
  search: (query) => window.vessel.history.search(query),
@@ -2761,19 +2766,19 @@ function useHistory() {
2761
2766
  const logger$2 = createLogger("BookmarksStore");
2762
2767
  const INITIAL = { folders: [], bookmarks: [] };
2763
2768
  const [bookmarksState, setBookmarksState] = createSignal(INITIAL);
2764
- let initialized$1 = false;
2769
+ let initialized$2 = false;
2765
2770
  let initPromise = null;
2766
- async function init$1() {
2771
+ async function init$2() {
2767
2772
  if (initPromise) return initPromise;
2768
- if (initialized$1) return;
2769
- initialized$1 = true;
2773
+ if (initialized$2) return;
2774
+ initialized$2 = true;
2770
2775
  initPromise = (async () => {
2771
2776
  try {
2772
2777
  const state = await window.vessel.bookmarks.get();
2773
2778
  setBookmarksState(state);
2774
2779
  window.vessel.bookmarks.onUpdate((s) => setBookmarksState(s));
2775
2780
  } catch (error) {
2776
- initialized$1 = false;
2781
+ initialized$2 = false;
2777
2782
  logger$2.error("Failed to initialize bookmarks store:", error);
2778
2783
  } finally {
2779
2784
  initPromise = null;
@@ -2782,7 +2787,7 @@ async function init$1() {
2782
2787
  return initPromise;
2783
2788
  }
2784
2789
  function useBookmarks() {
2785
- void init$1();
2790
+ void init$2();
2786
2791
  return {
2787
2792
  bookmarksState,
2788
2793
  saveBookmark: (url, title, folderId, note, intent, expectedContent, keyFields, agentHints) => window.vessel.bookmarks.saveBookmark(
@@ -2998,7 +3003,7 @@ const SEARCH_ENGINE_PRESETS = {
2998
3003
  ecosia: { label: "Ecosia", url: "https://www.ecosia.org/search?q=" },
2999
3004
  kagi: { label: "Kagi", url: "https://kagi.com/search?q=" }
3000
3005
  };
3001
- var _tmpl$$m = /* @__PURE__ */ template(`<div class=private-badge title="Private Browsing - history and cookies are not saved"><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11zM5.5 7a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm3.5 3.5c0-1-1.5-2-2.5-2s-2.5 1-2.5 2"></path></svg><span>Private`), _tmpl$2$l = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z">`), _tmpl$3$i = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.5>`), _tmpl$4$i = /* @__PURE__ */ template(`<div class=security-indicator-wrapper><button>`), _tmpl$5$f = /* @__PURE__ */ template(`<div id=address-autocomplete class=autocomplete-dropdown role=listbox>`), _tmpl$6$e = /* @__PURE__ */ template(`<div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text>`), _tmpl$7$b = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Open the What Changed timeline"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>What Changed?`), _tmpl$8$8 = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$9$6 = /* @__PURE__ */ template(`<div class=page-diff-burst-history><div class=page-diff-burst-history-label>Recent detections`), _tmpl$0$5 = /* @__PURE__ */ template(`<div class=page-diff-popup><div class=page-diff-popup-header><div class=page-diff-popup-header-copy><span>Compared with your last visit</span><span class=page-diff-burst-meta>Previous snapshot from </span></div><div style=display:flex;gap:8px;align-items:center><button class=nav-btn title="Open the full What Changed timeline"style="height:24px;min-width:auto;padding:0 8px">Timeline</button><button class=page-diff-popup-close>&times;`), _tmpl$1$5 = /* @__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$10$5 = /* @__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$11$5 = /* @__PURE__ */ template(`<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>`), _tmpl$12$5 = /* @__PURE__ */ template(`<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>`), _tmpl$13$4 = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$14$4 = /* @__PURE__ */ template(`<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>`), _tmpl$15$4 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Clear Data">`), _tmpl$16$3 = /* @__PURE__ */ template(`<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$17$3 = /* @__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"autocomplete=off aria-autocomplete=list aria-controls=address-autocomplete></form></div><div class=toolbar-actions><button class=nav-btn><svg width=14 height=14 viewBox="0 0 14 14">`), _tmpl$18$3 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><circle cx=7 cy=8 r=0.8 fill=white>`), _tmpl$19$3 = /* @__PURE__ */ template(`<div role=option><span class=autocomplete-icon></span><span class=autocomplete-text><span class=autocomplete-title></span><span class=autocomplete-url>`), _tmpl$20$3 = /* @__PURE__ */ template(`<div class=page-diff-burst-row><span class=page-diff-burst-time></span><span class=page-diff-burst-summary>`), _tmpl$21$3 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-section>`), _tmpl$22$3 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-part><span>`), _tmpl$23$3 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>Before</span><span class=page-diff-snippet-text>`), _tmpl$24$3 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>After</span><span class=page-diff-snippet-text>`), _tmpl$25$3 = /* @__PURE__ */ template(`<div class=page-diff-snippets>`), _tmpl$26$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Added</span><ul class=page-diff-list>`), _tmpl$27$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Removed</span><ul class=page-diff-list>`), _tmpl$28$3 = /* @__PURE__ */ template(`<div><div class=page-diff-item-header><div class=page-diff-badges><span class=page-diff-kind></span><span class=page-diff-section></span></div><span class=page-diff-summary>`), _tmpl$29$2 = /* @__PURE__ */ template(`<li>`);
3006
+ var _tmpl$$n = /* @__PURE__ */ template(`<div class=private-badge title="Private Browsing - history and cookies are not saved"><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11zM5.5 7a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm3.5 3.5c0-1-1.5-2-2.5-2s-2.5 1-2.5 2"></path></svg><span>Private`), _tmpl$2$m = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z">`), _tmpl$3$j = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.5>`), _tmpl$4$j = /* @__PURE__ */ template(`<div class=security-indicator-wrapper><button>`), _tmpl$5$g = /* @__PURE__ */ template(`<div id=address-autocomplete class=autocomplete-dropdown role=listbox>`), _tmpl$6$f = /* @__PURE__ */ template(`<div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text>`), _tmpl$7$c = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Open the What Changed timeline"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>What Changed?`), _tmpl$8$9 = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$9$7 = /* @__PURE__ */ template(`<div class=page-diff-burst-history><div class=page-diff-burst-history-label>Recent detections`), _tmpl$0$6 = /* @__PURE__ */ template(`<div class=page-diff-popup><div class=page-diff-popup-header><div class=page-diff-popup-header-copy><span>Compared with your last visit</span><span class=page-diff-burst-meta>Previous snapshot from </span></div><div style=display:flex;gap:8px;align-items:center><button class=nav-btn title="Open the full What Changed timeline"style="height:24px;min-width:auto;padding:0 8px">Timeline</button><button class=page-diff-popup-close>&times;`), _tmpl$1$6 = /* @__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$10$6 = /* @__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$11$6 = /* @__PURE__ */ template(`<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>`), _tmpl$12$6 = /* @__PURE__ */ template(`<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>`), _tmpl$13$5 = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$14$5 = /* @__PURE__ */ template(`<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>`), _tmpl$15$5 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Clear Data">`), _tmpl$16$4 = /* @__PURE__ */ template(`<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$17$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"autocomplete=off aria-autocomplete=list aria-controls=address-autocomplete></form></div><div class=toolbar-actions><button class=nav-btn><svg width=14 height=14 viewBox="0 0 14 14">`), _tmpl$18$4 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><circle cx=7 cy=8 r=0.8 fill=white>`), _tmpl$19$4 = /* @__PURE__ */ template(`<div role=option><span class=autocomplete-icon></span><span class=autocomplete-text><span class=autocomplete-title></span><span class=autocomplete-url>`), _tmpl$20$4 = /* @__PURE__ */ template(`<div class=page-diff-burst-row><span class=page-diff-burst-time></span><span class=page-diff-burst-summary>`), _tmpl$21$4 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-section>`), _tmpl$22$3 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-part><span>`), _tmpl$23$3 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>Before</span><span class=page-diff-snippet-text>`), _tmpl$24$3 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>After</span><span class=page-diff-snippet-text>`), _tmpl$25$3 = /* @__PURE__ */ template(`<div class=page-diff-snippets>`), _tmpl$26$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Added</span><ul class=page-diff-list>`), _tmpl$27$3 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Removed</span><ul class=page-diff-list>`), _tmpl$28$3 = /* @__PURE__ */ template(`<div><div class=page-diff-item-header><div class=page-diff-badges><span class=page-diff-kind></span><span class=page-diff-section></span></div><span class=page-diff-summary>`), _tmpl$29$2 = /* @__PURE__ */ template(`<li>`);
3002
3007
  const AddressBar = (props) => {
3003
3008
  const {
3004
3009
  activeTab,
@@ -3294,14 +3299,14 @@ const AddressBar = (props) => {
3294
3299
  };
3295
3300
  const formatSectionLabel = (section) => section === "title" ? "Title" : section === "headings" ? "Headings" : "Content";
3296
3301
  return (() => {
3297
- var _el$ = _tmpl$17$3(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$11 = _el$2.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$35 = _el$11.nextSibling, _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild;
3302
+ var _el$ = _tmpl$17$4(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$11 = _el$2.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$35 = _el$11.nextSibling, _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild;
3298
3303
  addEventListener(_el$3, "click", goBack, true);
3299
3304
  addEventListener(_el$4, "click", goForward, true);
3300
3305
  addEventListener(_el$5, "click", reload, true);
3301
3306
  insert(_el$, createComponent(Show, {
3302
3307
  when: isPrivateWindow,
3303
3308
  get children() {
3304
- return _tmpl$$m();
3309
+ return _tmpl$$n();
3305
3310
  }
3306
3311
  }), _el$11);
3307
3312
  insert(_el$, createComponent(Show, {
@@ -3309,12 +3314,12 @@ const AddressBar = (props) => {
3309
3314
  return memo(() => !!securityState()?.status)() && securityState()?.status !== "none";
3310
3315
  },
3311
3316
  get children() {
3312
- var _el$7 = _tmpl$4$i(), _el$8 = _el$7.firstChild;
3317
+ var _el$7 = _tmpl$4$j(), _el$8 = _el$7.firstChild;
3313
3318
  _el$8.$$click = () => setShowSecurityPopup((prev) => !prev);
3314
3319
  insert(_el$8, createComponent(Switch, {
3315
3320
  get fallback() {
3316
3321
  return (() => {
3317
- var _el$48 = _tmpl$18$3();
3322
+ var _el$48 = _tmpl$18$4();
3318
3323
  _el$48.firstChild;
3319
3324
  return _el$48;
3320
3325
  })();
@@ -3325,7 +3330,7 @@ const AddressBar = (props) => {
3325
3330
  return securityState()?.status === "secure";
3326
3331
  },
3327
3332
  get children() {
3328
- var _el$9 = _tmpl$2$l();
3333
+ var _el$9 = _tmpl$2$m();
3329
3334
  _el$9.firstChild;
3330
3335
  return _el$9;
3331
3336
  }
@@ -3334,7 +3339,7 @@ const AddressBar = (props) => {
3334
3339
  return securityState()?.status === "insecure";
3335
3340
  },
3336
3341
  get children() {
3337
- var _el$1 = _tmpl$3$i();
3342
+ var _el$1 = _tmpl$3$j();
3338
3343
  _el$1.firstChild;
3339
3344
  return _el$1;
3340
3345
  }
@@ -3394,13 +3399,13 @@ const AddressBar = (props) => {
3394
3399
  return memo(() => !!showSuggestions())() && suggestions().length > 0;
3395
3400
  },
3396
3401
  get children() {
3397
- var _el$14 = _tmpl$5$f();
3402
+ var _el$14 = _tmpl$5$g();
3398
3403
  insert(_el$14, createComponent(For, {
3399
3404
  get each() {
3400
3405
  return suggestions();
3401
3406
  },
3402
3407
  children: (item, i) => (() => {
3403
- var _el$50 = _tmpl$19$3(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling;
3408
+ var _el$50 = _tmpl$19$4(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling;
3404
3409
  _el$50.addEventListener("mouseenter", () => setSelectedIndex(i()));
3405
3410
  _el$50.$$mousedown = (e) => {
3406
3411
  e.preventDefault();
@@ -3432,7 +3437,7 @@ const AddressBar = (props) => {
3432
3437
  insert(_el$11, createComponent(Show, {
3433
3438
  when: !isPrivateWindow,
3434
3439
  get children() {
3435
- var _el$15 = _tmpl$6$e(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
3440
+ var _el$15 = _tmpl$6$f(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
3436
3441
  insert(_el$17, () => agentStatusMessage() || (agentPresence() === "active" ? "Agent Active" : agentPresence() === "recent" ? "Agent Connected" : "Agent Offline"));
3437
3442
  createRenderEffect((_p$) => {
3438
3443
  var _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");
@@ -3451,7 +3456,7 @@ const AddressBar = (props) => {
3451
3456
  return pageDiff();
3452
3457
  },
3453
3458
  get children() {
3454
- var _el$18 = _tmpl$7$b();
3459
+ var _el$18 = _tmpl$7$c();
3455
3460
  _el$18.$$click = () => void openDiffTimeline();
3456
3461
  return _el$18;
3457
3462
  }
@@ -3461,7 +3466,7 @@ const AddressBar = (props) => {
3461
3466
  return memo(() => !!pageDiff())() && diffExpanded();
3462
3467
  },
3463
3468
  get children() {
3464
- var _el$19 = _tmpl$0$5(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling;
3469
+ var _el$19 = _tmpl$0$6(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling;
3465
3470
  _el$23.firstChild;
3466
3471
  var _el$30 = _el$21.nextSibling, _el$31 = _el$30.firstChild, _el$32 = _el$31.nextSibling;
3467
3472
  insert(_el$23, () => formatRelativeTime(pageDiff().oldSnapshot.capturedAt), null);
@@ -3470,7 +3475,7 @@ const AddressBar = (props) => {
3470
3475
  return memo(() => !!((pageDiff().burstCount || 0) > 1 && pageDiff().firstDetectedAt))() && pageDiff().lastDetectedAt;
3471
3476
  },
3472
3477
  get children() {
3473
- var _el$25 = _tmpl$8$8(), _el$26 = _el$25.firstChild, _el$29 = _el$26.nextSibling;
3478
+ var _el$25 = _tmpl$8$9(), _el$26 = _el$25.firstChild, _el$29 = _el$26.nextSibling;
3474
3479
  _el$29.nextSibling;
3475
3480
  insert(_el$25, () => pageDiff().burstCount, _el$29);
3476
3481
  insert(_el$25, () => formatElapsedTime(pageDiff().firstDetectedAt, pageDiff().lastDetectedAt), null);
@@ -3484,14 +3489,14 @@ const AddressBar = (props) => {
3484
3489
  return memo(() => !!pageDiff().recentBursts?.length)() && (pageDiff().recentBursts?.length || 0) > 1;
3485
3490
  },
3486
3491
  get children() {
3487
- var _el$33 = _tmpl$9$6();
3492
+ var _el$33 = _tmpl$9$7();
3488
3493
  _el$33.firstChild;
3489
3494
  insert(_el$33, createComponent(For, {
3490
3495
  get each() {
3491
3496
  return pageDiff().recentBursts;
3492
3497
  },
3493
3498
  children: (burst, i) => (() => {
3494
- var _el$55 = _tmpl$20$3(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
3499
+ var _el$55 = _tmpl$20$4(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
3495
3500
  insert(_el$56, (() => {
3496
3501
  var _c$2 = memo(() => i() === 0);
3497
3502
  return () => _c$2() ? "Latest" : formatRelativeTime(burst.detectedAt);
@@ -3507,7 +3512,7 @@ const AddressBar = (props) => {
3507
3512
  return part.section;
3508
3513
  },
3509
3514
  get children() {
3510
- var _el$59 = _tmpl$21$3();
3515
+ var _el$59 = _tmpl$21$4();
3511
3516
  insert(_el$59, () => part.section);
3512
3517
  return _el$59;
3513
3518
  }
@@ -3616,7 +3621,7 @@ const AddressBar = (props) => {
3616
3621
  return activeTab()?.adBlockingEnabled;
3617
3622
  },
3618
3623
  get children() {
3619
- return _tmpl$1$5();
3624
+ return _tmpl$1$6();
3620
3625
  }
3621
3626
  }), null);
3622
3627
  insert(_el$37, createComponent(Show, {
@@ -3624,13 +3629,13 @@ const AddressBar = (props) => {
3624
3629
  return !activeTab()?.adBlockingEnabled;
3625
3630
  },
3626
3631
  get children() {
3627
- return [_tmpl$1$5(), _tmpl$10$5()];
3632
+ return [_tmpl$1$6(), _tmpl$10$6()];
3628
3633
  }
3629
3634
  }), null);
3630
3635
  insert(_el$35, createComponent(Show, {
3631
3636
  when: !isPrivateWindow,
3632
3637
  get children() {
3633
- var _el$41 = _tmpl$11$5();
3638
+ var _el$41 = _tmpl$11$6();
3634
3639
  _el$41.$$click = () => window.vessel.content.toggleReader();
3635
3640
  createRenderEffect(() => _el$41.classList.toggle("active", !!activeTab()?.isReaderMode));
3636
3641
  return _el$41;
@@ -3639,7 +3644,7 @@ const AddressBar = (props) => {
3639
3644
  insert(_el$35, createComponent(Show, {
3640
3645
  when: !isPrivateWindow,
3641
3646
  get children() {
3642
- var _el$42 = _tmpl$12$5();
3647
+ var _el$42 = _tmpl$12$6();
3643
3648
  addEventListener(_el$42, "click", toggleDevTools, true);
3644
3649
  createRenderEffect(() => _el$42.classList.toggle("active", !!devtoolsPanelOpen2()));
3645
3650
  return _el$42;
@@ -3648,7 +3653,7 @@ const AddressBar = (props) => {
3648
3653
  insert(_el$35, createComponent(Show, {
3649
3654
  when: !isPrivateWindow,
3650
3655
  get children() {
3651
- var _el$43 = _tmpl$14$4();
3656
+ var _el$43 = _tmpl$14$5();
3652
3657
  _el$43.firstChild;
3653
3658
  addEventListener(_el$43, "click", toggleSidebar, true);
3654
3659
  insert(_el$43, createComponent(Show, {
@@ -3656,7 +3661,7 @@ const AddressBar = (props) => {
3656
3661
  return pendingApprovalCount() > 0;
3657
3662
  },
3658
3663
  get children() {
3659
- var _el$45 = _tmpl$13$4();
3664
+ var _el$45 = _tmpl$13$5();
3660
3665
  insert(_el$45, pendingApprovalCount);
3661
3666
  createRenderEffect(() => setAttribute(_el$45, "aria-label", `${pendingApprovalCount()} pending`));
3662
3667
  return _el$45;
@@ -3678,14 +3683,14 @@ const AddressBar = (props) => {
3678
3683
  when: !isPrivateWindow,
3679
3684
  get children() {
3680
3685
  return [(() => {
3681
- var _el$46 = _tmpl$15$4();
3686
+ var _el$46 = _tmpl$15$5();
3682
3687
  addEventListener(_el$46, "click", props.onClearData, true);
3683
3688
  insert(_el$46, createComponent(trash_2_default, {
3684
3689
  size: 14
3685
3690
  }));
3686
3691
  return _el$46;
3687
3692
  })(), (() => {
3688
- var _el$47 = _tmpl$16$3();
3693
+ var _el$47 = _tmpl$16$4();
3689
3694
  addEventListener(_el$47, "click", openSettings, true);
3690
3695
  return _el$47;
3691
3696
  })()];
@@ -3715,7 +3720,7 @@ const AddressBar = (props) => {
3715
3720
  })();
3716
3721
  };
3717
3722
  delegateEvents(["click", "input", "keydown", "mousedown"]);
3718
- var _tmpl$$l = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite aria-atomic=true>`), _tmpl$2$k = /* @__PURE__ */ template(`<div class=bookmark-toast role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
3723
+ var _tmpl$$m = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite aria-atomic=true>`), _tmpl$2$l = /* @__PURE__ */ template(`<div class=bookmark-toast role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
3719
3724
  const TOAST_DURATION_MS$1 = 4200;
3720
3725
  const TOAST_EXIT_MS$2 = 300;
3721
3726
  function isBookmarkToastCandidate(action) {
@@ -3775,13 +3780,13 @@ const BookmarkNotifications = () => {
3775
3780
  timeoutIds.clear();
3776
3781
  });
3777
3782
  return (() => {
3778
- var _el$ = _tmpl$$l();
3783
+ var _el$ = _tmpl$$m();
3779
3784
  insert(_el$, createComponent(For, {
3780
3785
  get each() {
3781
3786
  return toasts();
3782
3787
  },
3783
3788
  children: (toast) => (() => {
3784
- var _el$2 = _tmpl$2$k(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3789
+ var _el$2 = _tmpl$2$l(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3785
3790
  insert(_el$3, () => toast.title);
3786
3791
  insert(_el$4, () => toast.message);
3787
3792
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!toast.leaving));
@@ -3791,7 +3796,7 @@ const BookmarkNotifications = () => {
3791
3796
  return _el$;
3792
3797
  })();
3793
3798
  };
3794
- var _tmpl$$k = /* @__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>`);
3799
+ var _tmpl$$l = /* @__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>`);
3795
3800
  const TOAST_DURATION_MS = 3e3;
3796
3801
  const TOAST_EXIT_MS$1 = 300;
3797
3802
  const HighlightNotifications = (props) => {
@@ -3830,7 +3835,7 @@ const HighlightNotifications = (props) => {
3830
3835
  return memo(() => !!visible())() && current();
3831
3836
  },
3832
3837
  get children() {
3833
- var _el$ = _tmpl$$k(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3838
+ var _el$ = _tmpl$$l(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
3834
3839
  insert(_el$3, () => current().title);
3835
3840
  insert(_el$4, () => current().message);
3836
3841
  createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!leaving()));
@@ -3838,7 +3843,7 @@ const HighlightNotifications = (props) => {
3838
3843
  }
3839
3844
  });
3840
3845
  };
3841
- var _tmpl$$j = /* @__PURE__ */ template(`<div class=download-toast-stack aria-live=polite>`), _tmpl$2$j = /* @__PURE__ */ template(`<span class=download-toast-done>&#10003;`), _tmpl$3$h = /* @__PURE__ */ template(`<span class=download-toast-failed>!`), _tmpl$4$h = /* @__PURE__ */ template(`<div class=download-toast-bar-track><div class=download-toast-bar-fill>`), _tmpl$5$e = /* @__PURE__ */ template(`<div class=download-toast-size>`), _tmpl$6$d = /* @__PURE__ */ template(`<div class="download-toast-size download-toast-size-done"> downloaded`), _tmpl$7$a = /* @__PURE__ */ template(`<div class=download-toast role=status><div class=download-toast-header><span class=download-toast-filename>`);
3846
+ var _tmpl$$k = /* @__PURE__ */ template(`<div class=download-toast-stack aria-live=polite>`), _tmpl$2$k = /* @__PURE__ */ template(`<span class=download-toast-done>&#10003;`), _tmpl$3$i = /* @__PURE__ */ template(`<span class=download-toast-failed>!`), _tmpl$4$i = /* @__PURE__ */ template(`<div class=download-toast-bar-track><div class=download-toast-bar-fill>`), _tmpl$5$f = /* @__PURE__ */ template(`<div class=download-toast-size>`), _tmpl$6$e = /* @__PURE__ */ template(`<div class="download-toast-size download-toast-size-done"> downloaded`), _tmpl$7$b = /* @__PURE__ */ template(`<div class=download-toast role=status><div class=download-toast-header><span class=download-toast-filename>`);
3842
3847
  const TOAST_DONE_DURATION_MS = 4200;
3843
3848
  const TOAST_EXIT_MS = 300;
3844
3849
  function formatBytes$1(bytes) {
@@ -3929,20 +3934,20 @@ const DownloadToast = () => {
3929
3934
  return Math.min(100, Math.round(d.receivedBytes / d.totalBytes * 100));
3930
3935
  };
3931
3936
  return (() => {
3932
- var _el$ = _tmpl$$j();
3937
+ var _el$ = _tmpl$$k();
3933
3938
  insert(_el$, createComponent(For, {
3934
3939
  get each() {
3935
3940
  return downloads();
3936
3941
  },
3937
3942
  children: (dl) => (() => {
3938
- var _el$2 = _tmpl$7$a(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
3943
+ var _el$2 = _tmpl$7$b(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
3939
3944
  insert(_el$4, () => dl.filename);
3940
3945
  insert(_el$3, createComponent(Show, {
3941
3946
  get when() {
3942
3947
  return dl.state === "completed";
3943
3948
  },
3944
3949
  get children() {
3945
- return _tmpl$2$j();
3950
+ return _tmpl$2$k();
3946
3951
  }
3947
3952
  }), null);
3948
3953
  insert(_el$3, createComponent(Show, {
@@ -3950,7 +3955,7 @@ const DownloadToast = () => {
3950
3955
  return dl.state === "cancelled" || dl.state === "interrupted";
3951
3956
  },
3952
3957
  get children() {
3953
- return _tmpl$3$h();
3958
+ return _tmpl$3$i();
3954
3959
  }
3955
3960
  }), null);
3956
3961
  insert(_el$2, createComponent(Show, {
@@ -3959,11 +3964,11 @@ const DownloadToast = () => {
3959
3964
  },
3960
3965
  get children() {
3961
3966
  return [(() => {
3962
- var _el$7 = _tmpl$4$h(), _el$8 = _el$7.firstChild;
3967
+ var _el$7 = _tmpl$4$i(), _el$8 = _el$7.firstChild;
3963
3968
  createRenderEffect((_$p) => setStyleProperty(_el$8, "width", `${progressPercent(dl)}%`));
3964
3969
  return _el$7;
3965
3970
  })(), (() => {
3966
- var _el$9 = _tmpl$5$e();
3971
+ var _el$9 = _tmpl$5$f();
3967
3972
  insert(_el$9, () => formatBytes$1(dl.receivedBytes), null);
3968
3973
  insert(_el$9, createComponent(Show, {
3969
3974
  get when() {
@@ -3982,7 +3987,7 @@ const DownloadToast = () => {
3982
3987
  return dl.state === "completed";
3983
3988
  },
3984
3989
  get children() {
3985
- var _el$0 = _tmpl$6$d(), _el$1 = _el$0.firstChild;
3990
+ var _el$0 = _tmpl$6$e(), _el$1 = _el$0.firstChild;
3986
3991
  insert(_el$0, () => formatBytes$1(dl.receivedBytes), _el$1);
3987
3992
  return _el$0;
3988
3993
  }
@@ -3994,7 +3999,7 @@ const DownloadToast = () => {
3994
3999
  return _el$;
3995
4000
  })();
3996
4001
  };
3997
- var _tmpl$$i = /* @__PURE__ */ template(`<div class=modal-backdrop><div class=downloads-panel><div class=downloads-panel-header><div><h2>Downloads</h2><p>Recent files saved by Vessel</p></div><div class=downloads-panel-actions><button>Clear</button><button>Close</button></div></div><div class=downloads-panel-list>`), _tmpl$2$i = /* @__PURE__ */ template(`<div class=downloads-empty>No downloads yet.`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=downloads-row><div class=downloads-file><strong></strong><span></span><small> · </small></div><div class=downloads-row-actions><button>Open</button><button>Show in folder`), _tmpl$4$g = /* @__PURE__ */ template(`<span>Source: `);
4002
+ var _tmpl$$j = /* @__PURE__ */ template(`<div class=modal-backdrop><div class=downloads-panel><div class=downloads-panel-header><div><h2>Downloads</h2><p>Recent files saved by Vessel</p></div><div class=downloads-panel-actions><button>Clear</button><button>Close</button></div></div><div class=downloads-panel-list>`), _tmpl$2$j = /* @__PURE__ */ template(`<div class=downloads-empty>No downloads yet.`), _tmpl$3$h = /* @__PURE__ */ template(`<div class=downloads-row><div class=downloads-file><strong></strong><span></span><small> · </small></div><div class=downloads-row-actions><button>Open</button><button>Show in folder`), _tmpl$4$h = /* @__PURE__ */ template(`<span>Source: `);
3998
4003
  const formatBytes = (bytes) => {
3999
4004
  if (!bytes) return "0 B";
4000
4005
  const units = ["B", "KB", "MB", "GB"];
@@ -4019,7 +4024,7 @@ const DownloadsPanel = (props) => {
4019
4024
  return props.open;
4020
4025
  },
4021
4026
  get children() {
4022
- var _el$ = _tmpl$$i(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$3.nextSibling;
4027
+ var _el$ = _tmpl$$j(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$3.nextSibling;
4023
4028
  addEventListener(_el$, "click", props.onClose, true);
4024
4029
  _el$2.$$click = (e) => e.stopPropagation();
4025
4030
  _el$6.$$click = async () => {
@@ -4032,10 +4037,10 @@ const DownloadsPanel = (props) => {
4032
4037
  return items();
4033
4038
  },
4034
4039
  get fallback() {
4035
- return _tmpl$2$i();
4040
+ return _tmpl$2$j();
4036
4041
  },
4037
4042
  children: (item) => (() => {
4038
- var _el$0 = _tmpl$3$g(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$1.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
4043
+ var _el$0 = _tmpl$3$h(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$11.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$1.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
4039
4044
  insert(_el$10, () => item.filename);
4040
4045
  insert(_el$11, () => item.savePath);
4041
4046
  insert(_el$1, createComponent(Show, {
@@ -4043,7 +4048,7 @@ const DownloadsPanel = (props) => {
4043
4048
  return item.url;
4044
4049
  },
4045
4050
  children: (url) => (() => {
4046
- var _el$17 = _tmpl$4$g();
4051
+ var _el$17 = _tmpl$4$h();
4047
4052
  _el$17.firstChild;
4048
4053
  insert(_el$17, url, null);
4049
4054
  return _el$17;
@@ -4066,7 +4071,7 @@ const DownloadsPanel = (props) => {
4066
4071
  });
4067
4072
  };
4068
4073
  delegateEvents(["click"]);
4069
- var _tmpl$$h = /* @__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$h = /* @__PURE__ */ template(`<span class=find-bar-count>`);
4074
+ var _tmpl$$i = /* @__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$i = /* @__PURE__ */ template(`<span class=find-bar-count>`);
4070
4075
  const FindBar = () => {
4071
4076
  const [open, setOpen] = createSignal(false);
4072
4077
  const [query, setQuery] = createSignal("");
@@ -4144,7 +4149,7 @@ const FindBar = () => {
4144
4149
  return open();
4145
4150
  },
4146
4151
  get children() {
4147
- var _el$ = _tmpl$$h(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
4152
+ var _el$ = _tmpl$$i(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
4148
4153
  _el$2.$$input = (e) => handleInput(e.currentTarget.value);
4149
4154
  var _ref$ = inputRef;
4150
4155
  typeof _ref$ === "function" ? use(_ref$, _el$2) : inputRef = _el$2;
@@ -4154,7 +4159,7 @@ const FindBar = () => {
4154
4159
  return result();
4155
4160
  },
4156
4161
  children: (r) => (() => {
4157
- var _el$6 = _tmpl$2$h();
4162
+ var _el$6 = _tmpl$2$i();
4158
4163
  insert(_el$6, (() => {
4159
4164
  var _c$ = memo(() => r().matches > 0);
4160
4165
  return () => _c$() ? `${r().activeMatchOrdinal} / ${r().matches}` : "No results";
@@ -4171,7 +4176,7 @@ const FindBar = () => {
4171
4176
  });
4172
4177
  };
4173
4178
  delegateEvents(["input", "click"]);
4174
- var _tmpl$$g = /* @__PURE__ */ template(`<div class=flow-progress>`), _tmpl$2$g = /* @__PURE__ */ template(`<div class=flow-progress-hint>Last: `), _tmpl$3$f = /* @__PURE__ */ template(`<div class=flow-progress-hint>Next: `), _tmpl$4$f = /* @__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$d = /* @__PURE__ */ template(`<div><span class=flow-step-dot></span><span class=flow-step-label>`);
4179
+ var _tmpl$$h = /* @__PURE__ */ template(`<div class=flow-progress>`), _tmpl$2$h = /* @__PURE__ */ template(`<div class=flow-progress-hint>Last: `), _tmpl$3$g = /* @__PURE__ */ template(`<div class=flow-progress-hint>Next: `), _tmpl$4$g = /* @__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$e = /* @__PURE__ */ template(`<div><span class=flow-step-dot></span><span class=flow-step-label>`);
4175
4180
  const FlowProgress = () => {
4176
4181
  const {
4177
4182
  runtimeState: runtimeState2
@@ -4202,13 +4207,13 @@ const FlowProgress = () => {
4202
4207
  return flow() || tracker();
4203
4208
  },
4204
4209
  get children() {
4205
- var _el$ = _tmpl$$g();
4210
+ var _el$ = _tmpl$$h();
4206
4211
  insert(_el$, createComponent(Show, {
4207
4212
  get when() {
4208
4213
  return tracker();
4209
4214
  },
4210
4215
  children: (t) => (() => {
4211
- var _el$2 = _tmpl$4$f(), _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;
4216
+ var _el$2 = _tmpl$4$g(), _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;
4212
4217
  insert(_el$4, () => t().goal);
4213
4218
  insert(_el$5, () => progressPercent(t().steps), _el$6);
4214
4219
  insert(_el$9, createComponent(For, {
@@ -4216,7 +4221,7 @@ const FlowProgress = () => {
4216
4221
  return t().steps;
4217
4222
  },
4218
4223
  children: (step) => (() => {
4219
- var _el$12 = _tmpl$5$d(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
4224
+ var _el$12 = _tmpl$5$e(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
4220
4225
  insert(_el$14, () => step.label);
4221
4226
  createRenderEffect(() => className(_el$12, `flow-step ${stepStatusClass(step.status)}`));
4222
4227
  return _el$12;
@@ -4227,7 +4232,7 @@ const FlowProgress = () => {
4227
4232
  return t().lastAction;
4228
4233
  },
4229
4234
  get children() {
4230
- var _el$0 = _tmpl$2$g();
4235
+ var _el$0 = _tmpl$2$h();
4231
4236
  _el$0.firstChild;
4232
4237
  insert(_el$0, () => t().lastAction, null);
4233
4238
  return _el$0;
@@ -4238,7 +4243,7 @@ const FlowProgress = () => {
4238
4243
  return memo(() => !!t().nextHint)() && !t().steps.every((s) => s.status === "done");
4239
4244
  },
4240
4245
  get children() {
4241
- var _el$10 = _tmpl$3$f();
4246
+ var _el$10 = _tmpl$3$g();
4242
4247
  _el$10.firstChild;
4243
4248
  insert(_el$10, () => t().nextHint, null);
4244
4249
  return _el$10;
@@ -4253,7 +4258,7 @@ const FlowProgress = () => {
4253
4258
  return memo(() => !!flow())() && !tracker();
4254
4259
  },
4255
4260
  children: (f) => (() => {
4256
- var _el$15 = _tmpl$4$f(), _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;
4261
+ var _el$15 = _tmpl$4$g(), _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;
4257
4262
  insert(_el$17, () => f().goal);
4258
4263
  insert(_el$18, () => progressPercent(f().steps), _el$19);
4259
4264
  insert(_el$22, createComponent(For, {
@@ -4261,7 +4266,7 @@ const FlowProgress = () => {
4261
4266
  return f().steps;
4262
4267
  },
4263
4268
  children: (step) => (() => {
4264
- var _el$23 = _tmpl$5$d(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
4269
+ var _el$23 = _tmpl$5$e(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
4265
4270
  insert(_el$25, () => step.label);
4266
4271
  createRenderEffect(() => className(_el$23, `flow-step ${stepStatusClass(step.status)}`));
4267
4272
  return _el$23;
@@ -4302,7 +4307,7 @@ function formatTime(iso, options) {
4302
4307
  ...options?.includeSeconds && { second: "2-digit" }
4303
4308
  });
4304
4309
  }
4305
- var _tmpl$$f = /* @__PURE__ */ template(`<div class=agent-summary-hud>`), _tmpl$2$f = /* @__PURE__ */ template(`<span class=agent-transcript-live><span class=agent-transcript-live-dot aria-hidden=true></span>Live`), _tmpl$3$e = /* @__PURE__ */ template(`<div class=agent-transcript-list>`), _tmpl$4$e = /* @__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$c = /* @__PURE__ */ template(`<span class=agent-summary-live-dot aria-hidden=true>`), _tmpl$6$c = /* @__PURE__ */ template(`<span class=agent-summary-text>: `), _tmpl$7$9 = /* @__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>`);
4310
+ var _tmpl$$g = /* @__PURE__ */ template(`<div class=agent-summary-hud>`), _tmpl$2$g = /* @__PURE__ */ template(`<span class=agent-transcript-live><span class=agent-transcript-live-dot aria-hidden=true></span>Live`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=agent-transcript-list>`), _tmpl$4$f = /* @__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$d = /* @__PURE__ */ template(`<span class=agent-summary-live-dot aria-hidden=true>`), _tmpl$6$d = /* @__PURE__ */ template(`<span class=agent-summary-text>: `), _tmpl$7$a = /* @__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>`);
4306
4311
  const AgentTranscriptDock = () => {
4307
4312
  const {
4308
4313
  runtimeState: runtimeState2
@@ -4339,7 +4344,7 @@ const AgentTranscriptDock = () => {
4339
4344
  return isSummary();
4340
4345
  },
4341
4346
  get children() {
4342
- var _el$ = _tmpl$$f();
4347
+ var _el$ = _tmpl$$g();
4343
4348
  insert(_el$, createComponent(Show, {
4344
4349
  get when() {
4345
4350
  return latestEntry();
@@ -4349,10 +4354,10 @@ const AgentTranscriptDock = () => {
4349
4354
  return hasStreamingEntry();
4350
4355
  },
4351
4356
  get children() {
4352
- return _tmpl$5$c();
4357
+ return _tmpl$5$d();
4353
4358
  }
4354
4359
  }), (() => {
4355
- var _el$10 = _tmpl$6$c(), _el$11 = _el$10.firstChild;
4360
+ var _el$10 = _tmpl$6$d(), _el$11 = _el$10.firstChild;
4356
4361
  insert(_el$10, () => entry().title || entry().kind, _el$11);
4357
4362
  insert(_el$10, (() => {
4358
4363
  var _c$ = memo(() => entry().text.length > 80);
@@ -4368,7 +4373,7 @@ const AgentTranscriptDock = () => {
4368
4373
  return !isSummary();
4369
4374
  },
4370
4375
  get children() {
4371
- var _el$2 = _tmpl$4$e(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
4376
+ var _el$2 = _tmpl$4$f(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
4372
4377
  _el$4.firstChild;
4373
4378
  var _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling;
4374
4379
  insert(_el$4, createComponent(Show, {
@@ -4376,7 +4381,7 @@ const AgentTranscriptDock = () => {
4376
4381
  return hasStreamingEntry();
4377
4382
  },
4378
4383
  get children() {
4379
- return _tmpl$2$f();
4384
+ return _tmpl$2$g();
4380
4385
  }
4381
4386
  }), null);
4382
4387
  _el$8.$$click = () => setCollapsed((value) => !value);
@@ -4387,14 +4392,14 @@ const AgentTranscriptDock = () => {
4387
4392
  return !collapsed();
4388
4393
  },
4389
4394
  get children() {
4390
- var _el$0 = _tmpl$3$e();
4395
+ var _el$0 = _tmpl$3$f();
4391
4396
  use((el) => useScrollFade(el), _el$0);
4392
4397
  insert(_el$0, createComponent(For, {
4393
4398
  get each() {
4394
4399
  return visibleEntries();
4395
4400
  },
4396
4401
  children: (entry) => (() => {
4397
- var _el$12 = _tmpl$7$9(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$13.nextSibling;
4402
+ var _el$12 = _tmpl$7$a(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$13.nextSibling;
4398
4403
  insert(_el$14, () => entry.title || entry.kind);
4399
4404
  insert(_el$15, () => formatTime(entry.updatedAt));
4400
4405
  insert(_el$16, () => entry.text);
@@ -4524,7 +4529,8 @@ const [pendingQueries, setPendingQueries] = createSignal([]);
4524
4529
  const [pendingQueryActivities, setPendingQueryActivities] = createSignal([]);
4525
4530
  const [queueNotice, setQueueNotice] = createSignal(null);
4526
4531
  const [automationActivities, setAutomationActivities] = createSignal([]);
4527
- let initialized = false;
4532
+ const [researchClarifications, setResearchClarifications] = createSignal([]);
4533
+ let initialized$1 = false;
4528
4534
  let pendingDrainScheduled = false;
4529
4535
  let listenerCleanups = [];
4530
4536
  let pendingAutomationActivity = null;
@@ -4582,9 +4588,9 @@ function schedulePendingDrain() {
4582
4588
  }
4583
4589
  });
4584
4590
  }
4585
- function init() {
4586
- if (initialized) return;
4587
- initialized = true;
4591
+ function init$1() {
4592
+ if (initialized$1) return;
4593
+ initialized$1 = true;
4588
4594
  listenerCleanups.push(window.vessel.ai.onStreamStart((prompt) => {
4589
4595
  setMessages((prev) => {
4590
4596
  const next = [...prev, { role: "user", content: prompt }];
@@ -4652,6 +4658,25 @@ function init() {
4652
4658
  listenerCleanups.push(window.vessel.ai.onStreamIdle(() => {
4653
4659
  schedulePendingDrain();
4654
4660
  }));
4661
+ listenerCleanups.push(window.vessel.ai.onResearchClarification((payload) => {
4662
+ setResearchClarifications((prev) => [...prev, payload].slice(-20));
4663
+ setMessages((prev) => {
4664
+ if (prev.some((message) => message.role === "assistant" && message.content === payload.question)) {
4665
+ return prev;
4666
+ }
4667
+ const next = [
4668
+ ...prev,
4669
+ { role: "assistant", content: payload.question }
4670
+ ];
4671
+ return trimMessages(next);
4672
+ });
4673
+ if (activeAutomationActivityId) {
4674
+ const activityId = activeAutomationActivityId;
4675
+ setAutomationActivities(
4676
+ (prev) => appendAutomationActivityChunk(prev, activityId, payload.question)
4677
+ );
4678
+ }
4679
+ }));
4655
4680
  listenerCleanups.push(window.vessel.ai.onAutomationActivityStart((entry) => {
4656
4681
  setAutomationActivities((prev) => startAutomationActivity(prev, entry));
4657
4682
  }));
@@ -4667,7 +4692,7 @@ function init() {
4667
4692
  }));
4668
4693
  }
4669
4694
  function useAI() {
4670
- init();
4695
+ init$1();
4671
4696
  const query = async (prompt, activity = null) => {
4672
4697
  recordRecentQuery(prompt);
4673
4698
  if (isStreaming()) {
@@ -4702,6 +4727,7 @@ function useAI() {
4702
4727
  streamStartedAt,
4703
4728
  recentQueries,
4704
4729
  automationActivities,
4730
+ researchClarifications,
4705
4731
  pendingQueries,
4706
4732
  pendingQueryCount: () => pendingQueries().length,
4707
4733
  pendingQueryLimit: MAX_PENDING_QUERIES,
@@ -4725,6 +4751,7 @@ function useAI() {
4725
4751
  },
4726
4752
  clearHistory: () => {
4727
4753
  setMessages([]);
4754
+ setResearchClarifications([]);
4728
4755
  const next = clearPendingPromptQueue();
4729
4756
  setPendingQueries(next.queue);
4730
4757
  setPendingQueryActivities([]);
@@ -4759,7 +4786,7 @@ function useAnimatedPresence(isOpen, exitDurationMs) {
4759
4786
  });
4760
4787
  return { visible, closing };
4761
4788
  }
4762
- var _tmpl$$e = /* @__PURE__ */ template(`<div class=command-bar-no-provider><p>Configure a chat provider to start using the AI assistant.</p><button class=command-bar-no-provider-btn>Open Settings <kbd>Ctrl+,`), _tmpl$2$e = /* @__PURE__ */ template(`<div class=command-bar-recent><span class=command-bar-recent-label>Recent</span><div class=command-bar-recent-list>`), _tmpl$3$d = /* @__PURE__ */ template(`<span>Try "summarize" or ask a question`), _tmpl$4$d = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=command-bar><form><div class=command-bar-icon><svg width=16 height=16 viewBox="0 0 16 16"><circle cx=8 cy=8 r=6 fill=none stroke=var(--accent-primary) stroke-width=1.5></circle><circle cx=6 cy=7 r=0.8 fill=var(--accent-primary)></circle><circle cx=10 cy=7 r=0.8 fill=var(--accent-primary)></circle><path d="M6 10c0.5 0.8 3.5 0.8 4 0"fill=none stroke=var(--accent-primary) stroke-width=0.8 stroke-linecap=round></path></svg></div><input class=command-bar-input type=text></form><div class=command-bar-hints><span><kbd>Enter</kbd> to ask</span><span><kbd>Esc</kbd> to close`), _tmpl$5$b = /* @__PURE__ */ template(`<button class=command-bar-recent-item type=button>`), _tmpl$6$b = /* @__PURE__ */ template(`<span>Set up a provider in Settings first`);
4789
+ var _tmpl$$f = /* @__PURE__ */ template(`<div class=command-bar-no-provider><p>Configure a chat provider to start using the AI assistant.</p><button class=command-bar-no-provider-btn>Open Settings <kbd>Ctrl+,`), _tmpl$2$f = /* @__PURE__ */ template(`<div class=command-bar-recent><span class=command-bar-recent-label>Recent</span><div class=command-bar-recent-list>`), _tmpl$3$e = /* @__PURE__ */ template(`<span>Try "summarize" or ask a question`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=command-bar><form><div class=command-bar-icon><svg width=16 height=16 viewBox="0 0 16 16"><circle cx=8 cy=8 r=6 fill=none stroke=var(--accent-primary) stroke-width=1.5></circle><circle cx=6 cy=7 r=0.8 fill=var(--accent-primary)></circle><circle cx=10 cy=7 r=0.8 fill=var(--accent-primary)></circle><path d="M6 10c0.5 0.8 3.5 0.8 4 0"fill=none stroke=var(--accent-primary) stroke-width=0.8 stroke-linecap=round></path></svg></div><input class=command-bar-input type=text></form><div class=command-bar-hints><span><kbd>Enter</kbd> to ask</span><span><kbd>Esc</kbd> to close`), _tmpl$5$c = /* @__PURE__ */ template(`<button class=command-bar-recent-item type=button>`), _tmpl$6$c = /* @__PURE__ */ template(`<span>Set up a provider in Settings first`);
4763
4790
  const COMMAND_BAR_EXIT_MS = 200;
4764
4791
  const CommandBar = () => {
4765
4792
  const {
@@ -4813,7 +4840,7 @@ const CommandBar = () => {
4813
4840
  return visible();
4814
4841
  },
4815
4842
  get children() {
4816
- var _el$ = _tmpl$4$d(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$10 = _el$3.nextSibling, _el$11 = _el$10.firstChild;
4843
+ var _el$ = _tmpl$4$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$10 = _el$3.nextSibling, _el$11 = _el$10.firstChild;
4817
4844
  _el$11.nextSibling;
4818
4845
  addEventListener(_el$, "click", closeCommandBar, true);
4819
4846
  _el$2.$$click = (e) => e.stopPropagation();
@@ -4827,7 +4854,7 @@ const CommandBar = () => {
4827
4854
  return !hasProvider();
4828
4855
  },
4829
4856
  get children() {
4830
- var _el$6 = _tmpl$$e(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
4857
+ var _el$6 = _tmpl$$f(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
4831
4858
  _el$8.$$click = () => {
4832
4859
  closeCommandBar();
4833
4860
  openSettings();
@@ -4840,13 +4867,13 @@ const CommandBar = () => {
4840
4867
  return memo(() => !!(hasProvider() && recentQueries2().length > 0))() && !input().trim();
4841
4868
  },
4842
4869
  get children() {
4843
- var _el$9 = _tmpl$2$e(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
4870
+ var _el$9 = _tmpl$2$f(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
4844
4871
  insert(_el$1, createComponent(For, {
4845
4872
  get each() {
4846
4873
  return recentQueries2();
4847
4874
  },
4848
4875
  children: (q) => (() => {
4849
- var _el$14 = _tmpl$5$b();
4876
+ var _el$14 = _tmpl$5$c();
4850
4877
  _el$14.$$click = () => void handleRecentClick(q);
4851
4878
  insert(_el$14, q);
4852
4879
  return _el$14;
@@ -4860,10 +4887,10 @@ const CommandBar = () => {
4860
4887
  return hasProvider();
4861
4888
  },
4862
4889
  get fallback() {
4863
- return _tmpl$6$b();
4890
+ return _tmpl$6$c();
4864
4891
  },
4865
4892
  get children() {
4866
- return _tmpl$3$d();
4893
+ return _tmpl$3$e();
4867
4894
  }
4868
4895
  }), null);
4869
4896
  createRenderEffect((_p$) => {
@@ -6147,14 +6174,14 @@ function applyInlineMarkdown(text2) {
6147
6174
  return `<a href="${escapeHtml(safeHref)}" target="_blank" rel="noreferrer">${escapeHtml(safeLabel)}</a>`;
6148
6175
  }
6149
6176
  );
6150
- html2 = html2.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/__([^_]+)__/g, "<strong>$1</strong>").replace(/(^|[^\*])\*([^*\n]+)\*/g, "$1<em>$2</em>").replace(/(^|[^_])_([^_\n]+)_/g, "$1<em>$2</em>");
6177
+ html2 = html2.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/__([^_]+)__/g, "<strong>$1</strong>").replace(/(^|[^\*])\*(?!\s)([^*\n]+?)(?<!\s)\*/g, "$1<em>$2</em>").replace(/(^|[^_])_(?!\s)([^_\n]+?)(?<!\s)_/g, "$1<em>$2</em>");
6151
6178
  return codeSpans.reduce(
6152
6179
  (output, snippet, index) => output.replace(`\0CS${index}\0`, snippet),
6153
6180
  html2
6154
6181
  );
6155
6182
  }
6156
6183
  function renderList(block, ordered) {
6157
- const pattern = ordered ? /^\d+\.\s+/ : /^[-*+]\s+/;
6184
+ const pattern = ordered ? /^\d+\.\s+/ : /^[-*+•]\s+/;
6158
6185
  const items = block.split("\n").map((line) => line.replace(pattern, "").trim()).filter(Boolean).map((item) => `<li>${applyInlineMarkdown(item)}</li>`).join("");
6159
6186
  return ordered ? `<ol>${items}</ol>` : `<ul>${items}</ul>`;
6160
6187
  }
@@ -6245,10 +6272,49 @@ function renderBlock(block) {
6245
6272
  result += `<p>${applyInlineMarkdown(afterTable).replace(/\n/g, "<br>")}</p>`;
6246
6273
  return result;
6247
6274
  }
6248
- if (trimmed.split("\n").every((line) => /^[-*+]\s+/.test(line))) {
6275
+ const hasUnorderedList = lines.some((l) => /^[-*+•]\s+/.test(l));
6276
+ const hasOrderedList = lines.some((l) => /^\d+\.\s+/.test(l));
6277
+ const allUnordered = lines.every((l) => /^[-*+•]\s+/.test(l));
6278
+ const allOrdered = lines.every((l) => /^\d+\.\s+/.test(l));
6279
+ if ((hasUnorderedList || hasOrderedList) && !(allUnordered || allOrdered)) {
6280
+ let result = "";
6281
+ let currentText = "";
6282
+ let currentList = "";
6283
+ let currentOrdered = false;
6284
+ for (const line of lines) {
6285
+ const isUnordered = /^[-*+•]\s+/.test(line);
6286
+ const isOrdered = /^\d+\.\s+/.test(line);
6287
+ if (isUnordered || isOrdered) {
6288
+ if (currentText) {
6289
+ result += `<p>${applyInlineMarkdown(currentText).replace(/\n/g, "<br>")}</p>`;
6290
+ currentText = "";
6291
+ }
6292
+ if (currentList && (isOrdered && !currentOrdered || isUnordered && currentOrdered)) {
6293
+ result += renderList(currentList, currentOrdered);
6294
+ currentList = "";
6295
+ }
6296
+ currentOrdered = isOrdered;
6297
+ currentList += (currentList ? "\n" : "") + line;
6298
+ } else {
6299
+ if (currentList) {
6300
+ result += renderList(currentList, currentOrdered);
6301
+ currentList = "";
6302
+ }
6303
+ currentText += (currentText ? "\n" : "") + line;
6304
+ }
6305
+ }
6306
+ if (currentText) {
6307
+ result += `<p>${applyInlineMarkdown(currentText).replace(/\n/g, "<br>")}</p>`;
6308
+ }
6309
+ if (currentList) {
6310
+ result += renderList(currentList, currentOrdered);
6311
+ }
6312
+ return result;
6313
+ }
6314
+ if (allUnordered) {
6249
6315
  return renderList(trimmed, false);
6250
6316
  }
6251
- if (trimmed.split("\n").every((line) => /^\d+\.\s+/.test(line))) {
6317
+ if (allOrdered) {
6252
6318
  return renderList(trimmed, true);
6253
6319
  }
6254
6320
  return `<p>${applyInlineMarkdown(trimmed).replace(/\n/g, "<br>")}</p>`;
@@ -6342,6 +6408,9 @@ ${token}
6342
6408
  (out, snippet, index) => out.replace(`\0TC${index}\0`, snippet),
6343
6409
  output
6344
6410
  );
6411
+ if (typeof purify?.sanitize !== "function") {
6412
+ return output;
6413
+ }
6345
6414
  return purify.sanitize(output, {
6346
6415
  ALLOWED_TAGS: [
6347
6416
  "a",
@@ -6436,7 +6505,7 @@ function getBookmarkSearchMatch(args) {
6436
6505
  }
6437
6506
  return { matchedFields, score };
6438
6507
  }
6439
- var _tmpl$$d = /* @__PURE__ */ template(`<div class=dropdown-select-menu role=listbox>`), _tmpl$2$d = /* @__PURE__ */ template(`<div><button class=dropdown-select-trigger type=button aria-haspopup=listbox><span class=dropdown-select-value></span><span class=dropdown-select-caret aria-hidden=true>▾`), _tmpl$3$c = /* @__PURE__ */ template(`<span class=dropdown-select-option-description>`), _tmpl$4$c = /* @__PURE__ */ template(`<button class=dropdown-select-option type=button role=option><span class=dropdown-select-option-copy><span class=dropdown-select-option-label>`);
6508
+ var _tmpl$$e = /* @__PURE__ */ template(`<div class=dropdown-select-menu role=listbox>`), _tmpl$2$e = /* @__PURE__ */ template(`<div><button class=dropdown-select-trigger type=button aria-haspopup=listbox><span class=dropdown-select-value></span><span class=dropdown-select-caret aria-hidden=true>▾`), _tmpl$3$d = /* @__PURE__ */ template(`<span class=dropdown-select-option-description>`), _tmpl$4$d = /* @__PURE__ */ template(`<button class=dropdown-select-option type=button role=option><span class=dropdown-select-option-copy><span class=dropdown-select-option-label>`);
6440
6509
  const DropdownSelect = (props) => {
6441
6510
  const [open, setOpen] = createSignal(false);
6442
6511
  let rootRef;
@@ -6460,7 +6529,7 @@ const DropdownSelect = (props) => {
6460
6529
  });
6461
6530
  });
6462
6531
  return (() => {
6463
- var _el$ = _tmpl$2$d(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
6532
+ var _el$ = _tmpl$2$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
6464
6533
  var _ref$ = rootRef;
6465
6534
  typeof _ref$ === "function" ? use(_ref$, _el$) : rootRef = _el$;
6466
6535
  _el$2.$$click = () => setOpen((current) => !current);
@@ -6470,13 +6539,13 @@ const DropdownSelect = (props) => {
6470
6539
  return open();
6471
6540
  },
6472
6541
  get children() {
6473
- var _el$5 = _tmpl$$d();
6542
+ var _el$5 = _tmpl$$e();
6474
6543
  insert(_el$5, createComponent(For, {
6475
6544
  get each() {
6476
6545
  return props.options;
6477
6546
  },
6478
6547
  children: (option) => (() => {
6479
- var _el$6 = _tmpl$4$c(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
6548
+ var _el$6 = _tmpl$4$d(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
6480
6549
  _el$6.$$click = () => {
6481
6550
  props.onChange(option.value);
6482
6551
  setOpen(false);
@@ -6487,7 +6556,7 @@ const DropdownSelect = (props) => {
6487
6556
  return option.description;
6488
6557
  },
6489
6558
  get children() {
6490
- var _el$9 = _tmpl$3$c();
6559
+ var _el$9 = _tmpl$3$d();
6491
6560
  insert(_el$9, () => option.description);
6492
6561
  return _el$9;
6493
6562
  }
@@ -6673,7 +6742,7 @@ function renderKitPrompt(kit, values) {
6673
6742
  (_, key) => values[key] ?? ""
6674
6743
  );
6675
6744
  }
6676
- var _tmpl$$c = /* @__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$c = /* @__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$b = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$b = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$a = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$a = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$8 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$7 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$5 = /* @__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$4 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$4 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$4 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$4 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$4 = /* @__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$3 = /* @__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$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$3 = /* @__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$1 = /* @__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$1 = /* @__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$1 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$1 = /* @__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$1 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$1 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$1 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$1 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$1 = /* @__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>`);
6745
+ var _tmpl$$d = /* @__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$d = /* @__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$c = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$b = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$b = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$9 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$8 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$6 = /* @__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$5 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$5 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$5 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$5 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$5 = /* @__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$4 = /* @__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$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$4 = /* @__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$3 = /* @__PURE__ */ template(`<p class=kit-schedule-error>`), _tmpl$17$3 = /* @__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$3 = /* @__PURE__ */ template(`<div class=kit-schedule-section><label class=kit-schedule-toggle><input type=checkbox>Schedule for later`), _tmpl$19$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Run at</label><input type=datetime-local class="kit-form-input kit-schedule-time">`), _tmpl$20$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Day</label><select class="kit-form-input kit-schedule-time">`), _tmpl$21$3 = /* @__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$1 = /* @__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$1 = /* @__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$1 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$1 = /* @__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$1 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$1 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$1 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$1 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$1 = /* @__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>`);
6677
6746
  const ICON_MAP = {
6678
6747
  BookOpen: book_open_default,
6679
6748
  Tag: tag_default,
@@ -6775,8 +6844,8 @@ const AutomationTab = (props) => {
6775
6844
  const [editError, setEditError] = createSignal(null);
6776
6845
  onMount(() => {
6777
6846
  void window.vessel.schedule.getAll().then(setScheduledJobs);
6778
- const cleanup = window.vessel.schedule.onJobsUpdate(setScheduledJobs);
6779
- onCleanup(cleanup);
6847
+ const cleanup2 = window.vessel.schedule.onJobsUpdate(setScheduledJobs);
6848
+ onCleanup(cleanup2);
6780
6849
  const closeMenu = () => setOpenMenuJobId(null);
6781
6850
  document.addEventListener("click", closeMenu);
6782
6851
  onCleanup(() => document.removeEventListener("click", closeMenu));
@@ -6998,7 +7067,7 @@ const AutomationTab = (props) => {
6998
7067
  return memo(() => !!!premiumData.loading)() && !isPremium();
6999
7068
  },
7000
7069
  get children() {
7001
- var _el$2 = _tmpl$$c(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
7070
+ var _el$2 = _tmpl$$d(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
7002
7071
  insert(_el$3, createComponent(zap_default, {
7003
7072
  size: 24
7004
7073
  }));
@@ -7012,7 +7081,7 @@ const AutomationTab = (props) => {
7012
7081
  },
7013
7082
  get children() {
7014
7083
  return [(() => {
7015
- var _el$7 = _tmpl$2$c(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$0.nextSibling;
7084
+ var _el$7 = _tmpl$2$d(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$0.nextSibling;
7016
7085
  insert(_el$0, () => allKits().length, _el$1);
7017
7086
  _el$10.$$click = () => void handleInstall();
7018
7087
  return _el$7;
@@ -7021,13 +7090,13 @@ const AutomationTab = (props) => {
7021
7090
  return installError() !== null;
7022
7091
  },
7023
7092
  get children() {
7024
- var _el$11 = _tmpl$3$b(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
7093
+ var _el$11 = _tmpl$3$c(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
7025
7094
  insert(_el$12, installError);
7026
7095
  _el$13.$$click = () => setInstallError(null);
7027
7096
  return _el$11;
7028
7097
  }
7029
7098
  }), (() => {
7030
- var _el$14 = _tmpl$4$b();
7099
+ var _el$14 = _tmpl$4$c();
7031
7100
  insert(_el$14, createComponent(For, {
7032
7101
  get each() {
7033
7102
  return allKits();
@@ -7087,14 +7156,14 @@ const AutomationTab = (props) => {
7087
7156
  },
7088
7157
  get children() {
7089
7158
  return [(() => {
7090
- var _el$15 = _tmpl$5$a(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
7159
+ var _el$15 = _tmpl$5$b(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
7091
7160
  insert(_el$15, createComponent(clock_default, {
7092
7161
  size: 12
7093
7162
  }), _el$16);
7094
7163
  insert(_el$17, () => scheduledJobs().length);
7095
7164
  return _el$15;
7096
7165
  })(), (() => {
7097
- var _el$18 = _tmpl$6$a();
7166
+ var _el$18 = _tmpl$6$b();
7098
7167
  insert(_el$18, createComponent(For, {
7099
7168
  get each() {
7100
7169
  return scheduledJobs();
@@ -7172,14 +7241,14 @@ const AutomationTab = (props) => {
7172
7241
  },
7173
7242
  get children() {
7174
7243
  return [(() => {
7175
- var _el$19 = _tmpl$7$8(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
7244
+ var _el$19 = _tmpl$7$9(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
7176
7245
  insert(_el$19, createComponent(zap_default, {
7177
7246
  size: 12
7178
7247
  }), _el$20);
7179
7248
  insert(_el$21, () => automationActivities2().length);
7180
7249
  return _el$19;
7181
7250
  })(), (() => {
7182
- var _el$22 = _tmpl$8$7();
7251
+ var _el$22 = _tmpl$8$8();
7183
7252
  insert(_el$22, createComponent(For, {
7184
7253
  get each() {
7185
7254
  return automationActivities2();
@@ -7236,7 +7305,7 @@ const AutomationTab = (props) => {
7236
7305
  },
7237
7306
  get children() {
7238
7307
  return [(() => {
7239
- var _el$23 = _tmpl$9$5(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
7308
+ var _el$23 = _tmpl$9$6(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
7240
7309
  _el$24.$$click = () => {
7241
7310
  setSelectedKit(null);
7242
7311
  setEditingTaskJobId(null);
@@ -7250,11 +7319,11 @@ const AutomationTab = (props) => {
7250
7319
  insert(_el$25, () => selectedKit().name, null);
7251
7320
  return _el$23;
7252
7321
  })(), (() => {
7253
- var _el$26 = _tmpl$0$4();
7322
+ var _el$26 = _tmpl$0$5();
7254
7323
  insert(_el$26, () => selectedKit().description);
7255
7324
  return _el$26;
7256
7325
  })(), (() => {
7257
- var _el$27 = _tmpl$1$4();
7326
+ var _el$27 = _tmpl$1$5();
7258
7327
  insert(_el$27, createComponent(For, {
7259
7328
  get each() {
7260
7329
  return selectedKit().inputs;
@@ -7318,13 +7387,13 @@ const AutomationTab = (props) => {
7318
7387
  return selectedKit().estimatedMinutes !== void 0;
7319
7388
  },
7320
7389
  get children() {
7321
- var _el$28 = _tmpl$10$4(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
7390
+ var _el$28 = _tmpl$10$5(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
7322
7391
  _el$31.nextSibling;
7323
7392
  insert(_el$28, () => selectedKit().estimatedMinutes, _el$31);
7324
7393
  return _el$28;
7325
7394
  }
7326
7395
  }), (() => {
7327
- var _el$32 = _tmpl$11$4();
7396
+ var _el$32 = _tmpl$11$5();
7328
7397
  _el$32.$$click = () => void handleRun();
7329
7398
  insert(_el$32, createComponent(Show, {
7330
7399
  get when() {
@@ -7338,7 +7407,7 @@ const AutomationTab = (props) => {
7338
7407
  createRenderEffect(() => _el$32.disabled = !canRun());
7339
7408
  return _el$32;
7340
7409
  })(), (() => {
7341
- var _el$33 = _tmpl$18$2(), _el$34 = _el$33.firstChild, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling;
7410
+ var _el$33 = _tmpl$18$3(), _el$34 = _el$33.firstChild, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling;
7342
7411
  _el$35.addEventListener("change", (e) => setScheduleEnabled(e.currentTarget.checked));
7343
7412
  insert(_el$34, createComponent(clock_default, {
7344
7413
  size: 13
@@ -7348,7 +7417,7 @@ const AutomationTab = (props) => {
7348
7417
  return scheduleEnabled();
7349
7418
  },
7350
7419
  get children() {
7351
- var _el$37 = _tmpl$17$2(), _el$38 = _el$37.firstChild, _el$52 = _el$38.nextSibling, _el$53 = _el$52.nextSibling;
7420
+ var _el$37 = _tmpl$17$3(), _el$38 = _el$37.firstChild, _el$52 = _el$38.nextSibling, _el$53 = _el$52.nextSibling;
7352
7421
  insert(_el$38, createComponent(For, {
7353
7422
  each: ["once", "hourly", "daily", "weekly"],
7354
7423
  children: (type) => (() => {
@@ -7365,7 +7434,7 @@ const AutomationTab = (props) => {
7365
7434
  return schedType() === "once";
7366
7435
  },
7367
7436
  get children() {
7368
- var _el$39 = _tmpl$12$4(), _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
7437
+ var _el$39 = _tmpl$12$5(), _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
7369
7438
  _el$41.$$input = (e) => setSchedRunAt(e.currentTarget.value);
7370
7439
  createRenderEffect(() => _el$41.value = schedRunAt());
7371
7440
  return _el$39;
@@ -7376,7 +7445,7 @@ const AutomationTab = (props) => {
7376
7445
  return schedType() === "daily";
7377
7446
  },
7378
7447
  get children() {
7379
- var _el$42 = _tmpl$13$3(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling;
7448
+ var _el$42 = _tmpl$13$4(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling;
7380
7449
  _el$44.$$input = (e) => parseTimeInput(e.currentTarget.value);
7381
7450
  createRenderEffect(() => _el$44.value = timeValue());
7382
7451
  return _el$42;
@@ -7388,7 +7457,7 @@ const AutomationTab = (props) => {
7388
7457
  },
7389
7458
  get children() {
7390
7459
  return [(() => {
7391
- var _el$45 = _tmpl$14$3(), _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling;
7460
+ var _el$45 = _tmpl$14$4(), _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling;
7392
7461
  _el$47.addEventListener("change", (e) => setSchedDayOfWeek(Number(e.currentTarget.value)));
7393
7462
  insert(_el$47, createComponent(For, {
7394
7463
  each: DAY_NAMES,
@@ -7402,7 +7471,7 @@ const AutomationTab = (props) => {
7402
7471
  createRenderEffect(() => _el$47.value = schedDayOfWeek());
7403
7472
  return _el$45;
7404
7473
  })(), (() => {
7405
- var _el$48 = _tmpl$15$3(), _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
7474
+ var _el$48 = _tmpl$15$4(), _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
7406
7475
  _el$50.$$input = (e) => parseTimeInput(e.currentTarget.value);
7407
7476
  createRenderEffect(() => _el$50.value = timeValue());
7408
7477
  return _el$48;
@@ -7414,7 +7483,7 @@ const AutomationTab = (props) => {
7414
7483
  return scheduleError() !== null;
7415
7484
  },
7416
7485
  get children() {
7417
- var _el$51 = _tmpl$16$2();
7486
+ var _el$51 = _tmpl$16$3();
7418
7487
  insert(_el$51, scheduleError);
7419
7488
  return _el$51;
7420
7489
  }
@@ -7455,7 +7524,7 @@ const AutomationTab = (props) => {
7455
7524
  return editType() === "once";
7456
7525
  },
7457
7526
  get children() {
7458
- var _el$60 = _tmpl$19$2(), _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling;
7527
+ var _el$60 = _tmpl$19$3(), _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling;
7459
7528
  _el$62.$$input = (e) => setEditRunAt(e.currentTarget.value);
7460
7529
  createRenderEffect(() => _el$62.value = editRunAt());
7461
7530
  return _el$60;
@@ -7471,7 +7540,7 @@ const AutomationTab = (props) => {
7471
7540
  return editType() === "weekly";
7472
7541
  },
7473
7542
  get children() {
7474
- var _el$63 = _tmpl$20$2(), _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling;
7543
+ var _el$63 = _tmpl$20$3(), _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling;
7475
7544
  _el$65.addEventListener("change", (e) => setEditDayOfWeek(Number(e.currentTarget.value)));
7476
7545
  insert(_el$65, createComponent(For, {
7477
7546
  each: DAY_NAMES,
@@ -7486,7 +7555,7 @@ const AutomationTab = (props) => {
7486
7555
  return _el$63;
7487
7556
  }
7488
7557
  }), (() => {
7489
- var _el$66 = _tmpl$21$2(), _el$67 = _el$66.firstChild, _el$68 = _el$67.nextSibling;
7558
+ var _el$66 = _tmpl$21$3(), _el$67 = _el$66.firstChild, _el$68 = _el$67.nextSibling;
7490
7559
  _el$68.$$input = (e) => parseEditTimeInput(e.currentTarget.value);
7491
7560
  createRenderEffect(() => _el$68.value = editTimeValue());
7492
7561
  return _el$66;
@@ -7498,7 +7567,7 @@ const AutomationTab = (props) => {
7498
7567
  return editError();
7499
7568
  },
7500
7569
  get children() {
7501
- var _el$69 = _tmpl$16$2();
7570
+ var _el$69 = _tmpl$16$3();
7502
7571
  insert(_el$69, editError);
7503
7572
  return _el$69;
7504
7573
  }
@@ -7512,6 +7581,675 @@ const AutomationTab = (props) => {
7512
7581
  })();
7513
7582
  };
7514
7583
  delegateEvents(["click", "input", "keydown", "contextmenu"]);
7584
+ const initialState = {
7585
+ phase: "idle",
7586
+ supervisionMode: "interactive",
7587
+ includeTraces: false,
7588
+ objectives: null,
7589
+ threads: [],
7590
+ threadFindings: [],
7591
+ report: null,
7592
+ subAgentTraces: [],
7593
+ error: null,
7594
+ startedAt: null,
7595
+ originalQuery: null
7596
+ };
7597
+ const [researchState, setResearchState] = createSignal(initialState);
7598
+ const [isResearchPremium, setIsResearchPremium] = createSignal(false);
7599
+ let initialized = false;
7600
+ let cleanup = null;
7601
+ let premiumCleanup = null;
7602
+ function init() {
7603
+ if (initialized) return;
7604
+ initialized = true;
7605
+ window.vessel.premium.getState().then((premium) => {
7606
+ setIsResearchPremium(isPremiumStatus(premium.status));
7607
+ });
7608
+ premiumCleanup = window.vessel.premium.onUpdate((premium) => {
7609
+ setIsResearchPremium(isPremiumStatus(premium.status));
7610
+ });
7611
+ window.vessel.research.getState().then((state) => {
7612
+ setResearchState(state);
7613
+ });
7614
+ cleanup = window.vessel.research.onStateUpdate((state) => {
7615
+ setResearchState(state);
7616
+ });
7617
+ }
7618
+ function useResearch() {
7619
+ init();
7620
+ return {
7621
+ state: researchState,
7622
+ isPremium: isResearchPremium,
7623
+ startBrief(query) {
7624
+ return window.vessel.research.startBrief(query);
7625
+ },
7626
+ confirmBrief() {
7627
+ return window.vessel.research.confirmBrief();
7628
+ },
7629
+ approveObjectives(options) {
7630
+ return window.vessel.research.approveObjectives(options);
7631
+ },
7632
+ setMode(mode) {
7633
+ return window.vessel.research.setMode(mode);
7634
+ },
7635
+ setTraces(include) {
7636
+ return window.vessel.research.setTraces(include);
7637
+ },
7638
+ cancel() {
7639
+ return window.vessel.research.cancel();
7640
+ },
7641
+ exportReport() {
7642
+ return window.vessel.research.exportReport();
7643
+ },
7644
+ destroy() {
7645
+ if (cleanup) {
7646
+ cleanup();
7647
+ cleanup = null;
7648
+ }
7649
+ if (premiumCleanup) {
7650
+ premiumCleanup();
7651
+ premiumCleanup = null;
7652
+ }
7653
+ initialized = false;
7654
+ }
7655
+ };
7656
+ }
7657
+ var _tmpl$$c = /* @__PURE__ */ template(`<div class=markdown-content>`), _tmpl$2$c = /* @__PURE__ */ template(`<div>`), _tmpl$3$b = /* @__PURE__ */ template(`<div class=research-premium-notice><span class=premium-badge>Premium</span> Brief is free; full research and export require Vessel Premium.`), _tmpl$4$b = /* @__PURE__ */ template(`<div class=research-brief-status>`), _tmpl$5$a = /* @__PURE__ */ template(`<div class=research-idle><h3>Research Desk</h3><p>Start with a topic. Vessel will shape it into a focused brief, draft a research plan, and then send sub-agents after the strongest sources.</p><form class=research-topic-form><textarea class=research-topic-input rows=3 placeholder="What should we research?"></textarea><button class=research-start-btn type=submit>Start Briefing`), _tmpl$6$a = /* @__PURE__ */ template(`<div class=research-brief-loading role=status aria-live=polite><span class=research-spinner aria-hidden=true></span><div><div class=research-loading-title>Brief started</div><div class=research-loading-copy>Preparing the first briefing question...`), _tmpl$7$8 = /* @__PURE__ */ template(`<div class="research-brief-status thinking"role=status aria-live=polite><span class=research-spinner aria-hidden=true></span><span>Thinking...`), _tmpl$8$7 = /* @__PURE__ */ template(`<div class=research-brief-status> queued`), _tmpl$9$5 = /* @__PURE__ */ template(`<div class=research-phase><h3>Briefing</h3><p>Work through the brief here. Once the assistant has enough context, turn it into a research plan.</p><div class=research-brief-thread></div><form class=research-brief-form><textarea class=research-brief-input rows=2></textarea><button type=submit></button></form><div class=phase-controls><button>Build Research Plan</button><button class=secondary>Cancel`), _tmpl$0$4 = /* @__PURE__ */ template(`<div class=research-phase><h3>Planning Research</h3><p>Creating Research Objectives based on your brief...`), _tmpl$1$4 = /* @__PURE__ */ template(`<div class=research-phase><h3>Research Objectives`), _tmpl$10$4 = /* @__PURE__ */ template(`<p> of <!> threads complete`), _tmpl$11$4 = /* @__PURE__ */ template(`<button>Switch to Walk-Away`), _tmpl$12$4 = /* @__PURE__ */ template(`<button>Switch to Interactive`), _tmpl$13$3 = /* @__PURE__ */ template(`<div class=research-phase><h3>Researching`), _tmpl$14$3 = /* @__PURE__ */ template(`<div class=research-phase><h3>Synthesizing Report</h3><p>Compiling findings into the Research Report...`), _tmpl$15$3 = /* @__PURE__ */ template(`<div class=research-phase><h3>Report Ready`), _tmpl$16$2 = /* @__PURE__ */ template(`<div class=research-desk>`), _tmpl$17$2 = /* @__PURE__ */ template(`<div class="research-quick-replies inline"aria-label="Suggested briefing responses">`), _tmpl$18$2 = /* @__PURE__ */ template(`<button type=button class=research-quick-reply>`), _tmpl$19$2 = /* @__PURE__ */ template(`<div class=objectives-card><p><strong>Question:</strong> </p><p><strong>Threads:</strong> </p><ul></ul><label class=mode-toggle><input type=checkbox>Walk-away mode (notified when done)</label><label class=traces-toggle><input type=checkbox>Include agent traces with report</label><div class=phase-controls><button>Start Research</button><button class=secondary>Cancel`), _tmpl$20$2 = /* @__PURE__ */ template(`<li> (<!> sources)`), _tmpl$21$2 = /* @__PURE__ */ template(`<div class=report-card><h4></h4><p>...</p><p> sources cited</p><button>Export as Markdown</button><button class=secondary>New Research`);
7658
+ const ResearchBriefMarkdown = (props) => {
7659
+ const html2 = createMemo(() => renderMarkdown(props.content));
7660
+ return (() => {
7661
+ var _el$ = _tmpl$$c();
7662
+ createRenderEffect(() => _el$.innerHTML = html2());
7663
+ return _el$;
7664
+ })();
7665
+ };
7666
+ const ResearchBriefMessage = (props) => (() => {
7667
+ var _el$2 = _tmpl$2$c();
7668
+ insert(_el$2, createComponent(Show, {
7669
+ get when() {
7670
+ return props.role === "assistant";
7671
+ },
7672
+ get fallback() {
7673
+ return props.content;
7674
+ },
7675
+ get children() {
7676
+ return createComponent(ResearchBriefMarkdown, {
7677
+ get content() {
7678
+ return props.content;
7679
+ }
7680
+ });
7681
+ }
7682
+ }));
7683
+ createRenderEffect(() => className(_el$2, `research-brief-message ${props.role}`));
7684
+ return _el$2;
7685
+ })();
7686
+ function uniqueQuickReplies(options) {
7687
+ const seen = /* @__PURE__ */ new Set();
7688
+ return options.filter((option) => {
7689
+ const key = option.label.toLowerCase();
7690
+ if (seen.has(key)) return false;
7691
+ seen.add(key);
7692
+ return true;
7693
+ });
7694
+ }
7695
+ const YES_NO_QUESTION_PATTERN = /^\s*(?:do you want|should (?:i|we|vessel)|would you like|is it okay|okay to|shall (?:i|we))\b/i;
7696
+ const PROCEED_QUESTION_PATTERN = /\b(?:proceed|continue|use defaults?|make assumptions?|sensible defaults?)\b/i;
7697
+ const EXPLICIT_OPTION_PREFIX = /^\s*(?:[-*+•–—]|\d+[.)]|\(\d+\)|[A-Za-z][.)]|\([A-Za-z]\)|Option\s+\d+[::])\s+/i;
7698
+ const SENTENCE_STARTER = /^(?:Here|These|They|You|I\s|We\s|This|That|If|When|Because|Also|Please|Let|Will|Would|Could|Should|Can|May|Might|Must|Shall)\b/i;
7699
+ function makeQuickReply(label) {
7700
+ const cleaned = label.replace(EXPLICIT_OPTION_PREFIX, "").replace(/\s+/g, " ").trim().replace(/[.?!:]$/, "");
7701
+ if (cleaned.length < 2 || cleaned.length > 80) return null;
7702
+ return {
7703
+ label: cleaned,
7704
+ response: `Let's use: ${cleaned}.`
7705
+ };
7706
+ }
7707
+ function isExplicitOptionLine(line) {
7708
+ if (!EXPLICIT_OPTION_PREFIX.test(line)) return false;
7709
+ const cleaned = line.replace(EXPLICIT_OPTION_PREFIX, "").trim();
7710
+ if (!cleaned) return false;
7711
+ return !/[?]$/.test(cleaned);
7712
+ }
7713
+ function extractDelimitedOptions(text2) {
7714
+ return text2.split(/\s*(?:;|,|\/|\||\s+-\s+|\bor\b)\s*/i).map(makeQuickReply).filter((option) => option !== null);
7715
+ }
7716
+ function extractFollowUpOptions(prompt) {
7717
+ const lines = prompt.split("\n");
7718
+ const options = [];
7719
+ for (let i = 0; i < lines.length - 1; i++) {
7720
+ const line = lines[i].trim();
7721
+ if (!line.includes("?")) continue;
7722
+ let j = i + 1;
7723
+ while (j < lines.length && !lines[j].trim()) j++;
7724
+ if (j >= lines.length) continue;
7725
+ const nextLine = lines[j].trim();
7726
+ if (EXPLICIT_OPTION_PREFIX.test(nextLine)) continue;
7727
+ if (!/[,;\/|]|\bor\b/.test(nextLine)) continue;
7728
+ options.push(...extractDelimitedOptions(nextLine));
7729
+ }
7730
+ return uniqueQuickReplies(options);
7731
+ }
7732
+ function extractInlineOptions(prompt) {
7733
+ const options = [];
7734
+ for (const line of prompt.split("\n")) {
7735
+ const trimmed = line.trim();
7736
+ if (!/\?/.test(trimmed)) continue;
7737
+ const afterQuestion = trimmed.slice(trimmed.lastIndexOf("?") + 1).trim();
7738
+ if (!afterQuestion) continue;
7739
+ if (/\b(?:options?|choices?|examples?|example answers?|examples? include|sample answers?|sample responses?)\b.*[::]/i.test(afterQuestion)) {
7740
+ continue;
7741
+ }
7742
+ const hasDelimiters = /[,;\/|]|\bor\b/.test(afterQuestion);
7743
+ const hasDashList = /\s+-\s+/.test(afterQuestion);
7744
+ if (!hasDelimiters && !hasDashList) continue;
7745
+ if (hasDelimiters) {
7746
+ options.push(...extractDelimitedOptions(afterQuestion));
7747
+ }
7748
+ if (hasDashList) {
7749
+ const parts = afterQuestion.split(/\s+-\s+/);
7750
+ for (const part of parts) {
7751
+ const option = makeQuickReply(part);
7752
+ if (option) options.push(option);
7753
+ }
7754
+ }
7755
+ }
7756
+ return uniqueQuickReplies(options);
7757
+ }
7758
+ function extractImplicitOptions(prompt) {
7759
+ const lines = prompt.split("\n");
7760
+ const options = [];
7761
+ let questionIdx = -1;
7762
+ for (let i2 = lines.length - 1; i2 >= 0; i2--) {
7763
+ if (lines[i2].includes("?")) {
7764
+ questionIdx = i2;
7765
+ break;
7766
+ }
7767
+ }
7768
+ if (questionIdx < 0) return [];
7769
+ let i = questionIdx + 1;
7770
+ while (i < lines.length && !lines[i].trim()) i++;
7771
+ const candidates = [];
7772
+ for (; i < lines.length; i++) {
7773
+ const line = lines[i].trim();
7774
+ if (!line) break;
7775
+ if (EXPLICIT_OPTION_PREFIX.test(line)) break;
7776
+ if (SENTENCE_STARTER.test(line)) break;
7777
+ const hasDelimiters = /[,;\/|]|\bor\b/.test(line);
7778
+ if (line.length > 80 && !hasDelimiters) break;
7779
+ candidates.push(line);
7780
+ }
7781
+ if (candidates.length >= 2 && candidates.length <= 6) {
7782
+ for (const candidate of candidates) {
7783
+ const option = makeQuickReply(candidate);
7784
+ if (option) options.push(option);
7785
+ }
7786
+ }
7787
+ return uniqueQuickReplies(options);
7788
+ }
7789
+ function extractExampleQuickReplies(prompt) {
7790
+ const options = [];
7791
+ for (const line of prompt.split("\n")) {
7792
+ if (!/\b(?:examples?|sample (?:answers?|responses?)|e\.g\.|for instance|you (?:could|might) (?:say|answer|reply))\b/i.test(line)) {
7793
+ continue;
7794
+ }
7795
+ const quoted = Array.from(line.matchAll(/["“”']([^"“”']{2,140})["“”']/g), (match) => match[1]).map(makeQuickReply).filter((option) => option !== null);
7796
+ options.push(...quoted);
7797
+ if (quoted.length === 0) {
7798
+ const exampleText = line.replace(/^.*?\b(?:examples? include|example answers?|examples?|sample answers?|sample responses?|e\.g\.|for instance|you might (?:say|answer|reply)|you could (?:say|answer|reply))[::]?\s*/i, "").replace(/^(?:include|answers?|responses?)[::]\s*/i, "").trim();
7799
+ options.push(...extractDelimitedOptions(exampleText));
7800
+ }
7801
+ }
7802
+ return uniqueQuickReplies(options);
7803
+ }
7804
+ function extractExplicitQuickReplies(prompt) {
7805
+ const options = [];
7806
+ for (const line of prompt.split("\n")) {
7807
+ const option = makeQuickReply(line);
7808
+ if (isExplicitOptionLine(line) && option) {
7809
+ options.push(option);
7810
+ }
7811
+ }
7812
+ const inlineMatch = prompt.match(/(?:choose|pick|select|prefer|between|among)\s+(.+?)(?:\?|$)/i);
7813
+ if (inlineMatch) {
7814
+ options.push(...extractDelimitedOptions(inlineMatch[1]));
7815
+ }
7816
+ options.push(...extractInlineOptions(prompt));
7817
+ const lines = prompt.split("\n");
7818
+ for (let i = 0; i < lines.length; i++) {
7819
+ if (!/\b(?:options?|choices?)\s*[::]/i.test(lines[i])) continue;
7820
+ const restOfLine = lines[i].replace(/^.*?\b(?:options?|choices?)\s*[::]\s*/i, "").trim();
7821
+ if (restOfLine) {
7822
+ options.push(...extractDelimitedOptions(restOfLine));
7823
+ }
7824
+ let j = i + 1;
7825
+ while (j < lines.length && !lines[j].trim()) j++;
7826
+ for (; j < lines.length; j++) {
7827
+ const line = lines[j].trim();
7828
+ if (!line) break;
7829
+ const option = makeQuickReply(line);
7830
+ if (option) options.push(option);
7831
+ }
7832
+ }
7833
+ options.push(...extractExampleQuickReplies(prompt));
7834
+ options.push(...extractFollowUpOptions(prompt));
7835
+ return uniqueQuickReplies(options);
7836
+ }
7837
+ function buildQuickReplies(prompt) {
7838
+ const explicitOptions = extractExplicitQuickReplies(prompt);
7839
+ if (explicitOptions.length > 0) {
7840
+ return explicitOptions.slice(0, 6);
7841
+ }
7842
+ const implicitOptions = extractImplicitOptions(prompt);
7843
+ if (implicitOptions.length > 0) {
7844
+ return implicitOptions.slice(0, 6);
7845
+ }
7846
+ if (YES_NO_QUESTION_PATTERN.test(prompt)) {
7847
+ return [{
7848
+ label: "Yes",
7849
+ response: "Yes."
7850
+ }, {
7851
+ label: "No",
7852
+ response: "No."
7853
+ }];
7854
+ }
7855
+ if (PROCEED_QUESTION_PATTERN.test(prompt)) {
7856
+ return [{
7857
+ label: "Use defaults",
7858
+ response: "Use sensible defaults and proceed. If a choice materially affects the report, call it out in the assumptions."
7859
+ }];
7860
+ }
7861
+ if (prompt.includes("?")) {
7862
+ return [{
7863
+ label: "Use defaults",
7864
+ response: "Use sensible defaults and proceed. If any assumption materially affects the report, call it out clearly."
7865
+ }];
7866
+ }
7867
+ return [];
7868
+ }
7869
+ function isDefaultQuickReply(option) {
7870
+ return option.label.toLowerCase() === "use defaults";
7871
+ }
7872
+ function pickResearchClarificationQuickReplies(clarification) {
7873
+ const parsedQuestionOptions = extractExplicitQuickReplies(clarification.question);
7874
+ const structuredOptions = clarification.options.map((option) => ({
7875
+ label: option.label,
7876
+ response: option.response
7877
+ }));
7878
+ if (parsedQuestionOptions.length > 0 && (structuredOptions.length === 0 || structuredOptions.every(isDefaultQuickReply))) {
7879
+ return parsedQuestionOptions;
7880
+ }
7881
+ return structuredOptions;
7882
+ }
7883
+ function findLatestAssistantQuickReplyTarget(messages2) {
7884
+ for (let i = messages2.length - 1; i >= 0; i -= 1) {
7885
+ const message = messages2[i];
7886
+ const content = message.content.trim();
7887
+ if (!content) continue;
7888
+ if (message.role !== "assistant") return "";
7889
+ if (content && buildQuickReplies(content).length > 0) {
7890
+ return content;
7891
+ }
7892
+ return "";
7893
+ }
7894
+ return "";
7895
+ }
7896
+ function findLatestResearchClarification(messages2, clarifications) {
7897
+ let latestAssistantContent = "";
7898
+ for (let i = messages2.length - 1; i >= 0; i -= 1) {
7899
+ const message = messages2[i];
7900
+ const content = message.content.trim();
7901
+ if (!content) continue;
7902
+ if (message.role !== "assistant") {
7903
+ return null;
7904
+ }
7905
+ latestAssistantContent = content;
7906
+ break;
7907
+ }
7908
+ if (!latestAssistantContent) return null;
7909
+ for (let i = clarifications.length - 1; i >= 0; i -= 1) {
7910
+ const clarification = clarifications[i];
7911
+ if (clarification.question.trim() === latestAssistantContent) {
7912
+ return clarification;
7913
+ }
7914
+ }
7915
+ return null;
7916
+ }
7917
+ const ResearchDesk = () => {
7918
+ const research = useResearch();
7919
+ const {
7920
+ query: sendChatQuery,
7921
+ messages: messages2,
7922
+ streamingText: streamingText2,
7923
+ isStreaming: isStreaming2,
7924
+ pendingQueryCount,
7925
+ researchClarifications: researchClarifications2
7926
+ } = useAI();
7927
+ const state = research.state;
7928
+ const [topicInput, setTopicInput] = createSignal("");
7929
+ const [briefInput, setBriefInput] = createSignal("");
7930
+ const [startError, setStartError] = createSignal("");
7931
+ const transcriptMessages = createMemo(() => {
7932
+ const allMessages = messages2();
7933
+ const originalQuery = state().originalQuery?.trim();
7934
+ if (!originalQuery) return allMessages;
7935
+ for (let i = allMessages.length - 1; i >= 0; i -= 1) {
7936
+ const message = allMessages[i];
7937
+ if (message.role === "user" && message.content.trim() === originalQuery) {
7938
+ return allMessages.slice(i);
7939
+ }
7940
+ }
7941
+ return [];
7942
+ });
7943
+ const hasAssistantBrief = createMemo(() => transcriptMessages().some((message) => message.role === "assistant"));
7944
+ const latestResearchClarification = createMemo(() => findLatestResearchClarification(transcriptMessages(), researchClarifications2()));
7945
+ const latestAssistantQuickReplyTarget = createMemo(() => latestResearchClarification()?.question ?? findLatestAssistantQuickReplyTarget(transcriptMessages()));
7946
+ const quickReplies = createMemo(() => {
7947
+ const clarification = latestResearchClarification();
7948
+ if (clarification) {
7949
+ return pickResearchClarificationQuickReplies(clarification);
7950
+ }
7951
+ return latestAssistantQuickReplyTarget() ? buildQuickReplies(latestAssistantQuickReplyTarget()) : [];
7952
+ });
7953
+ const shouldShowQuickRepliesForMessage = (content) => quickReplies().length > 0 && content.trim() === latestAssistantQuickReplyTarget();
7954
+ const isBriefStarting = createMemo(() => state().phase === "briefing" && transcriptMessages().length === 0 && !streamingText2() && pendingQueryCount() === 0);
7955
+ const sendBriefMessage = async (message) => {
7956
+ const trimmed = message.trim();
7957
+ if (!trimmed) return;
7958
+ setBriefInput("");
7959
+ await sendChatQuery(trimmed);
7960
+ };
7961
+ const startBrief = async () => {
7962
+ const query = topicInput().trim();
7963
+ if (!query) return;
7964
+ const result = await research.startBrief(query);
7965
+ if (result.accepted) {
7966
+ setStartError("");
7967
+ setTopicInput("");
7968
+ await sendBriefMessage(query);
7969
+ } else {
7970
+ setStartError(result.reason === "busy" ? "Research Desk is already working on a brief." : "Could not start the briefing. Check your chat provider settings and try again.");
7971
+ }
7972
+ };
7973
+ return (() => {
7974
+ var _el$3 = _tmpl$16$2();
7975
+ insert(_el$3, createComponent(Switch, {
7976
+ get children() {
7977
+ return [createComponent(Match, {
7978
+ get when() {
7979
+ return state().phase === "idle";
7980
+ },
7981
+ get children() {
7982
+ var _el$4 = _tmpl$5$a(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$8 = _el$6.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
7983
+ insert(_el$4, createComponent(Show, {
7984
+ get when() {
7985
+ return !research.isPremium();
7986
+ },
7987
+ get children() {
7988
+ return _tmpl$3$b();
7989
+ }
7990
+ }), _el$8);
7991
+ _el$8.addEventListener("submit", (event) => {
7992
+ event.preventDefault();
7993
+ void startBrief();
7994
+ });
7995
+ _el$9.$$keydown = (event) => {
7996
+ if (event.key === "Enter" && !event.shiftKey) {
7997
+ event.preventDefault();
7998
+ void startBrief();
7999
+ }
8000
+ };
8001
+ _el$9.$$input = (event) => setTopicInput(event.currentTarget.value);
8002
+ insert(_el$4, createComponent(Show, {
8003
+ get when() {
8004
+ return startError();
8005
+ },
8006
+ get children() {
8007
+ var _el$1 = _tmpl$4$b();
8008
+ insert(_el$1, startError);
8009
+ return _el$1;
8010
+ }
8011
+ }), null);
8012
+ createRenderEffect(() => _el$0.disabled = !topicInput().trim());
8013
+ createRenderEffect(() => _el$9.value = topicInput());
8014
+ return _el$4;
8015
+ }
8016
+ }), createComponent(Match, {
8017
+ get when() {
8018
+ return state().phase === "briefing";
8019
+ },
8020
+ get children() {
8021
+ var _el$10 = _tmpl$9$5(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$18 = _el$13.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;
8022
+ insert(_el$13, createComponent(Show, {
8023
+ get when() {
8024
+ return isBriefStarting();
8025
+ },
8026
+ get children() {
8027
+ return _tmpl$6$a();
8028
+ }
8029
+ }), null);
8030
+ insert(_el$13, createComponent(For, {
8031
+ get each() {
8032
+ return transcriptMessages();
8033
+ },
8034
+ children: (message) => [createComponent(ResearchBriefMessage, {
8035
+ get role() {
8036
+ return message.role;
8037
+ },
8038
+ get content() {
8039
+ return message.content;
8040
+ }
8041
+ }), createComponent(Show, {
8042
+ get when() {
8043
+ return memo(() => message.role === "assistant")() && shouldShowQuickRepliesForMessage(message.content);
8044
+ },
8045
+ get children() {
8046
+ var _el$38 = _tmpl$17$2();
8047
+ insert(_el$38, createComponent(For, {
8048
+ get each() {
8049
+ return quickReplies();
8050
+ },
8051
+ children: (option) => (() => {
8052
+ var _el$39 = _tmpl$18$2();
8053
+ _el$39.$$click = () => void sendBriefMessage(option.response);
8054
+ insert(_el$39, () => option.label);
8055
+ return _el$39;
8056
+ })()
8057
+ }));
8058
+ return _el$38;
8059
+ }
8060
+ })]
8061
+ }), null);
8062
+ insert(_el$13, createComponent(Show, {
8063
+ get when() {
8064
+ return memo(() => !!isStreaming2())() && streamingText2();
8065
+ },
8066
+ get children() {
8067
+ return createComponent(ResearchBriefMessage, {
8068
+ role: "assistant",
8069
+ get content() {
8070
+ return streamingText2();
8071
+ }
8072
+ });
8073
+ }
8074
+ }), null);
8075
+ insert(_el$13, createComponent(Show, {
8076
+ get when() {
8077
+ return memo(() => !!isStreaming2())() && !streamingText2();
8078
+ },
8079
+ get children() {
8080
+ return _tmpl$7$8();
8081
+ }
8082
+ }), null);
8083
+ insert(_el$13, createComponent(Show, {
8084
+ get when() {
8085
+ return pendingQueryCount() > 0;
8086
+ },
8087
+ get children() {
8088
+ var _el$16 = _tmpl$8$7(), _el$17 = _el$16.firstChild;
8089
+ insert(_el$16, pendingQueryCount, _el$17);
8090
+ return _el$16;
8091
+ }
8092
+ }), null);
8093
+ _el$18.addEventListener("submit", (event) => {
8094
+ event.preventDefault();
8095
+ void sendBriefMessage(briefInput());
8096
+ });
8097
+ _el$19.$$keydown = (event) => {
8098
+ if (event.key === "Enter" && !event.shiftKey) {
8099
+ event.preventDefault();
8100
+ void sendBriefMessage(briefInput());
8101
+ }
8102
+ };
8103
+ _el$19.$$input = (event) => setBriefInput(event.currentTarget.value);
8104
+ insert(_el$20, () => isStreaming2() ? "Queue" : "Send");
8105
+ _el$22.$$click = async () => {
8106
+ const result = await research.confirmBrief();
8107
+ if (result.accepted) {
8108
+ await sendChatQuery("Build the Research Objectives from this brief now.");
8109
+ } else if (result.reason === "premium") {
8110
+ void window.vessel.premium.checkout();
8111
+ }
8112
+ };
8113
+ _el$23.$$click = () => research.cancel();
8114
+ createRenderEffect((_p$) => {
8115
+ var _v$ = isStreaming2() ? "Send now to queue a follow-up..." : "Please provide as much information about your research question as possible, e.g. constraints, preferred sources...", _v$2 = !briefInput().trim(), _v$3 = !hasAssistantBrief() || isStreaming2();
8116
+ _v$ !== _p$.e && setAttribute(_el$19, "placeholder", _p$.e = _v$);
8117
+ _v$2 !== _p$.t && (_el$20.disabled = _p$.t = _v$2);
8118
+ _v$3 !== _p$.a && (_el$22.disabled = _p$.a = _v$3);
8119
+ return _p$;
8120
+ }, {
8121
+ e: void 0,
8122
+ t: void 0,
8123
+ a: void 0
8124
+ });
8125
+ createRenderEffect(() => _el$19.value = briefInput());
8126
+ return _el$10;
8127
+ }
8128
+ }), createComponent(Match, {
8129
+ get when() {
8130
+ return state().phase === "planning";
8131
+ },
8132
+ get children() {
8133
+ return _tmpl$0$4();
8134
+ }
8135
+ }), createComponent(Match, {
8136
+ get when() {
8137
+ return state().phase === "awaiting_approval";
8138
+ },
8139
+ get children() {
8140
+ var _el$25 = _tmpl$1$4();
8141
+ _el$25.firstChild;
8142
+ insert(_el$25, createComponent(Show, {
8143
+ get when() {
8144
+ return state().objectives;
8145
+ },
8146
+ children: (obj) => (() => {
8147
+ var _el$40 = _tmpl$19$2(), _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild;
8148
+ _el$42.nextSibling;
8149
+ var _el$44 = _el$41.nextSibling, _el$45 = _el$44.firstChild;
8150
+ _el$45.nextSibling;
8151
+ var _el$47 = _el$44.nextSibling, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$48.nextSibling, _el$51 = _el$50.firstChild, _el$52 = _el$50.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling;
8152
+ insert(_el$41, () => obj().researchQuestion, null);
8153
+ insert(_el$44, () => obj().threads.length, null);
8154
+ insert(_el$47, () => obj().threads.map((t) => (() => {
8155
+ var _el$55 = _tmpl$20$2(), _el$56 = _el$55.firstChild, _el$58 = _el$56.nextSibling;
8156
+ _el$58.nextSibling;
8157
+ insert(_el$55, () => t.label, _el$56);
8158
+ insert(_el$55, () => t.sourceBudget, _el$58);
8159
+ return _el$55;
8160
+ })()));
8161
+ _el$49.addEventListener("change", (e) => research.setMode(e.currentTarget.checked ? "walk-away" : "interactive"));
8162
+ _el$51.addEventListener("change", (e) => research.setTraces(e.currentTarget.checked));
8163
+ _el$53.$$click = () => research.approveObjectives({
8164
+ supervisionMode: state().supervisionMode,
8165
+ includeTraces: state().includeTraces
8166
+ });
8167
+ _el$54.$$click = () => research.cancel();
8168
+ createRenderEffect(() => _el$49.checked = state().supervisionMode === "walk-away");
8169
+ createRenderEffect(() => _el$51.checked = state().includeTraces);
8170
+ return _el$40;
8171
+ })()
8172
+ }), null);
8173
+ return _el$25;
8174
+ }
8175
+ }), createComponent(Match, {
8176
+ get when() {
8177
+ return state().phase === "executing";
8178
+ },
8179
+ get children() {
8180
+ var _el$27 = _tmpl$13$3();
8181
+ _el$27.firstChild;
8182
+ insert(_el$27, createComponent(Show, {
8183
+ get when() {
8184
+ return state().threadFindings.length > 0;
8185
+ },
8186
+ get children() {
8187
+ var _el$29 = _tmpl$10$4(), _el$30 = _el$29.firstChild, _el$32 = _el$30.nextSibling;
8188
+ _el$32.nextSibling;
8189
+ insert(_el$29, () => state().threadFindings.length, _el$30);
8190
+ insert(_el$29, () => state().threads.length, _el$32);
8191
+ return _el$29;
8192
+ }
8193
+ }), null);
8194
+ insert(_el$27, createComponent(Show, {
8195
+ get when() {
8196
+ return state().supervisionMode === "interactive";
8197
+ },
8198
+ get children() {
8199
+ var _el$33 = _tmpl$11$4();
8200
+ _el$33.$$click = () => research.setMode("walk-away");
8201
+ return _el$33;
8202
+ }
8203
+ }), null);
8204
+ insert(_el$27, createComponent(Show, {
8205
+ get when() {
8206
+ return state().supervisionMode === "walk-away";
8207
+ },
8208
+ get children() {
8209
+ var _el$34 = _tmpl$12$4();
8210
+ _el$34.$$click = () => research.setMode("interactive");
8211
+ return _el$34;
8212
+ }
8213
+ }), null);
8214
+ return _el$27;
8215
+ }
8216
+ }), createComponent(Match, {
8217
+ get when() {
8218
+ return state().phase === "synthesizing";
8219
+ },
8220
+ get children() {
8221
+ return _tmpl$14$3();
8222
+ }
8223
+ }), createComponent(Match, {
8224
+ get when() {
8225
+ return state().phase === "delivered";
8226
+ },
8227
+ get children() {
8228
+ var _el$36 = _tmpl$15$3();
8229
+ _el$36.firstChild;
8230
+ insert(_el$36, createComponent(Show, {
8231
+ get when() {
8232
+ return state().report;
8233
+ },
8234
+ children: (report) => (() => {
8235
+ var _el$59 = _tmpl$21$2(), _el$60 = _el$59.firstChild, _el$61 = _el$60.nextSibling, _el$62 = _el$61.firstChild, _el$63 = _el$61.nextSibling, _el$64 = _el$63.firstChild, _el$65 = _el$63.nextSibling, _el$66 = _el$65.nextSibling;
8236
+ insert(_el$60, () => report().title);
8237
+ insert(_el$61, () => report().executiveSummary.slice(0, 300), _el$62);
8238
+ insert(_el$63, () => report().sourceIndex.length, _el$64);
8239
+ _el$65.$$click = () => research.exportReport();
8240
+ _el$66.$$click = () => research.cancel();
8241
+ return _el$59;
8242
+ })()
8243
+ }), null);
8244
+ return _el$36;
8245
+ }
8246
+ })];
8247
+ }
8248
+ }));
8249
+ return _el$3;
8250
+ })();
8251
+ };
8252
+ delegateEvents(["input", "keydown", "click"]);
7515
8253
  var _tmpl$$b = /* @__PURE__ */ template(`<div class=agent-muted>Loading...`), _tmpl$2$b = /* @__PURE__ */ template(`<div class=agent-muted>`), _tmpl$3$a = /* @__PURE__ */ template(`<div class=agent-muted>No changes detected yet.`), _tmpl$4$a = /* @__PURE__ */ template(`<div class=page-diff-timeline-header><div class=agent-section-title>Change history for this page</div><div class=agent-muted>Newest detections are first. Each entry is a saved change burst.`), _tmpl$5$9 = /* @__PURE__ */ template(`<div class=page-diff-history-list>`), _tmpl$6$9 = /* @__PURE__ */ template(`<div class=page-diff-timeline>`), _tmpl$7$7 = /* @__PURE__ */ template(`<div class=page-diff-history-item><div class=page-diff-history-time><span class=page-diff-history-label></span><span></span></div><div class=page-diff-history-card><div class=page-diff-history-summary-list></div><div class=page-diff-history-position>Entry <!> of `), _tmpl$8$6 = /* @__PURE__ */ template(`<span class=page-diff-history-summary-section>`), _tmpl$9$4 = /* @__PURE__ */ template(`<div class=page-diff-history-summary-row><span class=page-diff-history-summary>`);
7516
8254
  const PageDiffTimeline = () => {
7517
8255
  const {
@@ -7643,7 +8381,7 @@ const PageDiffTimeline = () => {
7643
8381
  })();
7644
8382
  };
7645
8383
  const vesselLogo = "" + new URL("vessel-logo-transparent-IT25qr-Z.png", import.meta.url).href;
7646
- var _tmpl$$a = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$a = /* @__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$9 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$4$9 = /* @__PURE__ */ template(`<button class=agent-primary-button type=button>Undo last action`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$6$8 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$7$6 = /* @__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$8$5 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$9$3 = /* @__PURE__ */ template(`<div class=bookmark-export-message>`), _tmpl$0$3 = /* @__PURE__ */ template(`<div class=bookmark-save-body><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Import HTML</button><button class=bookmark-secondary-button type=button>Import JSON`), _tmpl$1$3 = /* @__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></textarea><textarea class=bookmark-note-input placeholder="Intent: what is this page for?"rows=1></textarea><textarea class=bookmark-note-input placeholder="Expected content: what should be here?"rows=1></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input placeholder="Agent hints (one key:value per line)"rows=2>`), _tmpl$10$3 = /* @__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-export-card><div><div class=bookmark-panel-title>Export</div><div class=bookmark-panel-subtitle>Save browser-ready HTML or a full Vessel archive</div></div><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Browser HTML</button><button class=bookmark-secondary-button type=button>HTML + notes</button><button class=bookmark-secondary-button type=button>Vessel JSON</button></div></div><div class=bookmark-import-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Import Bookmarks</span><span class=bookmark-save-toggle-subtitle>Import from HTML or Vessel JSON</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><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$11$3 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$12$3 = /* @__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"><textarea class=agent-textarea rows=2 placeholder="Optional note for this checkpoint"></textarea><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$13$2 = /* @__PURE__ */ template(`<p class=history-empty>No browsing history yet.`), _tmpl$14$2 = /* @__PURE__ */ template(`<div class=history-panel><div class=history-panel-header><span class=history-panel-title>Browsing History</span><div class=history-panel-actions><button class=history-clear-btn>Clear</button><button class=history-clear-btn>Export HTML</button><button class=history-clear-btn>Export JSON</button><button class=history-clear-btn>Import</button></div></div><div class=history-list>`), _tmpl$15$2 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div class=agent-panel-title>What Changed</div><div class=agent-panel-subtitle>`), _tmpl$16$1 = /* @__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$17$1 = /* @__PURE__ */ template(`<span>`), _tmpl$18$1 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$19$1 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$20$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$21$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$22$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$23$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$24$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$25$1 = /* @__PURE__ */ template(`<button class=chat-queue-clear type=button>Clear queue`), _tmpl$26$1 = /* @__PURE__ */ template(`<div class=chat-queue-list>`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class=chat-queue-status><div class=chat-queue-status-row><span>`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2></textarea><button class=sidebar-send>`), _tmpl$29 = /* @__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><button class=sidebar-tab role=tab>Changes</button></div><div class=sidebar-messages><div>`), _tmpl$30 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$31 = /* @__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$32 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$33 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$34 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$35 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$36 = /* @__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$37 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$38 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$39 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class=bookmark-ghost-button type=button>Export</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$40 = /* @__PURE__ */ template(`<button class=bookmark-ghost-button type=button>Keep bookmarks`), _tmpl$41 = /* @__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$42 = /* @__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$43 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$44 = /* @__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$45 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$46 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$47 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$48 = /* @__PURE__ */ template(`<div><strong>Intent:</strong> `), _tmpl$49 = /* @__PURE__ */ template(`<div><strong>Expected:</strong> `), _tmpl$50 = /* @__PURE__ */ template(`<div><strong>Key fields:</strong> `), _tmpl$51 = /* @__PURE__ */ template(`<div><strong>Hints:</strong> `), _tmpl$52 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><input class=bookmark-input placeholder="Bookmark title"><textarea class=bookmark-note-input rows=2 placeholder="Why this bookmark matters"></textarea><textarea class=bookmark-note-input rows=1 placeholder=Intent></textarea><textarea class=bookmark-note-input rows=1 placeholder="Expected content"></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input rows=2 placeholder="Agent hints (one key:value per line)"></textarea><div class=bookmark-item-footer><button class=bookmark-secondary-button type=button>Save edits</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$53 = /* @__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 type=button></button><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$54 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$55 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$56 = /* @__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><textarea class=agent-textarea rows=2 placeholder="Add a note..."></textarea><button class=agent-control-button type=button>Restore`), _tmpl$57 = /* @__PURE__ */ template(`<button class=history-entry><span class=history-entry-title></span><span class=history-entry-url></span><span class=history-entry-time>`), _tmpl$58 = /* @__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">The Diff timeline is a premium feature. Upgrade to see a full history of what changed on this page.</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$59 = /* @__PURE__ */ template(`<div>`), _tmpl$60 = /* @__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$61 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$62 = /* @__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$63 = /* @__PURE__ */ template(`<div class=chat-queue-item><span class=chat-queue-text></span><button class=chat-queue-remove type=button>×`);
8384
+ var _tmpl$$a = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$a = /* @__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$9 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$4$9 = /* @__PURE__ */ template(`<button class=agent-primary-button type=button>Undo last action`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$6$8 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$7$6 = /* @__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$8$5 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$9$3 = /* @__PURE__ */ template(`<div class=bookmark-export-message>`), _tmpl$0$3 = /* @__PURE__ */ template(`<div class=bookmark-save-body><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Import HTML</button><button class=bookmark-secondary-button type=button>Import JSON`), _tmpl$1$3 = /* @__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></textarea><textarea class=bookmark-note-input placeholder="Intent: what is this page for?"rows=1></textarea><textarea class=bookmark-note-input placeholder="Expected content: what should be here?"rows=1></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input placeholder="Agent hints (one key:value per line)"rows=2>`), _tmpl$10$3 = /* @__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-export-card><div><div class=bookmark-panel-title>Export</div><div class=bookmark-panel-subtitle>Save browser-ready HTML or a full Vessel archive</div></div><div class=bookmark-export-actions><button class=bookmark-secondary-button type=button>Browser HTML</button><button class=bookmark-secondary-button type=button>HTML + notes</button><button class=bookmark-secondary-button type=button>Vessel JSON</button></div></div><div class=bookmark-import-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Import Bookmarks</span><span class=bookmark-save-toggle-subtitle>Import from HTML or Vessel JSON</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><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$11$3 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$12$3 = /* @__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"><textarea class=agent-textarea rows=2 placeholder="Optional note for this checkpoint"></textarea><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$13$2 = /* @__PURE__ */ template(`<p class=history-empty>No browsing history yet.`), _tmpl$14$2 = /* @__PURE__ */ template(`<div class=history-panel><div class=history-panel-header><span class=history-panel-title>Browsing History</span><div class=history-panel-actions><button class=history-clear-btn>Clear</button><button class=history-clear-btn>Export HTML</button><button class=history-clear-btn>Export JSON</button><button class=history-clear-btn>Import</button></div></div><div class=history-list>`), _tmpl$15$2 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div class=agent-panel-title>What Changed</div><div class=agent-panel-subtitle>`), _tmpl$16$1 = /* @__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$17$1 = /* @__PURE__ */ template(`<span>`), _tmpl$18$1 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$19$1 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$20$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$21$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$22$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$23$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$24$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$25$1 = /* @__PURE__ */ template(`<button class=chat-queue-clear type=button>Clear queue`), _tmpl$26$1 = /* @__PURE__ */ template(`<div class=chat-queue-list>`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class=chat-queue-status><div class=chat-queue-status-row><span>`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2></textarea><button class=sidebar-send>`), _tmpl$29 = /* @__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><button class=sidebar-tab role=tab>Changes</button><button class=sidebar-tab role=tab>Research<span class=sidebar-tab-beta>Beta</span></button></div><div class=sidebar-messages><div>`), _tmpl$30 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$31 = /* @__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$32 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$33 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$34 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$35 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$36 = /* @__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$37 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$38 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$39 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class=bookmark-ghost-button type=button>Export</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$40 = /* @__PURE__ */ template(`<button class=bookmark-ghost-button type=button>Keep bookmarks`), _tmpl$41 = /* @__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$42 = /* @__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$43 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$44 = /* @__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$45 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$46 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$47 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$48 = /* @__PURE__ */ template(`<div><strong>Intent:</strong> `), _tmpl$49 = /* @__PURE__ */ template(`<div><strong>Expected:</strong> `), _tmpl$50 = /* @__PURE__ */ template(`<div><strong>Key fields:</strong> `), _tmpl$51 = /* @__PURE__ */ template(`<div><strong>Hints:</strong> `), _tmpl$52 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><input class=bookmark-input placeholder="Bookmark title"><textarea class=bookmark-note-input rows=2 placeholder="Why this bookmark matters"></textarea><textarea class=bookmark-note-input rows=1 placeholder=Intent></textarea><textarea class=bookmark-note-input rows=1 placeholder="Expected content"></textarea><input class=bookmark-input placeholder="Key fields (comma-separated)"><textarea class=bookmark-note-input rows=2 placeholder="Agent hints (one key:value per line)"></textarea><div class=bookmark-item-footer><button class=bookmark-secondary-button type=button>Save edits</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$53 = /* @__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 type=button></button><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$54 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$55 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$56 = /* @__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><textarea class=agent-textarea rows=2 placeholder="Add a note..."></textarea><button class=agent-control-button type=button>Restore`), _tmpl$57 = /* @__PURE__ */ template(`<button class=history-entry><span class=history-entry-title></span><span class=history-entry-url></span><span class=history-entry-time>`), _tmpl$58 = /* @__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">The Diff timeline is a premium feature. Upgrade to see a full history of what changed on this page.</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$59 = /* @__PURE__ */ template(`<div>`), _tmpl$60 = /* @__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$61 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$62 = /* @__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$63 = /* @__PURE__ */ template(`<div class=chat-queue-item><span class=chat-queue-text></span><button class=chat-queue-remove type=button>×`);
7647
8385
  const UNSORTED_FOLDER = {
7648
8386
  id: "unsorted",
7649
8387
  name: "Unsorted",
@@ -7764,8 +8502,8 @@ const Sidebar = (props) => {
7764
8502
  onMount(() => {
7765
8503
  void window.vessel.premium.getState().then(setPremiumState).catch(() => {
7766
8504
  });
7767
- const cleanup = window.vessel.premium.onUpdate(setPremiumState);
7768
- onCleanup(cleanup);
8505
+ const cleanup2 = window.vessel.premium.onUpdate(setPremiumState);
8506
+ onCleanup(cleanup2);
7769
8507
  });
7770
8508
  const syncHighlightCount = async () => {
7771
8509
  try {
@@ -8246,12 +8984,12 @@ ${contextBlock}` : contextBlock);
8246
8984
  };
8247
8985
  const isFolderExpanded = (folderId) => normalizedBookmarkSearch().length > 0 || expandedFolderIds().includes(folderId);
8248
8986
  onMount(() => {
8249
- const cleanup = window.vessel.ui.onSidebarNavigate((tab) => {
8987
+ const cleanup2 = window.vessel.ui.onSidebarNavigate((tab) => {
8250
8988
  if (tab === "supervisor" || tab === "bookmarks" || tab === "checkpoints" || tab === "chat" || tab === "automation" || tab === "history" || tab === "diff") {
8251
8989
  setSidebarTab(tab);
8252
8990
  }
8253
8991
  });
8254
- onCleanup(cleanup);
8992
+ onCleanup(cleanup2);
8255
8993
  });
8256
8994
  return createComponent(Show, {
8257
8995
  get when() {
@@ -8260,7 +8998,7 @@ ${contextBlock}` : contextBlock);
8260
8998
  get children() {
8261
8999
  var _el$9 = _tmpl$29(), _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;
8262
9000
  _el$16.firstChild;
8263
- 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$23.nextSibling, _el$25 = _el$15.nextSibling, _el$124 = _el$25.firstChild;
9001
+ 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$23.nextSibling, _el$25 = _el$24.nextSibling, _el$26 = _el$15.nextSibling, _el$125 = _el$26.firstChild;
8264
9002
  _el$0.$$pointerdown = startResize;
8265
9003
  setAttribute(_el$11, "src", vesselLogo);
8266
9004
  addEventListener(_el$13, "click", clearHistory, true);
@@ -8282,20 +9020,21 @@ ${contextBlock}` : contextBlock);
8282
9020
  _el$22.$$click = () => setSidebarTab("automation");
8283
9021
  _el$23.$$click = () => setSidebarTab("history");
8284
9022
  _el$24.$$click = () => setSidebarTab("diff");
9023
+ _el$25.$$click = () => setSidebarTab("research");
8285
9024
  use((el) => {
8286
9025
  messagesContainerRef = el;
8287
9026
  useScrollFade(el);
8288
- }, _el$25);
8289
- insert(_el$25, createComponent(Show, {
9027
+ }, _el$26);
9028
+ insert(_el$26, createComponent(Show, {
8290
9029
  get when() {
8291
9030
  return sidebarTab() === "supervisor";
8292
9031
  },
8293
9032
  get children() {
8294
- var _el$26 = _tmpl$7$6(), _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$27.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$36 = _el$32.nextSibling, _el$38 = _el$36.nextSibling;
8295
- _el$38.firstChild;
8296
- insert(_el$30, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
8297
- insert(_el$31, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
8298
- insert(_el$32, createComponent(DropdownSelect, {
9033
+ var _el$27 = _tmpl$7$6(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$32 = _el$29.nextSibling, _el$33 = _el$28.nextSibling, _el$34 = _el$33.firstChild, _el$35 = _el$34.nextSibling, _el$37 = _el$33.nextSibling, _el$39 = _el$37.nextSibling;
9034
+ _el$39.firstChild;
9035
+ insert(_el$31, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
9036
+ insert(_el$32, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
9037
+ insert(_el$33, createComponent(DropdownSelect, {
8299
9038
  "class": "agent-select",
8300
9039
  get value() {
8301
9040
  return runtimeState2().supervisor.approvalMode;
@@ -8305,23 +9044,23 @@ ${contextBlock}` : contextBlock);
8305
9044
  },
8306
9045
  ariaLabel: "Approval mode",
8307
9046
  onChange: (value) => void setApprovalMode(value)
8308
- }), _el$33);
8309
- _el$33.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
8310
- insert(_el$33, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
8311
- _el$34.$$click = () => void restoreSession();
8312
- insert(_el$32, createComponent(Show, {
9047
+ }), _el$34);
9048
+ _el$34.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
9049
+ insert(_el$34, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
9050
+ _el$35.$$click = () => void restoreSession();
9051
+ insert(_el$33, createComponent(Show, {
8313
9052
  get when() {
8314
9053
  return runtimeState2().canUndo;
8315
9054
  },
8316
9055
  get children() {
8317
- var _el$35 = _tmpl$4$9();
8318
- _el$35.$$click = () => void undoLastAction();
8319
- createRenderEffect(() => setAttribute(_el$35, "title", runtimeState2().undoInfo ? `Undo: ${runtimeState2().undoInfo.actionName}` : "Undo last action"));
8320
- return _el$35;
9056
+ var _el$36 = _tmpl$4$9();
9057
+ _el$36.$$click = () => void undoLastAction();
9058
+ createRenderEffect(() => setAttribute(_el$36, "title", runtimeState2().undoInfo ? `Undo: ${runtimeState2().undoInfo.actionName}` : "Undo last action"));
9059
+ return _el$36;
8321
9060
  }
8322
9061
  }), null);
8323
- insert(_el$36, approvalModeDescription);
8324
- insert(_el$26, createComponent(Show, {
9062
+ insert(_el$37, approvalModeDescription);
9063
+ insert(_el$27, createComponent(Show, {
8325
9064
  get when() {
8326
9065
  return runtimeState2().supervisor.pendingApprovals.length > 0;
8327
9066
  },
@@ -8334,32 +9073,32 @@ ${contextBlock}` : contextBlock);
8334
9073
  return runtimeState2().supervisor.pendingApprovals;
8335
9074
  },
8336
9075
  children: (approval) => (() => {
8337
- var _el$142 = _tmpl$31(), _el$143 = _el$142.firstChild, _el$144 = _el$143.nextSibling, _el$145 = _el$144.nextSibling, _el$146 = _el$145.nextSibling, _el$147 = _el$146.nextSibling, _el$148 = _el$147.firstChild, _el$149 = _el$148.nextSibling;
8338
- insert(_el$144, () => approval.name);
8339
- insert(_el$145, () => approval.argsSummary);
8340
- insert(_el$146, () => approval.reason);
8341
- _el$148.$$click = () => void resolveApproval(approval.id, true);
8342
- _el$149.$$click = () => void resolveApproval(approval.id, false);
8343
- return _el$142;
9076
+ var _el$143 = _tmpl$31(), _el$144 = _el$143.firstChild, _el$145 = _el$144.nextSibling, _el$146 = _el$145.nextSibling, _el$147 = _el$146.nextSibling, _el$148 = _el$147.nextSibling, _el$149 = _el$148.firstChild, _el$150 = _el$149.nextSibling;
9077
+ insert(_el$145, () => approval.name);
9078
+ insert(_el$146, () => approval.argsSummary);
9079
+ insert(_el$147, () => approval.reason);
9080
+ _el$149.$$click = () => void resolveApproval(approval.id, true);
9081
+ _el$150.$$click = () => void resolveApproval(approval.id, false);
9082
+ return _el$143;
8344
9083
  })()
8345
9084
  })];
8346
9085
  }
8347
- }), _el$38);
8348
- insert(_el$38, createComponent(Show, {
9086
+ }), _el$39);
9087
+ insert(_el$39, createComponent(Show, {
8349
9088
  get when() {
8350
9089
  return recentActions().length > 0;
8351
9090
  },
8352
9091
  get children() {
8353
- var _el$40 = _tmpl$6$8();
8354
- _el$40.$$click = () => setActionsExpanded((current) => !current);
8355
- insert(_el$40, (() => {
9092
+ var _el$41 = _tmpl$6$8();
9093
+ _el$41.$$click = () => setActionsExpanded((current) => !current);
9094
+ insert(_el$41, (() => {
8356
9095
  var _c$ = memo(() => !!actionsExpanded());
8357
9096
  return () => _c$() ? "Hide history" : `Show history (${recentActions().length})`;
8358
9097
  })());
8359
- return _el$40;
9098
+ return _el$41;
8360
9099
  }
8361
9100
  }), null);
8362
- insert(_el$26, createComponent(Show, {
9101
+ insert(_el$27, createComponent(Show, {
8363
9102
  get when() {
8364
9103
  return recentActions().length > 0;
8365
9104
  },
@@ -8380,53 +9119,53 @@ ${contextBlock}` : contextBlock);
8380
9119
  return recentActions();
8381
9120
  },
8382
9121
  children: (action) => (() => {
8383
- var _el$152 = _tmpl$36(), _el$153 = _el$152.firstChild, _el$154 = _el$153.firstChild, _el$155 = _el$154.nextSibling, _el$156 = _el$153.nextSibling;
8384
- insert(_el$154, () => action.name);
8385
- insert(_el$155, () => action.status);
8386
- insert(_el$156, () => action.argsSummary);
8387
- insert(_el$152, createComponent(Show, {
9122
+ var _el$153 = _tmpl$36(), _el$154 = _el$153.firstChild, _el$155 = _el$154.firstChild, _el$156 = _el$155.nextSibling, _el$157 = _el$154.nextSibling;
9123
+ insert(_el$155, () => action.name);
9124
+ insert(_el$156, () => action.status);
9125
+ insert(_el$157, () => action.argsSummary);
9126
+ insert(_el$153, createComponent(Show, {
8388
9127
  get when() {
8389
9128
  return action.resultSummary;
8390
9129
  },
8391
9130
  get children() {
8392
- var _el$157 = _tmpl$34();
8393
- insert(_el$157, () => action.resultSummary);
8394
- return _el$157;
9131
+ var _el$158 = _tmpl$34();
9132
+ insert(_el$158, () => action.resultSummary);
9133
+ return _el$158;
8395
9134
  }
8396
9135
  }), null);
8397
- insert(_el$152, createComponent(Show, {
9136
+ insert(_el$153, createComponent(Show, {
8398
9137
  get when() {
8399
9138
  return action.error;
8400
9139
  },
8401
9140
  get children() {
8402
- var _el$158 = _tmpl$35();
8403
- insert(_el$158, () => action.error);
8404
- return _el$158;
9141
+ var _el$159 = _tmpl$35();
9142
+ insert(_el$159, () => action.error);
9143
+ return _el$159;
8405
9144
  }
8406
9145
  }), null);
8407
- createRenderEffect(() => className(_el$155, `agent-action-status ${action.status}`));
8408
- return _el$152;
9146
+ createRenderEffect(() => className(_el$156, `agent-action-status ${action.status}`));
9147
+ return _el$153;
8409
9148
  })()
8410
9149
  });
8411
9150
  }
8412
9151
  });
8413
9152
  }
8414
9153
  }), null);
8415
- createRenderEffect(() => _el$31.classList.toggle("paused", !!runtimeState2().supervisor.paused));
8416
- return _el$26;
9154
+ createRenderEffect(() => _el$32.classList.toggle("paused", !!runtimeState2().supervisor.paused));
9155
+ return _el$27;
8417
9156
  }
8418
- }), _el$124);
8419
- insert(_el$25, createComponent(Show, {
9157
+ }), _el$125);
9158
+ insert(_el$26, createComponent(Show, {
8420
9159
  get when() {
8421
9160
  return sidebarTab() === "bookmarks";
8422
9161
  },
8423
9162
  get children() {
8424
- var _el$41 = _tmpl$10$3(), _el$42 = _el$41.firstChild, _el$43 = _el$42.firstChild, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling, _el$47 = _el$42.nextSibling, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling, _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling, _el$53 = _el$52.nextSibling, _el$55 = _el$48.nextSibling, _el$56 = _el$55.firstChild, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling, _el$64 = _el$55.nextSibling, _el$65 = _el$64.firstChild, _el$66 = _el$65.firstChild, _el$67 = _el$66.nextSibling, _el$78 = _el$64.nextSibling, _el$79 = _el$78.firstChild, _el$80 = _el$79.firstChild, _el$81 = _el$80.nextSibling, _el$82 = _el$79.nextSibling, _el$83 = _el$78.nextSibling;
8425
- insert(_el$45, (() => {
9163
+ var _el$42 = _tmpl$10$3(), _el$43 = _el$42.firstChild, _el$44 = _el$43.firstChild, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling, _el$48 = _el$43.nextSibling, _el$49 = _el$48.nextSibling, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$51.firstChild, _el$53 = _el$52.nextSibling, _el$54 = _el$53.nextSibling, _el$56 = _el$49.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, _el$65 = _el$56.nextSibling, _el$66 = _el$65.firstChild, _el$67 = _el$66.firstChild, _el$68 = _el$67.nextSibling, _el$79 = _el$65.nextSibling, _el$80 = _el$79.firstChild, _el$81 = _el$80.firstChild, _el$82 = _el$81.nextSibling, _el$83 = _el$80.nextSibling, _el$84 = _el$79.nextSibling;
9164
+ insert(_el$46, (() => {
8426
9165
  var _c$2 = memo(() => !!normalizedBookmarkSearch());
8427
9166
  return () => _c$2() ? `${bookmarkMatchCount()} matches for "${bookmarkSearchQuery().trim()}"` : `${bookmarksState2().bookmarks.length} saved across ${bookmarkFolders().length} folders`;
8428
9167
  })());
8429
- insert(_el$42, createComponent(Show, {
9168
+ insert(_el$43, createComponent(Show, {
8430
9169
  get when() {
8431
9170
  return currentTabSaved();
8432
9171
  },
@@ -8434,61 +9173,61 @@ ${contextBlock}` : contextBlock);
8434
9173
  return _tmpl$8$5();
8435
9174
  }
8436
9175
  }), null);
8437
- _el$47.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
8438
- _el$51.$$click = () => void handleExportBookmarks("html");
8439
- _el$52.$$click = () => void handleExportBookmarks("html-with-notes");
8440
- _el$53.$$click = () => void handleExportBookmarks("json");
8441
- insert(_el$48, createComponent(Show, {
9176
+ _el$48.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
9177
+ _el$52.$$click = () => void handleExportBookmarks("html");
9178
+ _el$53.$$click = () => void handleExportBookmarks("html-with-notes");
9179
+ _el$54.$$click = () => void handleExportBookmarks("json");
9180
+ insert(_el$49, createComponent(Show, {
8442
9181
  get when() {
8443
9182
  return bookmarkExportMessage();
8444
9183
  },
8445
9184
  get children() {
8446
- var _el$54 = _tmpl$9$3();
8447
- insert(_el$54, bookmarkExportMessage);
8448
- return _el$54;
9185
+ var _el$55 = _tmpl$9$3();
9186
+ insert(_el$55, bookmarkExportMessage);
9187
+ return _el$55;
8449
9188
  }
8450
9189
  }), null);
8451
- _el$56.$$click = () => setBookmarkImportExpanded((current) => !current);
8452
- insert(_el$55, createComponent(Show, {
9190
+ _el$57.$$click = () => setBookmarkImportExpanded((current) => !current);
9191
+ insert(_el$56, createComponent(Show, {
8453
9192
  get when() {
8454
9193
  return bookmarkImportExpanded();
8455
9194
  },
8456
9195
  get children() {
8457
- var _el$59 = _tmpl$0$3(), _el$60 = _el$59.firstChild, _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling;
8458
- _el$61.$$click = () => void handleImportBookmarks("html");
8459
- _el$62.$$click = () => void handleImportBookmarks("json");
8460
- insert(_el$59, createComponent(Show, {
9196
+ var _el$60 = _tmpl$0$3(), _el$61 = _el$60.firstChild, _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling;
9197
+ _el$62.$$click = () => void handleImportBookmarks("html");
9198
+ _el$63.$$click = () => void handleImportBookmarks("json");
9199
+ insert(_el$60, createComponent(Show, {
8461
9200
  get when() {
8462
9201
  return bookmarkImportMessage();
8463
9202
  },
8464
9203
  get children() {
8465
- var _el$63 = _tmpl$9$3();
8466
- insert(_el$63, bookmarkImportMessage);
8467
- return _el$63;
9204
+ var _el$64 = _tmpl$9$3();
9205
+ insert(_el$64, bookmarkImportMessage);
9206
+ return _el$64;
8468
9207
  }
8469
9208
  }), null);
8470
9209
  createRenderEffect((_p$) => {
8471
9210
  var _v$ = bookmarkImporting(), _v$2 = bookmarkImporting();
8472
- _v$ !== _p$.e && (_el$61.disabled = _p$.e = _v$);
8473
- _v$2 !== _p$.t && (_el$62.disabled = _p$.t = _v$2);
9211
+ _v$ !== _p$.e && (_el$62.disabled = _p$.e = _v$);
9212
+ _v$2 !== _p$.t && (_el$63.disabled = _p$.t = _v$2);
8474
9213
  return _p$;
8475
9214
  }, {
8476
9215
  e: void 0,
8477
9216
  t: void 0
8478
9217
  });
8479
- return _el$59;
9218
+ return _el$60;
8480
9219
  }
8481
9220
  }), null);
8482
- _el$65.$$click = () => setBookmarkSaveExpanded((current) => !current);
8483
- insert(_el$64, createComponent(Show, {
9221
+ _el$66.$$click = () => setBookmarkSaveExpanded((current) => !current);
9222
+ insert(_el$65, createComponent(Show, {
8484
9223
  get when() {
8485
9224
  return bookmarkSaveExpanded();
8486
9225
  },
8487
9226
  get children() {
8488
- var _el$68 = _tmpl$1$3(), _el$69 = _el$68.firstChild, _el$70 = _el$69.nextSibling, _el$71 = _el$70.nextSibling, _el$72 = _el$71.firstChild, _el$73 = _el$71.nextSibling, _el$74 = _el$73.nextSibling, _el$75 = _el$74.nextSibling, _el$76 = _el$75.nextSibling, _el$77 = _el$76.nextSibling;
8489
- insert(_el$69, () => currentTab()?.title || "No active page");
8490
- insert(_el$70, () => currentTab()?.url || "Open a page to save it here.");
8491
- insert(_el$71, createComponent(DropdownSelect, {
9227
+ var _el$69 = _tmpl$1$3(), _el$70 = _el$69.firstChild, _el$71 = _el$70.nextSibling, _el$72 = _el$71.nextSibling, _el$73 = _el$72.firstChild, _el$74 = _el$72.nextSibling, _el$75 = _el$74.nextSibling, _el$76 = _el$75.nextSibling, _el$77 = _el$76.nextSibling, _el$78 = _el$77.nextSibling;
9228
+ insert(_el$70, () => currentTab()?.title || "No active page");
9229
+ insert(_el$71, () => currentTab()?.url || "Open a page to save it here.");
9230
+ insert(_el$72, createComponent(DropdownSelect, {
8492
9231
  "class": "bookmark-select",
8493
9232
  get value() {
8494
9233
  return selectedFolderId();
@@ -8498,37 +9237,37 @@ ${contextBlock}` : contextBlock);
8498
9237
  },
8499
9238
  ariaLabel: "Bookmark folder",
8500
9239
  onChange: (value) => setSelectedFolderId(value)
8501
- }), _el$72);
8502
- _el$72.$$click = () => void handleSaveBookmark();
8503
- _el$73.$$input = (e) => setBookmarkNote(e.currentTarget.value);
8504
- _el$74.$$input = (e) => setBookmarkIntent(e.currentTarget.value);
8505
- _el$75.$$input = (e) => setBookmarkExpectedContent(e.currentTarget.value);
8506
- _el$76.$$input = (e) => setBookmarkKeyFields(e.currentTarget.value);
8507
- _el$77.$$input = (e) => setBookmarkAgentHints(e.currentTarget.value);
8508
- createRenderEffect(() => _el$72.disabled = !currentTab()?.url);
8509
- createRenderEffect(() => _el$73.value = bookmarkNote());
8510
- createRenderEffect(() => _el$74.value = bookmarkIntent());
8511
- createRenderEffect(() => _el$75.value = bookmarkExpectedContent());
8512
- createRenderEffect(() => _el$76.value = bookmarkKeyFields());
8513
- createRenderEffect(() => _el$77.value = bookmarkAgentHints());
8514
- return _el$68;
9240
+ }), _el$73);
9241
+ _el$73.$$click = () => void handleSaveBookmark();
9242
+ _el$74.$$input = (e) => setBookmarkNote(e.currentTarget.value);
9243
+ _el$75.$$input = (e) => setBookmarkIntent(e.currentTarget.value);
9244
+ _el$76.$$input = (e) => setBookmarkExpectedContent(e.currentTarget.value);
9245
+ _el$77.$$input = (e) => setBookmarkKeyFields(e.currentTarget.value);
9246
+ _el$78.$$input = (e) => setBookmarkAgentHints(e.currentTarget.value);
9247
+ createRenderEffect(() => _el$73.disabled = !currentTab()?.url);
9248
+ createRenderEffect(() => _el$74.value = bookmarkNote());
9249
+ createRenderEffect(() => _el$75.value = bookmarkIntent());
9250
+ createRenderEffect(() => _el$76.value = bookmarkExpectedContent());
9251
+ createRenderEffect(() => _el$77.value = bookmarkKeyFields());
9252
+ createRenderEffect(() => _el$78.value = bookmarkAgentHints());
9253
+ return _el$69;
8515
9254
  }
8516
9255
  }), null);
8517
- _el$78.addEventListener("submit", handleCreateFolder);
8518
- _el$80.$$input = (e) => setNewFolderName(e.currentTarget.value);
8519
- _el$81.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
8520
- insert(_el$83, createComponent(Show, {
9256
+ _el$79.addEventListener("submit", handleCreateFolder);
9257
+ _el$81.$$input = (e) => setNewFolderName(e.currentTarget.value);
9258
+ _el$82.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
9259
+ insert(_el$84, createComponent(Show, {
8521
9260
  get when() {
8522
9261
  return filteredGroupedBookmarks().length > 0;
8523
9262
  },
8524
9263
  get fallback() {
8525
9264
  return (() => {
8526
- var _el$159 = _tmpl$37();
8527
- insert(_el$159, (() => {
9265
+ var _el$160 = _tmpl$37();
9266
+ insert(_el$160, (() => {
8528
9267
  var _c$5 = memo(() => !!normalizedBookmarkSearch());
8529
9268
  return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
8530
9269
  })());
8531
- return _el$159;
9270
+ return _el$160;
8532
9271
  })();
8533
9272
  },
8534
9273
  get children() {
@@ -8537,100 +9276,100 @@ ${contextBlock}` : contextBlock);
8537
9276
  return filteredGroupedBookmarks();
8538
9277
  },
8539
9278
  children: (folder) => (() => {
8540
- var _el$160 = _tmpl$44(), _el$161 = _el$160.firstChild, _el$162 = _el$161.firstChild, _el$163 = _el$162.firstChild, _el$164 = _el$163.nextSibling, _el$165 = _el$164.firstChild, _el$166 = _el$165.nextSibling, _el$167 = _el$166.firstChild;
8541
- _el$161.$$keydown = (e) => {
9279
+ var _el$161 = _tmpl$44(), _el$162 = _el$161.firstChild, _el$163 = _el$162.firstChild, _el$164 = _el$163.firstChild, _el$165 = _el$164.nextSibling, _el$166 = _el$165.firstChild, _el$167 = _el$166.nextSibling, _el$168 = _el$167.firstChild;
9280
+ _el$162.$$keydown = (e) => {
8542
9281
  if (e.key === "Enter" || e.key === " ") {
8543
9282
  e.preventDefault();
8544
9283
  toggleFolderExpanded(folder.id);
8545
9284
  }
8546
9285
  };
8547
- _el$161.$$click = () => toggleFolderExpanded(folder.id);
8548
- insert(_el$165, () => folder.name);
8549
- insert(_el$166, () => folder.items.length, _el$167);
8550
- insert(_el$164, createComponent(Show, {
9286
+ _el$162.$$click = () => toggleFolderExpanded(folder.id);
9287
+ insert(_el$166, () => folder.name);
9288
+ insert(_el$167, () => folder.items.length, _el$168);
9289
+ insert(_el$165, createComponent(Show, {
8551
9290
  get when() {
8552
9291
  return folder.summary;
8553
9292
  },
8554
9293
  get children() {
8555
- var _el$168 = _tmpl$38();
8556
- insert(_el$168, () => folder.summary);
8557
- return _el$168;
9294
+ var _el$169 = _tmpl$38();
9295
+ insert(_el$169, () => folder.summary);
9296
+ return _el$169;
8558
9297
  }
8559
9298
  }), null);
8560
- insert(_el$161, createComponent(Show, {
9299
+ insert(_el$162, createComponent(Show, {
8561
9300
  get when() {
8562
9301
  return folder.id !== UNSORTED_FOLDER.id;
8563
9302
  },
8564
9303
  get children() {
8565
- var _el$169 = _tmpl$39(), _el$170 = _el$169.firstChild, _el$171 = _el$170.nextSibling, _el$172 = _el$171.nextSibling;
8566
- _el$170.$$click = (e) => {
9304
+ var _el$170 = _tmpl$39(), _el$171 = _el$170.firstChild, _el$172 = _el$171.nextSibling, _el$173 = _el$172.nextSibling;
9305
+ _el$171.$$click = (e) => {
8567
9306
  e.stopPropagation();
8568
9307
  setEditingFolderId(folder.id);
8569
9308
  setEditingFolderName(folder.name);
8570
9309
  setEditingFolderSummary(folder.summary || "");
8571
9310
  };
8572
- _el$171.$$click = (e) => {
9311
+ _el$172.$$click = (e) => {
8573
9312
  e.stopPropagation();
8574
9313
  void handleExportFolder(folder.id, folder.name);
8575
9314
  };
8576
- _el$172.$$click = (e) => {
9315
+ _el$173.$$click = (e) => {
8577
9316
  e.stopPropagation();
8578
9317
  setDeletingFolderId(folder.id);
8579
9318
  };
8580
- createRenderEffect(() => _el$171.disabled = bookmarkExporting());
8581
- return _el$169;
9319
+ createRenderEffect(() => _el$172.disabled = bookmarkExporting());
9320
+ return _el$170;
8582
9321
  }
8583
9322
  }), null);
8584
- insert(_el$160, createComponent(Show, {
9323
+ insert(_el$161, createComponent(Show, {
8585
9324
  get when() {
8586
9325
  return deletingFolderId() === folder.id;
8587
9326
  },
8588
9327
  get children() {
8589
- var _el$173 = _tmpl$41(), _el$174 = _el$173.firstChild, _el$175 = _el$174.firstChild, _el$177 = _el$175.nextSibling;
8590
- _el$177.nextSibling;
8591
- var _el$178 = _el$174.nextSibling, _el$180 = _el$178.firstChild, _el$181 = _el$180.nextSibling;
8592
- insert(_el$174, () => folder.name, _el$177);
8593
- insert(_el$174, (() => {
9328
+ var _el$174 = _tmpl$41(), _el$175 = _el$174.firstChild, _el$176 = _el$175.firstChild, _el$178 = _el$176.nextSibling;
9329
+ _el$178.nextSibling;
9330
+ var _el$179 = _el$175.nextSibling, _el$181 = _el$179.firstChild, _el$182 = _el$181.nextSibling;
9331
+ insert(_el$175, () => folder.name, _el$178);
9332
+ insert(_el$175, (() => {
8594
9333
  var _c$6 = memo(() => folder.items.length > 0);
8595
9334
  return () => _c$6() ? ` This folder has ${folder.items.length} bookmark${folder.items.length === 1 ? "" : "s"}.` : "";
8596
9335
  })(), null);
8597
- insert(_el$178, createComponent(Show, {
9336
+ insert(_el$179, createComponent(Show, {
8598
9337
  get when() {
8599
9338
  return folder.items.length > 0;
8600
9339
  },
8601
9340
  get children() {
8602
- var _el$179 = _tmpl$40();
8603
- _el$179.$$click = () => void handleRemoveFolder(folder.id, false);
8604
- return _el$179;
9341
+ var _el$180 = _tmpl$40();
9342
+ _el$180.$$click = () => void handleRemoveFolder(folder.id, false);
9343
+ return _el$180;
8605
9344
  }
8606
- }), _el$180);
8607
- _el$180.$$click = () => void handleRemoveFolder(folder.id, true);
8608
- insert(_el$180, () => folder.items.length > 0 ? "Delete all" : "Delete folder");
8609
- _el$181.$$click = () => setDeletingFolderId(null);
8610
- return _el$173;
9345
+ }), _el$181);
9346
+ _el$181.$$click = () => void handleRemoveFolder(folder.id, true);
9347
+ insert(_el$181, () => folder.items.length > 0 ? "Delete all" : "Delete folder");
9348
+ _el$182.$$click = () => setDeletingFolderId(null);
9349
+ return _el$174;
8611
9350
  }
8612
9351
  }), null);
8613
- insert(_el$160, createComponent(Show, {
9352
+ insert(_el$161, createComponent(Show, {
8614
9353
  get when() {
8615
9354
  return editingFolderId() === folder.id;
8616
9355
  },
8617
9356
  get children() {
8618
- var _el$182 = _tmpl$42(), _el$183 = _el$182.firstChild, _el$184 = _el$183.firstChild, _el$185 = _el$184.nextSibling, _el$186 = _el$183.nextSibling, _el$187 = _el$186.nextSibling;
8619
- _el$184.$$input = (e) => setEditingFolderName(e.currentTarget.value);
8620
- _el$185.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
8621
- _el$186.$$click = () => void handleRenameFolder(folder.id);
8622
- _el$187.$$click = () => {
9357
+ var _el$183 = _tmpl$42(), _el$184 = _el$183.firstChild, _el$185 = _el$184.firstChild, _el$186 = _el$185.nextSibling, _el$187 = _el$184.nextSibling, _el$188 = _el$187.nextSibling;
9358
+ _el$185.$$input = (e) => setEditingFolderName(e.currentTarget.value);
9359
+ _el$186.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
9360
+ _el$187.$$click = () => void handleRenameFolder(folder.id);
9361
+ _el$188.$$click = () => {
8623
9362
  setEditingFolderId(null);
8624
9363
  setEditingFolderName("");
8625
9364
  setEditingFolderSummary("");
8626
9365
  };
8627
- createRenderEffect(() => _el$186.disabled = !editingFolderName().trim());
8628
- createRenderEffect(() => _el$184.value = editingFolderName());
8629
- createRenderEffect(() => _el$185.value = editingFolderSummary());
8630
- return _el$182;
9366
+ createRenderEffect(() => _el$187.disabled = !editingFolderName().trim());
9367
+ createRenderEffect(() => _el$185.value = editingFolderName());
9368
+ createRenderEffect(() => _el$186.value = editingFolderSummary());
9369
+ return _el$183;
8631
9370
  }
8632
9371
  }), null);
8633
- insert(_el$160, createComponent(Show, {
9372
+ insert(_el$161, createComponent(Show, {
8634
9373
  get when() {
8635
9374
  return isFolderExpanded(folder.id);
8636
9375
  },
@@ -8646,134 +9385,134 @@ ${contextBlock}` : contextBlock);
8646
9385
  return _tmpl$46();
8647
9386
  },
8648
9387
  get children() {
8649
- var _el$188 = _tmpl$43();
8650
- insert(_el$188, createComponent(For, {
9388
+ var _el$189 = _tmpl$43();
9389
+ insert(_el$189, createComponent(For, {
8651
9390
  get each() {
8652
9391
  return folder.items;
8653
9392
  },
8654
9393
  children: (bookmark) => (() => {
8655
- var _el$191 = _tmpl$53(), _el$192 = _el$191.firstChild, _el$193 = _el$192.firstChild, _el$194 = _el$193.nextSibling, _el$219 = _el$192.nextSibling, _el$220 = _el$219.firstChild, _el$221 = _el$220.nextSibling, _el$222 = _el$221.nextSibling;
8656
- _el$192.$$click = () => void createTab(bookmark.url);
8657
- insert(_el$193, () => bookmark.title || bookmark.url);
8658
- insert(_el$194, () => bookmark.url);
8659
- insert(_el$191, createComponent(Show, {
9394
+ var _el$192 = _tmpl$53(), _el$193 = _el$192.firstChild, _el$194 = _el$193.firstChild, _el$195 = _el$194.nextSibling, _el$220 = _el$193.nextSibling, _el$221 = _el$220.firstChild, _el$222 = _el$221.nextSibling, _el$223 = _el$222.nextSibling;
9395
+ _el$193.$$click = () => void createTab(bookmark.url);
9396
+ insert(_el$194, () => bookmark.title || bookmark.url);
9397
+ insert(_el$195, () => bookmark.url);
9398
+ insert(_el$192, createComponent(Show, {
8660
9399
  get when() {
8661
9400
  return bookmark.note;
8662
9401
  },
8663
9402
  get children() {
8664
- var _el$195 = _tmpl$47();
8665
- insert(_el$195, () => bookmark.note);
8666
- return _el$195;
9403
+ var _el$196 = _tmpl$47();
9404
+ insert(_el$196, () => bookmark.note);
9405
+ return _el$196;
8667
9406
  }
8668
- }), _el$219);
8669
- insert(_el$191, createComponent(Show, {
9407
+ }), _el$220);
9408
+ insert(_el$192, createComponent(Show, {
8670
9409
  get when() {
8671
9410
  return bookmark.intent || bookmark.expectedContent || (bookmark.keyFields?.length || 0) > 0 || (bookmark.agentHints && Object.keys(bookmark.agentHints).length || 0) > 0;
8672
9411
  },
8673
9412
  get children() {
8674
- var _el$196 = _tmpl$47();
8675
- insert(_el$196, createComponent(Show, {
9413
+ var _el$197 = _tmpl$47();
9414
+ insert(_el$197, createComponent(Show, {
8676
9415
  get when() {
8677
9416
  return bookmark.intent;
8678
9417
  },
8679
9418
  get children() {
8680
- var _el$197 = _tmpl$48(), _el$198 = _el$197.firstChild;
8681
- _el$198.nextSibling;
8682
- insert(_el$197, () => bookmark.intent, null);
8683
- return _el$197;
9419
+ var _el$198 = _tmpl$48(), _el$199 = _el$198.firstChild;
9420
+ _el$199.nextSibling;
9421
+ insert(_el$198, () => bookmark.intent, null);
9422
+ return _el$198;
8684
9423
  }
8685
9424
  }), null);
8686
- insert(_el$196, createComponent(Show, {
9425
+ insert(_el$197, createComponent(Show, {
8687
9426
  get when() {
8688
9427
  return bookmark.expectedContent;
8689
9428
  },
8690
9429
  get children() {
8691
- var _el$200 = _tmpl$49(), _el$201 = _el$200.firstChild;
8692
- _el$201.nextSibling;
8693
- insert(_el$200, () => bookmark.expectedContent, null);
8694
- return _el$200;
9430
+ var _el$201 = _tmpl$49(), _el$202 = _el$201.firstChild;
9431
+ _el$202.nextSibling;
9432
+ insert(_el$201, () => bookmark.expectedContent, null);
9433
+ return _el$201;
8695
9434
  }
8696
9435
  }), null);
8697
- insert(_el$196, createComponent(Show, {
9436
+ insert(_el$197, createComponent(Show, {
8698
9437
  get when() {
8699
9438
  return (bookmark.keyFields?.length || 0) > 0;
8700
9439
  },
8701
9440
  get children() {
8702
- var _el$203 = _tmpl$50(), _el$204 = _el$203.firstChild;
8703
- _el$204.nextSibling;
8704
- insert(_el$203, () => bookmark.keyFields?.join(", "), null);
8705
- return _el$203;
9441
+ var _el$204 = _tmpl$50(), _el$205 = _el$204.firstChild;
9442
+ _el$205.nextSibling;
9443
+ insert(_el$204, () => bookmark.keyFields?.join(", "), null);
9444
+ return _el$204;
8706
9445
  }
8707
9446
  }), null);
8708
- insert(_el$196, createComponent(Show, {
9447
+ insert(_el$197, createComponent(Show, {
8709
9448
  get when() {
8710
9449
  return memo(() => !!bookmark.agentHints)() && Object.keys(bookmark.agentHints).length > 0;
8711
9450
  },
8712
9451
  get children() {
8713
- var _el$206 = _tmpl$51(), _el$207 = _el$206.firstChild;
8714
- _el$207.nextSibling;
8715
- insert(_el$206, () => Object.entries(bookmark.agentHints || {}).map(([key, hint]) => `${key}: ${hint}`).join(" • "), null);
8716
- return _el$206;
9452
+ var _el$207 = _tmpl$51(), _el$208 = _el$207.firstChild;
9453
+ _el$208.nextSibling;
9454
+ insert(_el$207, () => Object.entries(bookmark.agentHints || {}).map(([key, hint]) => `${key}: ${hint}`).join(" • "), null);
9455
+ return _el$207;
8717
9456
  }
8718
9457
  }), null);
8719
- return _el$196;
9458
+ return _el$197;
8720
9459
  }
8721
- }), _el$219);
8722
- insert(_el$191, createComponent(Show, {
9460
+ }), _el$220);
9461
+ insert(_el$192, createComponent(Show, {
8723
9462
  get when() {
8724
9463
  return editingBookmarkId() === bookmark.id;
8725
9464
  },
8726
9465
  get children() {
8727
- var _el$209 = _tmpl$52(), _el$210 = _el$209.firstChild, _el$211 = _el$210.nextSibling, _el$212 = _el$211.nextSibling, _el$213 = _el$212.nextSibling, _el$214 = _el$213.nextSibling, _el$215 = _el$214.nextSibling, _el$216 = _el$215.nextSibling, _el$217 = _el$216.firstChild, _el$218 = _el$217.nextSibling;
8728
- _el$210.$$input = (e) => setEditingBookmarkTitle(e.currentTarget.value);
8729
- _el$211.$$input = (e) => setEditingBookmarkNote(e.currentTarget.value);
8730
- _el$212.$$input = (e) => setEditingBookmarkIntent(e.currentTarget.value);
8731
- _el$213.$$input = (e) => setEditingBookmarkExpectedContent(e.currentTarget.value);
8732
- _el$214.$$input = (e) => setEditingBookmarkKeyFields(e.currentTarget.value);
8733
- _el$215.$$input = (e) => setEditingBookmarkAgentHints(e.currentTarget.value);
8734
- _el$217.$$click = () => void handleUpdateBookmark(bookmark.id);
8735
- _el$218.$$click = resetBookmarkEditor;
8736
- createRenderEffect(() => _el$210.value = editingBookmarkTitle());
8737
- createRenderEffect(() => _el$211.value = editingBookmarkNote());
8738
- createRenderEffect(() => _el$212.value = editingBookmarkIntent());
8739
- createRenderEffect(() => _el$213.value = editingBookmarkExpectedContent());
8740
- createRenderEffect(() => _el$214.value = editingBookmarkKeyFields());
8741
- createRenderEffect(() => _el$215.value = editingBookmarkAgentHints());
8742
- return _el$209;
9466
+ var _el$210 = _tmpl$52(), _el$211 = _el$210.firstChild, _el$212 = _el$211.nextSibling, _el$213 = _el$212.nextSibling, _el$214 = _el$213.nextSibling, _el$215 = _el$214.nextSibling, _el$216 = _el$215.nextSibling, _el$217 = _el$216.nextSibling, _el$218 = _el$217.firstChild, _el$219 = _el$218.nextSibling;
9467
+ _el$211.$$input = (e) => setEditingBookmarkTitle(e.currentTarget.value);
9468
+ _el$212.$$input = (e) => setEditingBookmarkNote(e.currentTarget.value);
9469
+ _el$213.$$input = (e) => setEditingBookmarkIntent(e.currentTarget.value);
9470
+ _el$214.$$input = (e) => setEditingBookmarkExpectedContent(e.currentTarget.value);
9471
+ _el$215.$$input = (e) => setEditingBookmarkKeyFields(e.currentTarget.value);
9472
+ _el$216.$$input = (e) => setEditingBookmarkAgentHints(e.currentTarget.value);
9473
+ _el$218.$$click = () => void handleUpdateBookmark(bookmark.id);
9474
+ _el$219.$$click = resetBookmarkEditor;
9475
+ createRenderEffect(() => _el$211.value = editingBookmarkTitle());
9476
+ createRenderEffect(() => _el$212.value = editingBookmarkNote());
9477
+ createRenderEffect(() => _el$213.value = editingBookmarkIntent());
9478
+ createRenderEffect(() => _el$214.value = editingBookmarkExpectedContent());
9479
+ createRenderEffect(() => _el$215.value = editingBookmarkKeyFields());
9480
+ createRenderEffect(() => _el$216.value = editingBookmarkAgentHints());
9481
+ return _el$210;
8743
9482
  }
8744
- }), _el$219);
8745
- insert(_el$220, () => formatBookmarkDate(bookmark.savedAt));
8746
- _el$221.$$click = () => editingBookmarkId() === bookmark.id ? resetBookmarkEditor() : startEditingBookmark(bookmark);
8747
- insert(_el$221, () => editingBookmarkId() === bookmark.id ? "Close" : "Edit");
8748
- _el$222.$$click = () => {
9483
+ }), _el$220);
9484
+ insert(_el$221, () => formatBookmarkDate(bookmark.savedAt));
9485
+ _el$222.$$click = () => editingBookmarkId() === bookmark.id ? resetBookmarkEditor() : startEditingBookmark(bookmark);
9486
+ insert(_el$222, () => editingBookmarkId() === bookmark.id ? "Close" : "Edit");
9487
+ _el$223.$$click = () => {
8749
9488
  if (editingBookmarkId() === bookmark.id) {
8750
9489
  resetBookmarkEditor();
8751
9490
  }
8752
9491
  void removeBookmark(bookmark.id);
8753
9492
  };
8754
- createRenderEffect(() => setAttribute(_el$191, "data-bookmark-id", bookmark.id));
8755
- return _el$191;
9493
+ createRenderEffect(() => setAttribute(_el$192, "data-bookmark-id", bookmark.id));
9494
+ return _el$192;
8756
9495
  })()
8757
9496
  }));
8758
- return _el$188;
9497
+ return _el$189;
8759
9498
  }
8760
9499
  });
8761
9500
  }
8762
9501
  }), null);
8763
- createRenderEffect(() => _el$163.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
8764
- return _el$160;
9502
+ createRenderEffect(() => _el$164.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
9503
+ return _el$161;
8765
9504
  })()
8766
9505
  });
8767
9506
  }
8768
9507
  }));
8769
9508
  createRenderEffect((_p$) => {
8770
9509
  var _v$3 = bookmarkExporting(), _v$4 = bookmarkExporting(), _v$5 = bookmarkExporting(), _v$6 = !!bookmarkImportExpanded(), _v$7 = !!bookmarkSaveExpanded(), _v$8 = !newFolderName().trim();
8771
- _v$3 !== _p$.e && (_el$51.disabled = _p$.e = _v$3);
8772
- _v$4 !== _p$.t && (_el$52.disabled = _p$.t = _v$4);
8773
- _v$5 !== _p$.a && (_el$53.disabled = _p$.a = _v$5);
8774
- _v$6 !== _p$.o && _el$58.classList.toggle("expanded", _p$.o = _v$6);
8775
- _v$7 !== _p$.i && _el$67.classList.toggle("expanded", _p$.i = _v$7);
8776
- _v$8 !== _p$.n && (_el$82.disabled = _p$.n = _v$8);
9510
+ _v$3 !== _p$.e && (_el$52.disabled = _p$.e = _v$3);
9511
+ _v$4 !== _p$.t && (_el$53.disabled = _p$.t = _v$4);
9512
+ _v$5 !== _p$.a && (_el$54.disabled = _p$.a = _v$5);
9513
+ _v$6 !== _p$.o && _el$59.classList.toggle("expanded", _p$.o = _v$6);
9514
+ _v$7 !== _p$.i && _el$68.classList.toggle("expanded", _p$.i = _v$7);
9515
+ _v$8 !== _p$.n && (_el$83.disabled = _p$.n = _v$8);
8777
9516
  return _p$;
8778
9517
  }, {
8779
9518
  e: void 0,
@@ -8783,32 +9522,32 @@ ${contextBlock}` : contextBlock);
8783
9522
  i: void 0,
8784
9523
  n: void 0
8785
9524
  });
8786
- createRenderEffect(() => _el$47.value = bookmarkSearchQuery());
8787
- createRenderEffect(() => _el$80.value = newFolderName());
8788
- createRenderEffect(() => _el$81.value = newFolderSummary());
8789
- return _el$41;
9525
+ createRenderEffect(() => _el$48.value = bookmarkSearchQuery());
9526
+ createRenderEffect(() => _el$81.value = newFolderName());
9527
+ createRenderEffect(() => _el$82.value = newFolderSummary());
9528
+ return _el$42;
8790
9529
  }
8791
- }), _el$124);
8792
- insert(_el$25, createComponent(Show, {
9530
+ }), _el$125);
9531
+ insert(_el$26, createComponent(Show, {
8793
9532
  get when() {
8794
9533
  return sidebarTab() === "checkpoints";
8795
9534
  },
8796
9535
  get children() {
8797
- var _el$84 = _tmpl$12$3(), _el$85 = _el$84.firstChild, _el$86 = _el$85.firstChild, _el$87 = _el$86.firstChild, _el$88 = _el$87.nextSibling, _el$89 = _el$85.nextSibling, _el$90 = _el$89.firstChild, _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling, _el$93 = _el$92.nextSibling;
8798
- _el$90.nextSibling;
8799
- insert(_el$88, (() => {
9536
+ var _el$85 = _tmpl$12$3(), _el$86 = _el$85.firstChild, _el$87 = _el$86.firstChild, _el$88 = _el$87.firstChild, _el$89 = _el$88.nextSibling, _el$90 = _el$86.nextSibling, _el$91 = _el$90.firstChild, _el$92 = _el$91.firstChild, _el$93 = _el$92.nextSibling, _el$94 = _el$93.nextSibling;
9537
+ _el$91.nextSibling;
9538
+ insert(_el$89, (() => {
8800
9539
  var _c$3 = memo(() => recentCheckpoints().length > 0);
8801
9540
  return () => _c$3() ? `${recentCheckpoints().length} saved snapshots` : "Save and restore session snapshots";
8802
9541
  })());
8803
- _el$91.$$input = (e) => setCheckpointName(e.currentTarget.value);
8804
- _el$92.$$input = (e) => setCheckpointNote(e.currentTarget.value);
8805
- _el$93.$$click = async () => {
9542
+ _el$92.$$input = (e) => setCheckpointName(e.currentTarget.value);
9543
+ _el$93.$$input = (e) => setCheckpointNote(e.currentTarget.value);
9544
+ _el$94.$$click = async () => {
8806
9545
  const name = checkpointName().trim();
8807
9546
  await createCheckpoint(name || void 0, checkpointNote() || void 0);
8808
9547
  setCheckpointName("");
8809
9548
  setCheckpointNote("");
8810
9549
  };
8811
- insert(_el$89, createComponent(Show, {
9550
+ insert(_el$90, createComponent(Show, {
8812
9551
  get when() {
8813
9552
  return recentCheckpoints().length > 0;
8814
9553
  },
@@ -8816,14 +9555,14 @@ ${contextBlock}` : contextBlock);
8816
9555
  return _tmpl$54();
8817
9556
  },
8818
9557
  get children() {
8819
- var _el$95 = _tmpl$11$3();
8820
- insert(_el$95, createComponent(For, {
9558
+ var _el$96 = _tmpl$11$3();
9559
+ insert(_el$96, createComponent(For, {
8821
9560
  get each() {
8822
9561
  return recentCheckpoints();
8823
9562
  },
8824
9563
  children: (checkpoint, i) => (() => {
8825
- var _el$224 = _tmpl$56(), _el$225 = _el$224.firstChild, _el$226 = _el$225.firstChild, _el$228 = _el$225.nextSibling, _el$229 = _el$228.firstChild, _el$230 = _el$229.nextSibling, _el$231 = _el$230.nextSibling, _el$232 = _el$231.nextSibling;
8826
- insert(_el$225, createComponent(Show, {
9564
+ var _el$225 = _tmpl$56(), _el$226 = _el$225.firstChild, _el$227 = _el$226.firstChild, _el$229 = _el$226.nextSibling, _el$230 = _el$229.firstChild, _el$231 = _el$230.nextSibling, _el$232 = _el$231.nextSibling, _el$233 = _el$232.nextSibling;
9565
+ insert(_el$226, createComponent(Show, {
8827
9566
  get when() {
8828
9567
  return i() < recentCheckpoints().length - 1;
8829
9568
  },
@@ -8831,24 +9570,24 @@ ${contextBlock}` : contextBlock);
8831
9570
  return _tmpl$55();
8832
9571
  }
8833
9572
  }), null);
8834
- insert(_el$229, () => checkpoint.name);
8835
- insert(_el$230, () => new Date(checkpoint.createdAt).toLocaleString());
8836
- _el$231.addEventListener("blur", (e) => void updateCheckpointNote(checkpoint.id, e.currentTarget.value));
8837
- _el$232.$$click = () => void restoreCheckpoint(checkpoint.id);
8838
- createRenderEffect(() => _el$226.classList.toggle("latest", !!(i() === 0)));
8839
- createRenderEffect(() => _el$231.value = checkpoint.note || "");
8840
- return _el$224;
9573
+ insert(_el$230, () => checkpoint.name);
9574
+ insert(_el$231, () => new Date(checkpoint.createdAt).toLocaleString());
9575
+ _el$232.addEventListener("blur", (e) => void updateCheckpointNote(checkpoint.id, e.currentTarget.value));
9576
+ _el$233.$$click = () => void restoreCheckpoint(checkpoint.id);
9577
+ createRenderEffect(() => _el$227.classList.toggle("latest", !!(i() === 0)));
9578
+ createRenderEffect(() => _el$232.value = checkpoint.note || "");
9579
+ return _el$225;
8841
9580
  })()
8842
9581
  }));
8843
- return _el$95;
9582
+ return _el$96;
8844
9583
  }
8845
9584
  }), null);
8846
- createRenderEffect(() => _el$91.value = checkpointName());
8847
- createRenderEffect(() => _el$92.value = checkpointNote());
8848
- return _el$84;
9585
+ createRenderEffect(() => _el$92.value = checkpointName());
9586
+ createRenderEffect(() => _el$93.value = checkpointNote());
9587
+ return _el$85;
8849
9588
  }
8850
- }), _el$124);
8851
- insert(_el$25, createComponent(Show, {
9589
+ }), _el$125);
9590
+ insert(_el$26, createComponent(Show, {
8852
9591
  get when() {
8853
9592
  return sidebarTab() === "automation";
8854
9593
  },
@@ -8857,42 +9596,50 @@ ${contextBlock}` : contextBlock);
8857
9596
  onRun: () => setSidebarTab("supervisor")
8858
9597
  });
8859
9598
  }
8860
- }), _el$124);
8861
- insert(_el$25, createComponent(Show, {
9599
+ }), _el$125);
9600
+ insert(_el$26, createComponent(Show, {
9601
+ get when() {
9602
+ return sidebarTab() === "research";
9603
+ },
9604
+ get children() {
9605
+ return createComponent(ResearchDesk, {});
9606
+ }
9607
+ }), _el$125);
9608
+ insert(_el$26, createComponent(Show, {
8862
9609
  get when() {
8863
9610
  return sidebarTab() === "history";
8864
9611
  },
8865
9612
  get children() {
8866
- var _el$96 = _tmpl$14$2(), _el$97 = _el$96.firstChild, _el$98 = _el$97.firstChild, _el$99 = _el$98.nextSibling, _el$100 = _el$99.firstChild, _el$101 = _el$100.nextSibling, _el$102 = _el$101.nextSibling, _el$103 = _el$102.nextSibling, _el$104 = _el$97.nextSibling;
8867
- _el$100.$$click = async () => {
9613
+ var _el$97 = _tmpl$14$2(), _el$98 = _el$97.firstChild, _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling, _el$103 = _el$102.nextSibling, _el$104 = _el$103.nextSibling, _el$105 = _el$98.nextSibling;
9614
+ _el$101.$$click = async () => {
8868
9615
  await history.clear();
8869
9616
  };
8870
- _el$101.$$click = async () => {
9617
+ _el$102.$$click = async () => {
8871
9618
  const result = await window.vessel.history.exportHtml();
8872
9619
  if (!result) return;
8873
9620
  };
8874
- _el$102.$$click = async () => {
9621
+ _el$103.$$click = async () => {
8875
9622
  const result = await window.vessel.history.exportJson();
8876
9623
  if (!result) return;
8877
9624
  };
8878
- _el$103.$$click = async () => {
9625
+ _el$104.$$click = async () => {
8879
9626
  const result = await window.vessel.history.importFile();
8880
9627
  if (!result) return;
8881
9628
  };
8882
- insert(_el$104, createComponent(For, {
9629
+ insert(_el$105, createComponent(For, {
8883
9630
  get each() {
8884
9631
  return history.historyState().entries;
8885
9632
  },
8886
9633
  children: (entry) => (() => {
8887
- var _el$233 = _tmpl$57(), _el$234 = _el$233.firstChild, _el$235 = _el$234.nextSibling, _el$236 = _el$235.nextSibling;
8888
- _el$233.$$click = () => createTab(entry.url);
8889
- insert(_el$234, () => entry.title || entry.url);
8890
- insert(_el$235, () => entry.url);
8891
- insert(_el$236, () => new Date(entry.visitedAt).toLocaleString());
8892
- return _el$233;
9634
+ var _el$234 = _tmpl$57(), _el$235 = _el$234.firstChild, _el$236 = _el$235.nextSibling, _el$237 = _el$236.nextSibling;
9635
+ _el$234.$$click = () => createTab(entry.url);
9636
+ insert(_el$235, () => entry.title || entry.url);
9637
+ insert(_el$236, () => entry.url);
9638
+ insert(_el$237, () => new Date(entry.visitedAt).toLocaleString());
9639
+ return _el$234;
8893
9640
  })()
8894
9641
  }), null);
8895
- insert(_el$104, createComponent(Show, {
9642
+ insert(_el$105, createComponent(Show, {
8896
9643
  get when() {
8897
9644
  return history.historyState().entries.length === 0;
8898
9645
  },
@@ -8900,37 +9647,37 @@ ${contextBlock}` : contextBlock);
8900
9647
  return _tmpl$13$2();
8901
9648
  }
8902
9649
  }), null);
8903
- return _el$96;
9650
+ return _el$97;
8904
9651
  }
8905
- }), _el$124);
8906
- insert(_el$25, createComponent(Show, {
9652
+ }), _el$125);
9653
+ insert(_el$26, createComponent(Show, {
8907
9654
  get when() {
8908
9655
  return sidebarTab() === "diff";
8909
9656
  },
8910
9657
  get children() {
8911
- var _el$106 = _tmpl$15$2(), _el$107 = _el$106.firstChild, _el$108 = _el$107.firstChild, _el$109 = _el$108.nextSibling;
8912
- insert(_el$109, () => isPremium() ? "Page change timeline" : "Premium feature");
8913
- insert(_el$106, createComponent(Show, {
9658
+ var _el$107 = _tmpl$15$2(), _el$108 = _el$107.firstChild, _el$109 = _el$108.firstChild, _el$110 = _el$109.nextSibling;
9659
+ insert(_el$110, () => isPremium() ? "Page change timeline" : "Premium feature");
9660
+ insert(_el$107, createComponent(Show, {
8914
9661
  get when() {
8915
9662
  return isPremium();
8916
9663
  },
8917
9664
  get fallback() {
8918
9665
  return (() => {
8919
- var _el$237 = _tmpl$58(), _el$238 = _el$237.firstChild, _el$239 = _el$238.nextSibling, _el$240 = _el$239.nextSibling, _el$241 = _el$240.firstChild, _el$242 = _el$241.nextSibling;
8920
- _el$241.$$click = () => void window.vessel.premium.checkout(premiumState().email || void 0).catch(() => {
9666
+ var _el$238 = _tmpl$58(), _el$239 = _el$238.firstChild, _el$240 = _el$239.nextSibling, _el$241 = _el$240.nextSibling, _el$242 = _el$241.firstChild, _el$243 = _el$242.nextSibling;
9667
+ _el$242.$$click = () => void window.vessel.premium.checkout(premiumState().email || void 0).catch(() => {
8921
9668
  });
8922
- _el$242.$$click = openPremiumDetails;
8923
- return _el$237;
9669
+ _el$243.$$click = openPremiumDetails;
9670
+ return _el$238;
8924
9671
  })();
8925
9672
  },
8926
9673
  get children() {
8927
9674
  return createComponent(PageDiffTimeline, {});
8928
9675
  }
8929
9676
  }), null);
8930
- return _el$106;
9677
+ return _el$107;
8931
9678
  }
8932
- }), _el$124);
8933
- insert(_el$25, createComponent(Show, {
9679
+ }), _el$125);
9680
+ insert(_el$26, createComponent(Show, {
8934
9681
  get when() {
8935
9682
  return sidebarTab() === "chat";
8936
9683
  },
@@ -8940,23 +9687,23 @@ ${contextBlock}` : contextBlock);
8940
9687
  return !isPremium();
8941
9688
  },
8942
9689
  get children() {
8943
- var _el$110 = _tmpl$16$1(), _el$111 = _el$110.firstChild, _el$112 = _el$111.nextSibling, _el$113 = _el$112.nextSibling, _el$114 = _el$113.firstChild, _el$115 = _el$114.nextSibling;
8944
- _el$114.$$click = () => openPremiumCheckout("chat_banner_clicked");
8945
- _el$115.$$click = openPremiumDetails;
8946
- return _el$110;
9690
+ var _el$111 = _tmpl$16$1(), _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling, _el$114 = _el$113.nextSibling, _el$115 = _el$114.firstChild, _el$116 = _el$115.nextSibling;
9691
+ _el$115.$$click = () => openPremiumCheckout("chat_banner_clicked");
9692
+ _el$116.$$click = openPremiumDetails;
9693
+ return _el$111;
8947
9694
  }
8948
9695
  }), createComponent(For, {
8949
9696
  get each() {
8950
9697
  return messages2();
8951
9698
  },
8952
9699
  children: (msg) => (() => {
8953
- var _el$243 = _tmpl$59();
8954
- insert(_el$243, createComponent(MarkdownMessage, {
9700
+ var _el$244 = _tmpl$59();
9701
+ insert(_el$244, createComponent(MarkdownMessage, {
8955
9702
  get content() {
8956
9703
  return msg.content;
8957
9704
  }
8958
9705
  }), null);
8959
- insert(_el$243, createComponent(Show, {
9706
+ insert(_el$244, createComponent(Show, {
8960
9707
  get when() {
8961
9708
  return memo(() => msg.role === "assistant")() ? getPremiumPromptKind(msg.content) : null;
8962
9709
  },
@@ -8969,16 +9716,16 @@ ${contextBlock}` : contextBlock);
8969
9716
  onOpenSettings: openPremiumDetails
8970
9717
  })
8971
9718
  }), null);
8972
- createRenderEffect(() => className(_el$243, `message message-${msg.role}`));
8973
- return _el$243;
9719
+ createRenderEffect(() => className(_el$244, `message message-${msg.role}`));
9720
+ return _el$244;
8974
9721
  })()
8975
9722
  }), createComponent(Show, {
8976
9723
  get when() {
8977
9724
  return isStreaming2();
8978
9725
  },
8979
9726
  get children() {
8980
- var _el$116 = _tmpl$19$1(), _el$117 = _el$116.firstChild;
8981
- insert(_el$117, createComponent(Show, {
9727
+ var _el$117 = _tmpl$19$1(), _el$118 = _el$117.firstChild;
9728
+ insert(_el$118, createComponent(Show, {
8982
9729
  get when() {
8983
9730
  return hasFirstChunk2();
8984
9731
  },
@@ -8986,14 +9733,14 @@ ${contextBlock}` : contextBlock);
8986
9733
  return _tmpl$60();
8987
9734
  },
8988
9735
  get children() {
8989
- var _el$118 = _tmpl$18$1(), _el$119 = _el$118.firstChild, _el$120 = _el$119.firstChild;
8990
- _el$120.nextSibling;
8991
- insert(_el$118, createComponent(MarkdownMessage, {
9736
+ var _el$119 = _tmpl$18$1(), _el$120 = _el$119.firstChild, _el$121 = _el$120.firstChild;
9737
+ _el$121.nextSibling;
9738
+ insert(_el$119, createComponent(MarkdownMessage, {
8992
9739
  get content() {
8993
9740
  return streamingText2();
8994
9741
  }
8995
- }), _el$119);
8996
- insert(_el$118, createComponent(Show, {
9742
+ }), _el$120);
9743
+ insert(_el$119, createComponent(Show, {
8997
9744
  get when() {
8998
9745
  return getPremiumPromptKind(streamingText2());
8999
9746
  },
@@ -9005,21 +9752,21 @@ ${contextBlock}` : contextBlock);
9005
9752
  onStartTrial: () => openPremiumCheckout(kind() === "premium_gate" ? "premium_gate_clicked" : "iteration_limit_clicked"),
9006
9753
  onOpenSettings: openPremiumDetails
9007
9754
  })
9008
- }), _el$119);
9009
- insert(_el$119, createComponent(Show, {
9755
+ }), _el$120);
9756
+ insert(_el$120, createComponent(Show, {
9010
9757
  get when() {
9011
9758
  return elapsedSeconds() > 0;
9012
9759
  },
9013
9760
  get children() {
9014
- var _el$122 = _tmpl$17$1();
9015
- insert(_el$122, () => ` • ${elapsedSeconds()}s`);
9016
- return _el$122;
9761
+ var _el$123 = _tmpl$17$1();
9762
+ insert(_el$123, () => ` • ${elapsedSeconds()}s`);
9763
+ return _el$123;
9017
9764
  }
9018
9765
  }), null);
9019
- return _el$118;
9766
+ return _el$119;
9020
9767
  }
9021
9768
  }));
9022
- return _el$116;
9769
+ return _el$117;
9023
9770
  }
9024
9771
  }), createComponent(Show, {
9025
9772
  get when() {
@@ -9031,22 +9778,22 @@ ${contextBlock}` : contextBlock);
9031
9778
  return runtimeState2().supervisor.pendingApprovals;
9032
9779
  },
9033
9780
  children: (approval) => (() => {
9034
- var _el$245 = _tmpl$62(), _el$246 = _el$245.firstChild, _el$247 = _el$246.nextSibling, _el$248 = _el$247.firstChild, _el$249 = _el$248.firstChild, _el$250 = _el$249.nextSibling, _el$252 = _el$248.nextSibling, _el$253 = _el$252.nextSibling, _el$254 = _el$253.firstChild, _el$255 = _el$254.nextSibling;
9035
- insert(_el$250, () => approval.name);
9036
- insert(_el$247, createComponent(Show, {
9781
+ var _el$246 = _tmpl$62(), _el$247 = _el$246.firstChild, _el$248 = _el$247.nextSibling, _el$249 = _el$248.firstChild, _el$250 = _el$249.firstChild, _el$251 = _el$250.nextSibling, _el$253 = _el$249.nextSibling, _el$254 = _el$253.nextSibling, _el$255 = _el$254.firstChild, _el$256 = _el$255.nextSibling;
9782
+ insert(_el$251, () => approval.name);
9783
+ insert(_el$248, createComponent(Show, {
9037
9784
  get when() {
9038
9785
  return approval.argsSummary;
9039
9786
  },
9040
9787
  get children() {
9041
- var _el$251 = _tmpl$61();
9042
- insert(_el$251, () => approval.argsSummary);
9043
- return _el$251;
9788
+ var _el$252 = _tmpl$61();
9789
+ insert(_el$252, () => approval.argsSummary);
9790
+ return _el$252;
9044
9791
  }
9045
- }), _el$252);
9046
- insert(_el$252, () => approval.reason);
9047
- _el$254.$$click = () => void resolveApproval(approval.id, true);
9048
- _el$255.$$click = () => void resolveApproval(approval.id, false);
9049
- return _el$245;
9792
+ }), _el$253);
9793
+ insert(_el$253, () => approval.reason);
9794
+ _el$255.$$click = () => void resolveApproval(approval.id, true);
9795
+ _el$256.$$click = () => void resolveApproval(approval.id, false);
9796
+ return _el$246;
9050
9797
  })()
9051
9798
  });
9052
9799
  }
@@ -9059,9 +9806,9 @@ ${contextBlock}` : contextBlock);
9059
9806
  }
9060
9807
  })];
9061
9808
  }
9062
- }), _el$124);
9809
+ }), _el$125);
9063
9810
  var _ref$ = messagesEndRef;
9064
- typeof _ref$ === "function" ? use(_ref$, _el$124) : messagesEndRef = _el$124;
9811
+ typeof _ref$ === "function" ? use(_ref$, _el$125) : messagesEndRef = _el$125;
9065
9812
  insert(_el$9, createComponent(Show, {
9066
9813
  get when() {
9067
9814
  return sidebarTab() === "chat";
@@ -9072,125 +9819,125 @@ ${contextBlock}` : contextBlock);
9072
9819
  return isStreaming2() || messages2().length > 0;
9073
9820
  },
9074
9821
  get children() {
9075
- var _el$125 = _tmpl$23$1();
9076
- insert(_el$125, createComponent(Show, {
9822
+ var _el$126 = _tmpl$23$1();
9823
+ insert(_el$126, createComponent(Show, {
9077
9824
  get when() {
9078
9825
  return isStreaming2();
9079
9826
  },
9080
9827
  get children() {
9081
- var _el$126 = _tmpl$21$1();
9082
- _el$126.$$click = () => cancel();
9083
- return _el$126;
9828
+ var _el$127 = _tmpl$21$1();
9829
+ _el$127.$$click = () => cancel();
9830
+ return _el$127;
9084
9831
  }
9085
9832
  }), null);
9086
- insert(_el$125, createComponent(Show, {
9833
+ insert(_el$126, createComponent(Show, {
9087
9834
  get when() {
9088
9835
  return memo(() => !!!isStreaming2())() && messages2().length > 0;
9089
9836
  },
9090
9837
  get children() {
9091
- var _el$127 = _tmpl$22$1();
9092
- _el$127.$$click = handleRetry;
9093
- return _el$127;
9838
+ var _el$128 = _tmpl$22$1();
9839
+ _el$128.$$click = handleRetry;
9840
+ return _el$128;
9094
9841
  }
9095
9842
  }), null);
9096
- return _el$125;
9843
+ return _el$126;
9097
9844
  }
9098
9845
  }), createComponent(Show, {
9099
9846
  get when() {
9100
9847
  return highlightCount() > 0;
9101
9848
  },
9102
9849
  get children() {
9103
- var _el$128 = _tmpl$24$1(), _el$129 = _el$128.firstChild, _el$130 = _el$129.nextSibling;
9104
- _el$130.firstChild;
9105
- var _el$132 = _el$130.nextSibling;
9106
- _el$129.$$click = () => void scrollToHighlight(highlightIndex() - 1);
9107
- _el$130.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
9108
- insert(_el$130, (() => {
9850
+ var _el$129 = _tmpl$24$1(), _el$130 = _el$129.firstChild, _el$131 = _el$130.nextSibling;
9851
+ _el$131.firstChild;
9852
+ var _el$133 = _el$131.nextSibling;
9853
+ _el$130.$$click = () => void scrollToHighlight(highlightIndex() - 1);
9854
+ _el$131.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
9855
+ insert(_el$131, (() => {
9109
9856
  var _c$4 = memo(() => highlightIndex() >= 0);
9110
9857
  return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
9111
9858
  })(), null);
9112
- _el$132.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
9859
+ _el$133.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
9113
9860
  createRenderEffect((_p$) => {
9114
9861
  var _v$9 = highlightIndex() <= 0, _v$0 = highlightIndex() >= highlightCount() - 1;
9115
- _v$9 !== _p$.e && (_el$129.disabled = _p$.e = _v$9);
9116
- _v$0 !== _p$.t && (_el$132.disabled = _p$.t = _v$0);
9862
+ _v$9 !== _p$.e && (_el$130.disabled = _p$.e = _v$9);
9863
+ _v$0 !== _p$.t && (_el$133.disabled = _p$.t = _v$0);
9117
9864
  return _p$;
9118
9865
  }, {
9119
9866
  e: void 0,
9120
9867
  t: void 0
9121
9868
  });
9122
- return _el$128;
9869
+ return _el$129;
9123
9870
  }
9124
9871
  }), createComponent(Show, {
9125
9872
  get when() {
9126
9873
  return queueNotice2() !== null || pendingQueryCount() > 0;
9127
9874
  },
9128
9875
  get children() {
9129
- var _el$133 = _tmpl$27$1(), _el$134 = _el$133.firstChild, _el$135 = _el$134.firstChild;
9130
- insert(_el$135, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
9131
- insert(_el$134, createComponent(Show, {
9876
+ var _el$134 = _tmpl$27$1(), _el$135 = _el$134.firstChild, _el$136 = _el$135.firstChild;
9877
+ insert(_el$136, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
9878
+ insert(_el$135, createComponent(Show, {
9132
9879
  get when() {
9133
9880
  return pendingQueryCount() > 0;
9134
9881
  },
9135
9882
  get children() {
9136
- var _el$136 = _tmpl$25$1();
9137
- _el$136.$$click = () => clearPendingQueries();
9138
- return _el$136;
9883
+ var _el$137 = _tmpl$25$1();
9884
+ _el$137.$$click = () => clearPendingQueries();
9885
+ return _el$137;
9139
9886
  }
9140
9887
  }), null);
9141
- insert(_el$133, createComponent(Show, {
9888
+ insert(_el$134, createComponent(Show, {
9142
9889
  get when() {
9143
9890
  return pendingQueries2().length > 0;
9144
9891
  },
9145
9892
  get children() {
9146
- var _el$137 = _tmpl$26$1();
9147
- insert(_el$137, createComponent(For, {
9893
+ var _el$138 = _tmpl$26$1();
9894
+ insert(_el$138, createComponent(For, {
9148
9895
  get each() {
9149
9896
  return pendingQueries2();
9150
9897
  },
9151
9898
  children: (pendingPrompt, index) => (() => {
9152
- var _el$256 = _tmpl$63(), _el$257 = _el$256.firstChild, _el$258 = _el$257.nextSibling;
9153
- setAttribute(_el$257, "title", pendingPrompt);
9154
- insert(_el$257, pendingPrompt);
9155
- _el$258.$$click = () => removePendingQuery(index());
9156
- createRenderEffect(() => setAttribute(_el$258, "aria-label", `Remove queued prompt ${index() + 1}`));
9157
- return _el$256;
9899
+ var _el$257 = _tmpl$63(), _el$258 = _el$257.firstChild, _el$259 = _el$258.nextSibling;
9900
+ setAttribute(_el$258, "title", pendingPrompt);
9901
+ insert(_el$258, pendingPrompt);
9902
+ _el$259.$$click = () => removePendingQuery(index());
9903
+ createRenderEffect(() => setAttribute(_el$259, "aria-label", `Remove queued prompt ${index() + 1}`));
9904
+ return _el$257;
9158
9905
  })()
9159
9906
  }));
9160
- return _el$137;
9907
+ return _el$138;
9161
9908
  }
9162
9909
  }), null);
9163
- return _el$133;
9910
+ return _el$134;
9164
9911
  }
9165
9912
  }), (() => {
9166
- var _el$138 = _tmpl$28$1(), _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling;
9167
- _el$139.$$keydown = (e) => {
9913
+ var _el$139 = _tmpl$28$1(), _el$140 = _el$139.firstChild, _el$141 = _el$140.nextSibling;
9914
+ _el$140.$$keydown = (e) => {
9168
9915
  if (e.key === "Enter" && !e.shiftKey) {
9169
9916
  e.preventDefault();
9170
9917
  void handleChatSend();
9171
9918
  }
9172
9919
  };
9173
- _el$139.$$input = (e) => setChatInput(e.currentTarget.value);
9920
+ _el$140.$$input = (e) => setChatInput(e.currentTarget.value);
9174
9921
  var _ref$2 = chatInputRef;
9175
- typeof _ref$2 === "function" ? use(_ref$2, _el$139) : chatInputRef = _el$139;
9176
- _el$140.$$click = () => void handleChatSend();
9177
- insert(_el$140, () => isStreaming2() ? "Queue" : "Send");
9922
+ typeof _ref$2 === "function" ? use(_ref$2, _el$140) : chatInputRef = _el$140;
9923
+ _el$141.$$click = () => void handleChatSend();
9924
+ insert(_el$141, () => isStreaming2() ? "Queue" : "Send");
9178
9925
  createRenderEffect((_p$) => {
9179
9926
  var _v$1 = isStreaming2() ? "Send now to queue the next prompt..." : "Ask anything...", _v$10 = !chatInput().trim();
9180
- _v$1 !== _p$.e && setAttribute(_el$139, "placeholder", _p$.e = _v$1);
9181
- _v$10 !== _p$.t && (_el$140.disabled = _p$.t = _v$10);
9927
+ _v$1 !== _p$.e && setAttribute(_el$140, "placeholder", _p$.e = _v$1);
9928
+ _v$10 !== _p$.t && (_el$141.disabled = _p$.t = _v$10);
9182
9929
  return _p$;
9183
9930
  }, {
9184
9931
  e: void 0,
9185
9932
  t: void 0
9186
9933
  });
9187
- createRenderEffect(() => _el$139.value = chatInput());
9188
- return _el$138;
9934
+ createRenderEffect(() => _el$140.value = chatInput());
9935
+ return _el$139;
9189
9936
  })()];
9190
9937
  }
9191
9938
  }), null);
9192
9939
  createRenderEffect((_p$) => {
9193
- var _v$11 = `${sidebarWidth2()}px`, _v$12 = !!isDragging(), _v$13 = !!(sidebarTab() === "supervisor"), _v$14 = sidebarTab() === "supervisor", _v$15 = !!(sidebarTab() === "bookmarks"), _v$16 = sidebarTab() === "bookmarks", _v$17 = !!(sidebarTab() === "checkpoints"), _v$18 = sidebarTab() === "checkpoints", _v$19 = !!(sidebarTab() === "chat"), _v$20 = sidebarTab() === "chat", _v$21 = !!(sidebarTab() === "automation"), _v$22 = sidebarTab() === "automation", _v$23 = !!(sidebarTab() === "history"), _v$24 = sidebarTab() === "history", _v$25 = !!(sidebarTab() === "diff"), _v$26 = sidebarTab() === "diff";
9940
+ var _v$11 = `${sidebarWidth2()}px`, _v$12 = !!isDragging(), _v$13 = !!(sidebarTab() === "supervisor"), _v$14 = sidebarTab() === "supervisor", _v$15 = !!(sidebarTab() === "bookmarks"), _v$16 = sidebarTab() === "bookmarks", _v$17 = !!(sidebarTab() === "checkpoints"), _v$18 = sidebarTab() === "checkpoints", _v$19 = !!(sidebarTab() === "chat"), _v$20 = sidebarTab() === "chat", _v$21 = !!(sidebarTab() === "automation"), _v$22 = sidebarTab() === "automation", _v$23 = !!(sidebarTab() === "history"), _v$24 = sidebarTab() === "history", _v$25 = !!(sidebarTab() === "diff"), _v$26 = sidebarTab() === "diff", _v$27 = !!(sidebarTab() === "research"), _v$28 = sidebarTab() === "research";
9194
9941
  _v$11 !== _p$.e && setStyleProperty(_el$9, "width", _p$.e = _v$11);
9195
9942
  _v$12 !== _p$.t && _el$0.classList.toggle("dragging", _p$.t = _v$12);
9196
9943
  _v$13 !== _p$.a && _el$16.classList.toggle("active", _p$.a = _v$13);
@@ -9207,6 +9954,8 @@ ${contextBlock}` : contextBlock);
9207
9954
  _v$24 !== _p$.w && setAttribute(_el$23, "aria-selected", _p$.w = _v$24);
9208
9955
  _v$25 !== _p$.m && _el$24.classList.toggle("active", _p$.m = _v$25);
9209
9956
  _v$26 !== _p$.f && setAttribute(_el$24, "aria-selected", _p$.f = _v$26);
9957
+ _v$27 !== _p$.y && _el$25.classList.toggle("active", _p$.y = _v$27);
9958
+ _v$28 !== _p$.g && setAttribute(_el$25, "aria-selected", _p$.g = _v$28);
9210
9959
  return _p$;
9211
9960
  }, {
9212
9961
  e: void 0,
@@ -9224,7 +9973,9 @@ ${contextBlock}` : contextBlock);
9224
9973
  c: void 0,
9225
9974
  w: void 0,
9226
9975
  m: void 0,
9227
- f: void 0
9976
+ f: void 0,
9977
+ y: void 0,
9978
+ g: void 0
9228
9979
  });
9229
9980
  return _el$9;
9230
9981
  }
@@ -9454,10 +10205,10 @@ const DevToolsPanel = () => {
9454
10205
  let exportBtnRef;
9455
10206
  let exportDropdownRef;
9456
10207
  createEffect(() => {
9457
- const cleanup = window.vessel.devtoolsPanel.onStateUpdate((newState) => {
10208
+ const cleanup2 = window.vessel.devtoolsPanel.onStateUpdate((newState) => {
9458
10209
  setState(newState);
9459
10210
  });
9460
- onCleanup(cleanup);
10211
+ onCleanup(cleanup2);
9461
10212
  });
9462
10213
  createEffect(() => {
9463
10214
  if (!showExport()) return;