@quanta-intellect/vessel-browser 0.1.94 → 0.1.97

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,598 @@ 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 = /\b(?: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-Z][.)]|\([A-Z]\)|Option\s+\d+[::])\s+/i;
7698
+ function makeQuickReply(label) {
7699
+ const cleaned = label.replace(EXPLICIT_OPTION_PREFIX, "").replace(/\s+/g, " ").trim().replace(/[.?!:]$/, "");
7700
+ if (cleaned.length < 2 || cleaned.length > 80) return null;
7701
+ return {
7702
+ label: cleaned,
7703
+ response: `Let's use: ${cleaned}.`
7704
+ };
7705
+ }
7706
+ function isExplicitOptionLine(line) {
7707
+ if (!EXPLICIT_OPTION_PREFIX.test(line)) return false;
7708
+ const cleaned = line.replace(EXPLICIT_OPTION_PREFIX, "").trim();
7709
+ if (!cleaned) return false;
7710
+ return !/[?]$/.test(cleaned);
7711
+ }
7712
+ function extractDelimitedOptions(text2) {
7713
+ return text2.split(/\s*(?:;|,|\/|\||\bor\b)\s*/i).map(makeQuickReply).filter((option) => option !== null);
7714
+ }
7715
+ function extractFollowUpOptions(prompt) {
7716
+ const lines = prompt.split("\n");
7717
+ const options = [];
7718
+ for (let i = 0; i < lines.length - 1; i++) {
7719
+ const line = lines[i].trim();
7720
+ const nextLine = lines[i + 1].trim();
7721
+ if (!line.includes("?")) continue;
7722
+ if (!nextLine) continue;
7723
+ if (EXPLICIT_OPTION_PREFIX.test(nextLine)) continue;
7724
+ if (!/[,;\/|]|\bor\b/.test(nextLine)) continue;
7725
+ options.push(...extractDelimitedOptions(nextLine));
7726
+ }
7727
+ return uniqueQuickReplies(options);
7728
+ }
7729
+ function extractExampleQuickReplies(prompt) {
7730
+ const options = [];
7731
+ for (const line of prompt.split("\n")) {
7732
+ if (!/\b(?:examples?|sample (?:answers?|responses?)|e\.g\.|for instance|you (?:could|might) (?:say|answer|reply))\b/i.test(line)) {
7733
+ continue;
7734
+ }
7735
+ const quoted = Array.from(line.matchAll(/["“”']([^"“”']{2,140})["“”']/g), (match) => match[1]).map(makeQuickReply).filter((option) => option !== null);
7736
+ options.push(...quoted);
7737
+ if (quoted.length === 0) {
7738
+ 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();
7739
+ options.push(...extractDelimitedOptions(exampleText));
7740
+ }
7741
+ }
7742
+ return uniqueQuickReplies(options);
7743
+ }
7744
+ function extractExplicitQuickReplies(prompt) {
7745
+ const options = [];
7746
+ for (const line of prompt.split("\n")) {
7747
+ const option = makeQuickReply(line);
7748
+ if (isExplicitOptionLine(line) && option) {
7749
+ options.push(option);
7750
+ }
7751
+ }
7752
+ const inlineMatch = prompt.match(/(?:choose|pick|select|prefer|between|among)\s+(.+?)(?:\?|$)/i);
7753
+ if (inlineMatch) {
7754
+ options.push(...extractDelimitedOptions(inlineMatch[1]));
7755
+ }
7756
+ const labelledMatch = prompt.match(/(?:options?|choices?)\s*[::]\s*(.+?)(?:\n|$)/i);
7757
+ if (labelledMatch) {
7758
+ options.push(...extractDelimitedOptions(labelledMatch[1]));
7759
+ }
7760
+ options.push(...extractExampleQuickReplies(prompt));
7761
+ options.push(...extractFollowUpOptions(prompt));
7762
+ return uniqueQuickReplies(options);
7763
+ }
7764
+ function buildQuickReplies(prompt) {
7765
+ const explicitOptions = extractExplicitQuickReplies(prompt);
7766
+ if (explicitOptions.length > 0) {
7767
+ return explicitOptions.slice(0, 6);
7768
+ }
7769
+ if (YES_NO_QUESTION_PATTERN.test(prompt)) {
7770
+ return [{
7771
+ label: "Yes",
7772
+ response: "Yes."
7773
+ }, {
7774
+ label: "No",
7775
+ response: "No."
7776
+ }];
7777
+ }
7778
+ if (PROCEED_QUESTION_PATTERN.test(prompt)) {
7779
+ return [{
7780
+ label: "Use defaults",
7781
+ response: "Use sensible defaults and proceed. If a choice materially affects the report, call it out in the assumptions."
7782
+ }];
7783
+ }
7784
+ if (prompt.includes("?")) {
7785
+ return [{
7786
+ label: "Use defaults",
7787
+ response: "Use sensible defaults and proceed. If any assumption materially affects the report, call it out clearly."
7788
+ }];
7789
+ }
7790
+ return [];
7791
+ }
7792
+ function isDefaultQuickReply(option) {
7793
+ return option.label.toLowerCase() === "use defaults";
7794
+ }
7795
+ function pickResearchClarificationQuickReplies(clarification) {
7796
+ const parsedQuestionOptions = extractExplicitQuickReplies(clarification.question);
7797
+ const structuredOptions = clarification.options.map((option) => ({
7798
+ label: option.label,
7799
+ response: option.response
7800
+ }));
7801
+ if (parsedQuestionOptions.length > 0 && (structuredOptions.length === 0 || structuredOptions.every(isDefaultQuickReply))) {
7802
+ return parsedQuestionOptions;
7803
+ }
7804
+ return structuredOptions;
7805
+ }
7806
+ function findLatestAssistantQuickReplyTarget(messages2) {
7807
+ for (let i = messages2.length - 1; i >= 0; i -= 1) {
7808
+ const message = messages2[i];
7809
+ const content = message.content.trim();
7810
+ if (!content) continue;
7811
+ if (message.role !== "assistant") return "";
7812
+ if (content && buildQuickReplies(content).length > 0) {
7813
+ return content;
7814
+ }
7815
+ return "";
7816
+ }
7817
+ return "";
7818
+ }
7819
+ function findLatestResearchClarification(messages2, clarifications) {
7820
+ let latestAssistantContent = "";
7821
+ for (let i = messages2.length - 1; i >= 0; i -= 1) {
7822
+ const message = messages2[i];
7823
+ const content = message.content.trim();
7824
+ if (!content) continue;
7825
+ if (message.role !== "assistant") {
7826
+ return null;
7827
+ }
7828
+ latestAssistantContent = content;
7829
+ break;
7830
+ }
7831
+ if (!latestAssistantContent) return null;
7832
+ for (let i = clarifications.length - 1; i >= 0; i -= 1) {
7833
+ const clarification = clarifications[i];
7834
+ if (clarification.question.trim() === latestAssistantContent) {
7835
+ return clarification;
7836
+ }
7837
+ }
7838
+ return null;
7839
+ }
7840
+ const ResearchDesk = () => {
7841
+ const research = useResearch();
7842
+ const {
7843
+ query: sendChatQuery,
7844
+ messages: messages2,
7845
+ streamingText: streamingText2,
7846
+ isStreaming: isStreaming2,
7847
+ pendingQueryCount,
7848
+ researchClarifications: researchClarifications2
7849
+ } = useAI();
7850
+ const state = research.state;
7851
+ const [topicInput, setTopicInput] = createSignal("");
7852
+ const [briefInput, setBriefInput] = createSignal("");
7853
+ const [startError, setStartError] = createSignal("");
7854
+ const transcriptMessages = createMemo(() => {
7855
+ const allMessages = messages2();
7856
+ const originalQuery = state().originalQuery?.trim();
7857
+ if (!originalQuery) return allMessages;
7858
+ for (let i = allMessages.length - 1; i >= 0; i -= 1) {
7859
+ const message = allMessages[i];
7860
+ if (message.role === "user" && message.content.trim() === originalQuery) {
7861
+ return allMessages.slice(i);
7862
+ }
7863
+ }
7864
+ return [];
7865
+ });
7866
+ const hasAssistantBrief = createMemo(() => transcriptMessages().some((message) => message.role === "assistant"));
7867
+ const latestResearchClarification = createMemo(() => findLatestResearchClarification(transcriptMessages(), researchClarifications2()));
7868
+ const latestAssistantQuickReplyTarget = createMemo(() => latestResearchClarification()?.question ?? findLatestAssistantQuickReplyTarget(transcriptMessages()));
7869
+ const quickReplies = createMemo(() => {
7870
+ const clarification = latestResearchClarification();
7871
+ if (clarification) {
7872
+ return pickResearchClarificationQuickReplies(clarification);
7873
+ }
7874
+ return latestAssistantQuickReplyTarget() ? buildQuickReplies(latestAssistantQuickReplyTarget()) : [];
7875
+ });
7876
+ const shouldShowQuickRepliesForMessage = (content) => quickReplies().length > 0 && content.trim() === latestAssistantQuickReplyTarget();
7877
+ const isBriefStarting = createMemo(() => state().phase === "briefing" && transcriptMessages().length === 0 && !streamingText2() && pendingQueryCount() === 0);
7878
+ const sendBriefMessage = async (message) => {
7879
+ const trimmed = message.trim();
7880
+ if (!trimmed) return;
7881
+ setBriefInput("");
7882
+ await sendChatQuery(trimmed);
7883
+ };
7884
+ const startBrief = async () => {
7885
+ const query = topicInput().trim();
7886
+ if (!query) return;
7887
+ const result = await research.startBrief(query);
7888
+ if (result.accepted) {
7889
+ setStartError("");
7890
+ setTopicInput("");
7891
+ await sendBriefMessage(query);
7892
+ } else {
7893
+ 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.");
7894
+ }
7895
+ };
7896
+ return (() => {
7897
+ var _el$3 = _tmpl$16$2();
7898
+ insert(_el$3, createComponent(Switch, {
7899
+ get children() {
7900
+ return [createComponent(Match, {
7901
+ get when() {
7902
+ return state().phase === "idle";
7903
+ },
7904
+ get children() {
7905
+ 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;
7906
+ insert(_el$4, createComponent(Show, {
7907
+ get when() {
7908
+ return !research.isPremium();
7909
+ },
7910
+ get children() {
7911
+ return _tmpl$3$b();
7912
+ }
7913
+ }), _el$8);
7914
+ _el$8.addEventListener("submit", (event) => {
7915
+ event.preventDefault();
7916
+ void startBrief();
7917
+ });
7918
+ _el$9.$$keydown = (event) => {
7919
+ if (event.key === "Enter" && !event.shiftKey) {
7920
+ event.preventDefault();
7921
+ void startBrief();
7922
+ }
7923
+ };
7924
+ _el$9.$$input = (event) => setTopicInput(event.currentTarget.value);
7925
+ insert(_el$4, createComponent(Show, {
7926
+ get when() {
7927
+ return startError();
7928
+ },
7929
+ get children() {
7930
+ var _el$1 = _tmpl$4$b();
7931
+ insert(_el$1, startError);
7932
+ return _el$1;
7933
+ }
7934
+ }), null);
7935
+ createRenderEffect(() => _el$0.disabled = !topicInput().trim());
7936
+ createRenderEffect(() => _el$9.value = topicInput());
7937
+ return _el$4;
7938
+ }
7939
+ }), createComponent(Match, {
7940
+ get when() {
7941
+ return state().phase === "briefing";
7942
+ },
7943
+ get children() {
7944
+ 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;
7945
+ insert(_el$13, createComponent(Show, {
7946
+ get when() {
7947
+ return isBriefStarting();
7948
+ },
7949
+ get children() {
7950
+ return _tmpl$6$a();
7951
+ }
7952
+ }), null);
7953
+ insert(_el$13, createComponent(For, {
7954
+ get each() {
7955
+ return transcriptMessages();
7956
+ },
7957
+ children: (message) => [createComponent(ResearchBriefMessage, {
7958
+ get role() {
7959
+ return message.role;
7960
+ },
7961
+ get content() {
7962
+ return message.content;
7963
+ }
7964
+ }), createComponent(Show, {
7965
+ get when() {
7966
+ return memo(() => message.role === "assistant")() && shouldShowQuickRepliesForMessage(message.content);
7967
+ },
7968
+ get children() {
7969
+ var _el$38 = _tmpl$17$2();
7970
+ insert(_el$38, createComponent(For, {
7971
+ get each() {
7972
+ return quickReplies();
7973
+ },
7974
+ children: (option) => (() => {
7975
+ var _el$39 = _tmpl$18$2();
7976
+ _el$39.$$click = () => void sendBriefMessage(option.response);
7977
+ insert(_el$39, () => option.label);
7978
+ return _el$39;
7979
+ })()
7980
+ }));
7981
+ return _el$38;
7982
+ }
7983
+ })]
7984
+ }), null);
7985
+ insert(_el$13, createComponent(Show, {
7986
+ get when() {
7987
+ return memo(() => !!isStreaming2())() && streamingText2();
7988
+ },
7989
+ get children() {
7990
+ return createComponent(ResearchBriefMessage, {
7991
+ role: "assistant",
7992
+ get content() {
7993
+ return streamingText2();
7994
+ }
7995
+ });
7996
+ }
7997
+ }), null);
7998
+ insert(_el$13, createComponent(Show, {
7999
+ get when() {
8000
+ return memo(() => !!isStreaming2())() && !streamingText2();
8001
+ },
8002
+ get children() {
8003
+ return _tmpl$7$8();
8004
+ }
8005
+ }), null);
8006
+ insert(_el$13, createComponent(Show, {
8007
+ get when() {
8008
+ return pendingQueryCount() > 0;
8009
+ },
8010
+ get children() {
8011
+ var _el$16 = _tmpl$8$7(), _el$17 = _el$16.firstChild;
8012
+ insert(_el$16, pendingQueryCount, _el$17);
8013
+ return _el$16;
8014
+ }
8015
+ }), null);
8016
+ _el$18.addEventListener("submit", (event) => {
8017
+ event.preventDefault();
8018
+ void sendBriefMessage(briefInput());
8019
+ });
8020
+ _el$19.$$keydown = (event) => {
8021
+ if (event.key === "Enter" && !event.shiftKey) {
8022
+ event.preventDefault();
8023
+ void sendBriefMessage(briefInput());
8024
+ }
8025
+ };
8026
+ _el$19.$$input = (event) => setBriefInput(event.currentTarget.value);
8027
+ insert(_el$20, () => isStreaming2() ? "Queue" : "Send");
8028
+ _el$22.$$click = async () => {
8029
+ const result = await research.confirmBrief();
8030
+ if (result.accepted) {
8031
+ await sendChatQuery("Build the Research Objectives from this brief now.");
8032
+ } else if (result.reason === "premium") {
8033
+ void window.vessel.premium.checkout();
8034
+ }
8035
+ };
8036
+ _el$23.$$click = () => research.cancel();
8037
+ createRenderEffect((_p$) => {
8038
+ 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();
8039
+ _v$ !== _p$.e && setAttribute(_el$19, "placeholder", _p$.e = _v$);
8040
+ _v$2 !== _p$.t && (_el$20.disabled = _p$.t = _v$2);
8041
+ _v$3 !== _p$.a && (_el$22.disabled = _p$.a = _v$3);
8042
+ return _p$;
8043
+ }, {
8044
+ e: void 0,
8045
+ t: void 0,
8046
+ a: void 0
8047
+ });
8048
+ createRenderEffect(() => _el$19.value = briefInput());
8049
+ return _el$10;
8050
+ }
8051
+ }), createComponent(Match, {
8052
+ get when() {
8053
+ return state().phase === "planning";
8054
+ },
8055
+ get children() {
8056
+ return _tmpl$0$4();
8057
+ }
8058
+ }), createComponent(Match, {
8059
+ get when() {
8060
+ return state().phase === "awaiting_approval";
8061
+ },
8062
+ get children() {
8063
+ var _el$25 = _tmpl$1$4();
8064
+ _el$25.firstChild;
8065
+ insert(_el$25, createComponent(Show, {
8066
+ get when() {
8067
+ return state().objectives;
8068
+ },
8069
+ children: (obj) => (() => {
8070
+ var _el$40 = _tmpl$19$2(), _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild;
8071
+ _el$42.nextSibling;
8072
+ var _el$44 = _el$41.nextSibling, _el$45 = _el$44.firstChild;
8073
+ _el$45.nextSibling;
8074
+ 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;
8075
+ insert(_el$41, () => obj().researchQuestion, null);
8076
+ insert(_el$44, () => obj().threads.length, null);
8077
+ insert(_el$47, () => obj().threads.map((t) => (() => {
8078
+ var _el$55 = _tmpl$20$2(), _el$56 = _el$55.firstChild, _el$58 = _el$56.nextSibling;
8079
+ _el$58.nextSibling;
8080
+ insert(_el$55, () => t.label, _el$56);
8081
+ insert(_el$55, () => t.sourceBudget, _el$58);
8082
+ return _el$55;
8083
+ })()));
8084
+ _el$49.addEventListener("change", (e) => research.setMode(e.currentTarget.checked ? "walk-away" : "interactive"));
8085
+ _el$51.addEventListener("change", (e) => research.setTraces(e.currentTarget.checked));
8086
+ _el$53.$$click = () => research.approveObjectives({
8087
+ supervisionMode: state().supervisionMode,
8088
+ includeTraces: state().includeTraces
8089
+ });
8090
+ _el$54.$$click = () => research.cancel();
8091
+ createRenderEffect(() => _el$49.checked = state().supervisionMode === "walk-away");
8092
+ createRenderEffect(() => _el$51.checked = state().includeTraces);
8093
+ return _el$40;
8094
+ })()
8095
+ }), null);
8096
+ return _el$25;
8097
+ }
8098
+ }), createComponent(Match, {
8099
+ get when() {
8100
+ return state().phase === "executing";
8101
+ },
8102
+ get children() {
8103
+ var _el$27 = _tmpl$13$3();
8104
+ _el$27.firstChild;
8105
+ insert(_el$27, createComponent(Show, {
8106
+ get when() {
8107
+ return state().threadFindings.length > 0;
8108
+ },
8109
+ get children() {
8110
+ var _el$29 = _tmpl$10$4(), _el$30 = _el$29.firstChild, _el$32 = _el$30.nextSibling;
8111
+ _el$32.nextSibling;
8112
+ insert(_el$29, () => state().threadFindings.length, _el$30);
8113
+ insert(_el$29, () => state().threads.length, _el$32);
8114
+ return _el$29;
8115
+ }
8116
+ }), null);
8117
+ insert(_el$27, createComponent(Show, {
8118
+ get when() {
8119
+ return state().supervisionMode === "interactive";
8120
+ },
8121
+ get children() {
8122
+ var _el$33 = _tmpl$11$4();
8123
+ _el$33.$$click = () => research.setMode("walk-away");
8124
+ return _el$33;
8125
+ }
8126
+ }), null);
8127
+ insert(_el$27, createComponent(Show, {
8128
+ get when() {
8129
+ return state().supervisionMode === "walk-away";
8130
+ },
8131
+ get children() {
8132
+ var _el$34 = _tmpl$12$4();
8133
+ _el$34.$$click = () => research.setMode("interactive");
8134
+ return _el$34;
8135
+ }
8136
+ }), null);
8137
+ return _el$27;
8138
+ }
8139
+ }), createComponent(Match, {
8140
+ get when() {
8141
+ return state().phase === "synthesizing";
8142
+ },
8143
+ get children() {
8144
+ return _tmpl$14$3();
8145
+ }
8146
+ }), createComponent(Match, {
8147
+ get when() {
8148
+ return state().phase === "delivered";
8149
+ },
8150
+ get children() {
8151
+ var _el$36 = _tmpl$15$3();
8152
+ _el$36.firstChild;
8153
+ insert(_el$36, createComponent(Show, {
8154
+ get when() {
8155
+ return state().report;
8156
+ },
8157
+ children: (report) => (() => {
8158
+ 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;
8159
+ insert(_el$60, () => report().title);
8160
+ insert(_el$61, () => report().executiveSummary.slice(0, 300), _el$62);
8161
+ insert(_el$63, () => report().sourceIndex.length, _el$64);
8162
+ _el$65.$$click = () => research.exportReport();
8163
+ _el$66.$$click = () => research.cancel();
8164
+ return _el$59;
8165
+ })()
8166
+ }), null);
8167
+ return _el$36;
8168
+ }
8169
+ })];
8170
+ }
8171
+ }));
8172
+ return _el$3;
8173
+ })();
8174
+ };
8175
+ delegateEvents(["input", "keydown", "click"]);
7515
8176
  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
8177
  const PageDiffTimeline = () => {
7517
8178
  const {
@@ -7643,7 +8304,7 @@ const PageDiffTimeline = () => {
7643
8304
  })();
7644
8305
  };
7645
8306
  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>×`);
8307
+ 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
8308
  const UNSORTED_FOLDER = {
7648
8309
  id: "unsorted",
7649
8310
  name: "Unsorted",
@@ -7764,8 +8425,8 @@ const Sidebar = (props) => {
7764
8425
  onMount(() => {
7765
8426
  void window.vessel.premium.getState().then(setPremiumState).catch(() => {
7766
8427
  });
7767
- const cleanup = window.vessel.premium.onUpdate(setPremiumState);
7768
- onCleanup(cleanup);
8428
+ const cleanup2 = window.vessel.premium.onUpdate(setPremiumState);
8429
+ onCleanup(cleanup2);
7769
8430
  });
7770
8431
  const syncHighlightCount = async () => {
7771
8432
  try {
@@ -8246,12 +8907,12 @@ ${contextBlock}` : contextBlock);
8246
8907
  };
8247
8908
  const isFolderExpanded = (folderId) => normalizedBookmarkSearch().length > 0 || expandedFolderIds().includes(folderId);
8248
8909
  onMount(() => {
8249
- const cleanup = window.vessel.ui.onSidebarNavigate((tab) => {
8910
+ const cleanup2 = window.vessel.ui.onSidebarNavigate((tab) => {
8250
8911
  if (tab === "supervisor" || tab === "bookmarks" || tab === "checkpoints" || tab === "chat" || tab === "automation" || tab === "history" || tab === "diff") {
8251
8912
  setSidebarTab(tab);
8252
8913
  }
8253
8914
  });
8254
- onCleanup(cleanup);
8915
+ onCleanup(cleanup2);
8255
8916
  });
8256
8917
  return createComponent(Show, {
8257
8918
  get when() {
@@ -8260,7 +8921,7 @@ ${contextBlock}` : contextBlock);
8260
8921
  get children() {
8261
8922
  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
8923
  _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;
8924
+ 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
8925
  _el$0.$$pointerdown = startResize;
8265
8926
  setAttribute(_el$11, "src", vesselLogo);
8266
8927
  addEventListener(_el$13, "click", clearHistory, true);
@@ -8282,20 +8943,21 @@ ${contextBlock}` : contextBlock);
8282
8943
  _el$22.$$click = () => setSidebarTab("automation");
8283
8944
  _el$23.$$click = () => setSidebarTab("history");
8284
8945
  _el$24.$$click = () => setSidebarTab("diff");
8946
+ _el$25.$$click = () => setSidebarTab("research");
8285
8947
  use((el) => {
8286
8948
  messagesContainerRef = el;
8287
8949
  useScrollFade(el);
8288
- }, _el$25);
8289
- insert(_el$25, createComponent(Show, {
8950
+ }, _el$26);
8951
+ insert(_el$26, createComponent(Show, {
8290
8952
  get when() {
8291
8953
  return sidebarTab() === "supervisor";
8292
8954
  },
8293
8955
  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, {
8956
+ 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;
8957
+ _el$39.firstChild;
8958
+ insert(_el$31, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
8959
+ insert(_el$32, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
8960
+ insert(_el$33, createComponent(DropdownSelect, {
8299
8961
  "class": "agent-select",
8300
8962
  get value() {
8301
8963
  return runtimeState2().supervisor.approvalMode;
@@ -8305,23 +8967,23 @@ ${contextBlock}` : contextBlock);
8305
8967
  },
8306
8968
  ariaLabel: "Approval mode",
8307
8969
  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, {
8970
+ }), _el$34);
8971
+ _el$34.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
8972
+ insert(_el$34, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
8973
+ _el$35.$$click = () => void restoreSession();
8974
+ insert(_el$33, createComponent(Show, {
8313
8975
  get when() {
8314
8976
  return runtimeState2().canUndo;
8315
8977
  },
8316
8978
  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;
8979
+ var _el$36 = _tmpl$4$9();
8980
+ _el$36.$$click = () => void undoLastAction();
8981
+ createRenderEffect(() => setAttribute(_el$36, "title", runtimeState2().undoInfo ? `Undo: ${runtimeState2().undoInfo.actionName}` : "Undo last action"));
8982
+ return _el$36;
8321
8983
  }
8322
8984
  }), null);
8323
- insert(_el$36, approvalModeDescription);
8324
- insert(_el$26, createComponent(Show, {
8985
+ insert(_el$37, approvalModeDescription);
8986
+ insert(_el$27, createComponent(Show, {
8325
8987
  get when() {
8326
8988
  return runtimeState2().supervisor.pendingApprovals.length > 0;
8327
8989
  },
@@ -8334,32 +8996,32 @@ ${contextBlock}` : contextBlock);
8334
8996
  return runtimeState2().supervisor.pendingApprovals;
8335
8997
  },
8336
8998
  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;
8999
+ 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;
9000
+ insert(_el$145, () => approval.name);
9001
+ insert(_el$146, () => approval.argsSummary);
9002
+ insert(_el$147, () => approval.reason);
9003
+ _el$149.$$click = () => void resolveApproval(approval.id, true);
9004
+ _el$150.$$click = () => void resolveApproval(approval.id, false);
9005
+ return _el$143;
8344
9006
  })()
8345
9007
  })];
8346
9008
  }
8347
- }), _el$38);
8348
- insert(_el$38, createComponent(Show, {
9009
+ }), _el$39);
9010
+ insert(_el$39, createComponent(Show, {
8349
9011
  get when() {
8350
9012
  return recentActions().length > 0;
8351
9013
  },
8352
9014
  get children() {
8353
- var _el$40 = _tmpl$6$8();
8354
- _el$40.$$click = () => setActionsExpanded((current) => !current);
8355
- insert(_el$40, (() => {
9015
+ var _el$41 = _tmpl$6$8();
9016
+ _el$41.$$click = () => setActionsExpanded((current) => !current);
9017
+ insert(_el$41, (() => {
8356
9018
  var _c$ = memo(() => !!actionsExpanded());
8357
9019
  return () => _c$() ? "Hide history" : `Show history (${recentActions().length})`;
8358
9020
  })());
8359
- return _el$40;
9021
+ return _el$41;
8360
9022
  }
8361
9023
  }), null);
8362
- insert(_el$26, createComponent(Show, {
9024
+ insert(_el$27, createComponent(Show, {
8363
9025
  get when() {
8364
9026
  return recentActions().length > 0;
8365
9027
  },
@@ -8380,53 +9042,53 @@ ${contextBlock}` : contextBlock);
8380
9042
  return recentActions();
8381
9043
  },
8382
9044
  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, {
9045
+ 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;
9046
+ insert(_el$155, () => action.name);
9047
+ insert(_el$156, () => action.status);
9048
+ insert(_el$157, () => action.argsSummary);
9049
+ insert(_el$153, createComponent(Show, {
8388
9050
  get when() {
8389
9051
  return action.resultSummary;
8390
9052
  },
8391
9053
  get children() {
8392
- var _el$157 = _tmpl$34();
8393
- insert(_el$157, () => action.resultSummary);
8394
- return _el$157;
9054
+ var _el$158 = _tmpl$34();
9055
+ insert(_el$158, () => action.resultSummary);
9056
+ return _el$158;
8395
9057
  }
8396
9058
  }), null);
8397
- insert(_el$152, createComponent(Show, {
9059
+ insert(_el$153, createComponent(Show, {
8398
9060
  get when() {
8399
9061
  return action.error;
8400
9062
  },
8401
9063
  get children() {
8402
- var _el$158 = _tmpl$35();
8403
- insert(_el$158, () => action.error);
8404
- return _el$158;
9064
+ var _el$159 = _tmpl$35();
9065
+ insert(_el$159, () => action.error);
9066
+ return _el$159;
8405
9067
  }
8406
9068
  }), null);
8407
- createRenderEffect(() => className(_el$155, `agent-action-status ${action.status}`));
8408
- return _el$152;
9069
+ createRenderEffect(() => className(_el$156, `agent-action-status ${action.status}`));
9070
+ return _el$153;
8409
9071
  })()
8410
9072
  });
8411
9073
  }
8412
9074
  });
8413
9075
  }
8414
9076
  }), null);
8415
- createRenderEffect(() => _el$31.classList.toggle("paused", !!runtimeState2().supervisor.paused));
8416
- return _el$26;
9077
+ createRenderEffect(() => _el$32.classList.toggle("paused", !!runtimeState2().supervisor.paused));
9078
+ return _el$27;
8417
9079
  }
8418
- }), _el$124);
8419
- insert(_el$25, createComponent(Show, {
9080
+ }), _el$125);
9081
+ insert(_el$26, createComponent(Show, {
8420
9082
  get when() {
8421
9083
  return sidebarTab() === "bookmarks";
8422
9084
  },
8423
9085
  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, (() => {
9086
+ 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;
9087
+ insert(_el$46, (() => {
8426
9088
  var _c$2 = memo(() => !!normalizedBookmarkSearch());
8427
9089
  return () => _c$2() ? `${bookmarkMatchCount()} matches for "${bookmarkSearchQuery().trim()}"` : `${bookmarksState2().bookmarks.length} saved across ${bookmarkFolders().length} folders`;
8428
9090
  })());
8429
- insert(_el$42, createComponent(Show, {
9091
+ insert(_el$43, createComponent(Show, {
8430
9092
  get when() {
8431
9093
  return currentTabSaved();
8432
9094
  },
@@ -8434,61 +9096,61 @@ ${contextBlock}` : contextBlock);
8434
9096
  return _tmpl$8$5();
8435
9097
  }
8436
9098
  }), 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, {
9099
+ _el$48.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
9100
+ _el$52.$$click = () => void handleExportBookmarks("html");
9101
+ _el$53.$$click = () => void handleExportBookmarks("html-with-notes");
9102
+ _el$54.$$click = () => void handleExportBookmarks("json");
9103
+ insert(_el$49, createComponent(Show, {
8442
9104
  get when() {
8443
9105
  return bookmarkExportMessage();
8444
9106
  },
8445
9107
  get children() {
8446
- var _el$54 = _tmpl$9$3();
8447
- insert(_el$54, bookmarkExportMessage);
8448
- return _el$54;
9108
+ var _el$55 = _tmpl$9$3();
9109
+ insert(_el$55, bookmarkExportMessage);
9110
+ return _el$55;
8449
9111
  }
8450
9112
  }), null);
8451
- _el$56.$$click = () => setBookmarkImportExpanded((current) => !current);
8452
- insert(_el$55, createComponent(Show, {
9113
+ _el$57.$$click = () => setBookmarkImportExpanded((current) => !current);
9114
+ insert(_el$56, createComponent(Show, {
8453
9115
  get when() {
8454
9116
  return bookmarkImportExpanded();
8455
9117
  },
8456
9118
  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, {
9119
+ var _el$60 = _tmpl$0$3(), _el$61 = _el$60.firstChild, _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling;
9120
+ _el$62.$$click = () => void handleImportBookmarks("html");
9121
+ _el$63.$$click = () => void handleImportBookmarks("json");
9122
+ insert(_el$60, createComponent(Show, {
8461
9123
  get when() {
8462
9124
  return bookmarkImportMessage();
8463
9125
  },
8464
9126
  get children() {
8465
- var _el$63 = _tmpl$9$3();
8466
- insert(_el$63, bookmarkImportMessage);
8467
- return _el$63;
9127
+ var _el$64 = _tmpl$9$3();
9128
+ insert(_el$64, bookmarkImportMessage);
9129
+ return _el$64;
8468
9130
  }
8469
9131
  }), null);
8470
9132
  createRenderEffect((_p$) => {
8471
9133
  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);
9134
+ _v$ !== _p$.e && (_el$62.disabled = _p$.e = _v$);
9135
+ _v$2 !== _p$.t && (_el$63.disabled = _p$.t = _v$2);
8474
9136
  return _p$;
8475
9137
  }, {
8476
9138
  e: void 0,
8477
9139
  t: void 0
8478
9140
  });
8479
- return _el$59;
9141
+ return _el$60;
8480
9142
  }
8481
9143
  }), null);
8482
- _el$65.$$click = () => setBookmarkSaveExpanded((current) => !current);
8483
- insert(_el$64, createComponent(Show, {
9144
+ _el$66.$$click = () => setBookmarkSaveExpanded((current) => !current);
9145
+ insert(_el$65, createComponent(Show, {
8484
9146
  get when() {
8485
9147
  return bookmarkSaveExpanded();
8486
9148
  },
8487
9149
  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, {
9150
+ 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;
9151
+ insert(_el$70, () => currentTab()?.title || "No active page");
9152
+ insert(_el$71, () => currentTab()?.url || "Open a page to save it here.");
9153
+ insert(_el$72, createComponent(DropdownSelect, {
8492
9154
  "class": "bookmark-select",
8493
9155
  get value() {
8494
9156
  return selectedFolderId();
@@ -8498,37 +9160,37 @@ ${contextBlock}` : contextBlock);
8498
9160
  },
8499
9161
  ariaLabel: "Bookmark folder",
8500
9162
  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;
9163
+ }), _el$73);
9164
+ _el$73.$$click = () => void handleSaveBookmark();
9165
+ _el$74.$$input = (e) => setBookmarkNote(e.currentTarget.value);
9166
+ _el$75.$$input = (e) => setBookmarkIntent(e.currentTarget.value);
9167
+ _el$76.$$input = (e) => setBookmarkExpectedContent(e.currentTarget.value);
9168
+ _el$77.$$input = (e) => setBookmarkKeyFields(e.currentTarget.value);
9169
+ _el$78.$$input = (e) => setBookmarkAgentHints(e.currentTarget.value);
9170
+ createRenderEffect(() => _el$73.disabled = !currentTab()?.url);
9171
+ createRenderEffect(() => _el$74.value = bookmarkNote());
9172
+ createRenderEffect(() => _el$75.value = bookmarkIntent());
9173
+ createRenderEffect(() => _el$76.value = bookmarkExpectedContent());
9174
+ createRenderEffect(() => _el$77.value = bookmarkKeyFields());
9175
+ createRenderEffect(() => _el$78.value = bookmarkAgentHints());
9176
+ return _el$69;
8515
9177
  }
8516
9178
  }), 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, {
9179
+ _el$79.addEventListener("submit", handleCreateFolder);
9180
+ _el$81.$$input = (e) => setNewFolderName(e.currentTarget.value);
9181
+ _el$82.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
9182
+ insert(_el$84, createComponent(Show, {
8521
9183
  get when() {
8522
9184
  return filteredGroupedBookmarks().length > 0;
8523
9185
  },
8524
9186
  get fallback() {
8525
9187
  return (() => {
8526
- var _el$159 = _tmpl$37();
8527
- insert(_el$159, (() => {
9188
+ var _el$160 = _tmpl$37();
9189
+ insert(_el$160, (() => {
8528
9190
  var _c$5 = memo(() => !!normalizedBookmarkSearch());
8529
9191
  return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
8530
9192
  })());
8531
- return _el$159;
9193
+ return _el$160;
8532
9194
  })();
8533
9195
  },
8534
9196
  get children() {
@@ -8537,100 +9199,100 @@ ${contextBlock}` : contextBlock);
8537
9199
  return filteredGroupedBookmarks();
8538
9200
  },
8539
9201
  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) => {
9202
+ 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;
9203
+ _el$162.$$keydown = (e) => {
8542
9204
  if (e.key === "Enter" || e.key === " ") {
8543
9205
  e.preventDefault();
8544
9206
  toggleFolderExpanded(folder.id);
8545
9207
  }
8546
9208
  };
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, {
9209
+ _el$162.$$click = () => toggleFolderExpanded(folder.id);
9210
+ insert(_el$166, () => folder.name);
9211
+ insert(_el$167, () => folder.items.length, _el$168);
9212
+ insert(_el$165, createComponent(Show, {
8551
9213
  get when() {
8552
9214
  return folder.summary;
8553
9215
  },
8554
9216
  get children() {
8555
- var _el$168 = _tmpl$38();
8556
- insert(_el$168, () => folder.summary);
8557
- return _el$168;
9217
+ var _el$169 = _tmpl$38();
9218
+ insert(_el$169, () => folder.summary);
9219
+ return _el$169;
8558
9220
  }
8559
9221
  }), null);
8560
- insert(_el$161, createComponent(Show, {
9222
+ insert(_el$162, createComponent(Show, {
8561
9223
  get when() {
8562
9224
  return folder.id !== UNSORTED_FOLDER.id;
8563
9225
  },
8564
9226
  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) => {
9227
+ var _el$170 = _tmpl$39(), _el$171 = _el$170.firstChild, _el$172 = _el$171.nextSibling, _el$173 = _el$172.nextSibling;
9228
+ _el$171.$$click = (e) => {
8567
9229
  e.stopPropagation();
8568
9230
  setEditingFolderId(folder.id);
8569
9231
  setEditingFolderName(folder.name);
8570
9232
  setEditingFolderSummary(folder.summary || "");
8571
9233
  };
8572
- _el$171.$$click = (e) => {
9234
+ _el$172.$$click = (e) => {
8573
9235
  e.stopPropagation();
8574
9236
  void handleExportFolder(folder.id, folder.name);
8575
9237
  };
8576
- _el$172.$$click = (e) => {
9238
+ _el$173.$$click = (e) => {
8577
9239
  e.stopPropagation();
8578
9240
  setDeletingFolderId(folder.id);
8579
9241
  };
8580
- createRenderEffect(() => _el$171.disabled = bookmarkExporting());
8581
- return _el$169;
9242
+ createRenderEffect(() => _el$172.disabled = bookmarkExporting());
9243
+ return _el$170;
8582
9244
  }
8583
9245
  }), null);
8584
- insert(_el$160, createComponent(Show, {
9246
+ insert(_el$161, createComponent(Show, {
8585
9247
  get when() {
8586
9248
  return deletingFolderId() === folder.id;
8587
9249
  },
8588
9250
  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, (() => {
9251
+ var _el$174 = _tmpl$41(), _el$175 = _el$174.firstChild, _el$176 = _el$175.firstChild, _el$178 = _el$176.nextSibling;
9252
+ _el$178.nextSibling;
9253
+ var _el$179 = _el$175.nextSibling, _el$181 = _el$179.firstChild, _el$182 = _el$181.nextSibling;
9254
+ insert(_el$175, () => folder.name, _el$178);
9255
+ insert(_el$175, (() => {
8594
9256
  var _c$6 = memo(() => folder.items.length > 0);
8595
9257
  return () => _c$6() ? ` This folder has ${folder.items.length} bookmark${folder.items.length === 1 ? "" : "s"}.` : "";
8596
9258
  })(), null);
8597
- insert(_el$178, createComponent(Show, {
9259
+ insert(_el$179, createComponent(Show, {
8598
9260
  get when() {
8599
9261
  return folder.items.length > 0;
8600
9262
  },
8601
9263
  get children() {
8602
- var _el$179 = _tmpl$40();
8603
- _el$179.$$click = () => void handleRemoveFolder(folder.id, false);
8604
- return _el$179;
9264
+ var _el$180 = _tmpl$40();
9265
+ _el$180.$$click = () => void handleRemoveFolder(folder.id, false);
9266
+ return _el$180;
8605
9267
  }
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;
9268
+ }), _el$181);
9269
+ _el$181.$$click = () => void handleRemoveFolder(folder.id, true);
9270
+ insert(_el$181, () => folder.items.length > 0 ? "Delete all" : "Delete folder");
9271
+ _el$182.$$click = () => setDeletingFolderId(null);
9272
+ return _el$174;
8611
9273
  }
8612
9274
  }), null);
8613
- insert(_el$160, createComponent(Show, {
9275
+ insert(_el$161, createComponent(Show, {
8614
9276
  get when() {
8615
9277
  return editingFolderId() === folder.id;
8616
9278
  },
8617
9279
  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 = () => {
9280
+ 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;
9281
+ _el$185.$$input = (e) => setEditingFolderName(e.currentTarget.value);
9282
+ _el$186.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
9283
+ _el$187.$$click = () => void handleRenameFolder(folder.id);
9284
+ _el$188.$$click = () => {
8623
9285
  setEditingFolderId(null);
8624
9286
  setEditingFolderName("");
8625
9287
  setEditingFolderSummary("");
8626
9288
  };
8627
- createRenderEffect(() => _el$186.disabled = !editingFolderName().trim());
8628
- createRenderEffect(() => _el$184.value = editingFolderName());
8629
- createRenderEffect(() => _el$185.value = editingFolderSummary());
8630
- return _el$182;
9289
+ createRenderEffect(() => _el$187.disabled = !editingFolderName().trim());
9290
+ createRenderEffect(() => _el$185.value = editingFolderName());
9291
+ createRenderEffect(() => _el$186.value = editingFolderSummary());
9292
+ return _el$183;
8631
9293
  }
8632
9294
  }), null);
8633
- insert(_el$160, createComponent(Show, {
9295
+ insert(_el$161, createComponent(Show, {
8634
9296
  get when() {
8635
9297
  return isFolderExpanded(folder.id);
8636
9298
  },
@@ -8646,134 +9308,134 @@ ${contextBlock}` : contextBlock);
8646
9308
  return _tmpl$46();
8647
9309
  },
8648
9310
  get children() {
8649
- var _el$188 = _tmpl$43();
8650
- insert(_el$188, createComponent(For, {
9311
+ var _el$189 = _tmpl$43();
9312
+ insert(_el$189, createComponent(For, {
8651
9313
  get each() {
8652
9314
  return folder.items;
8653
9315
  },
8654
9316
  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, {
9317
+ 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;
9318
+ _el$193.$$click = () => void createTab(bookmark.url);
9319
+ insert(_el$194, () => bookmark.title || bookmark.url);
9320
+ insert(_el$195, () => bookmark.url);
9321
+ insert(_el$192, createComponent(Show, {
8660
9322
  get when() {
8661
9323
  return bookmark.note;
8662
9324
  },
8663
9325
  get children() {
8664
- var _el$195 = _tmpl$47();
8665
- insert(_el$195, () => bookmark.note);
8666
- return _el$195;
9326
+ var _el$196 = _tmpl$47();
9327
+ insert(_el$196, () => bookmark.note);
9328
+ return _el$196;
8667
9329
  }
8668
- }), _el$219);
8669
- insert(_el$191, createComponent(Show, {
9330
+ }), _el$220);
9331
+ insert(_el$192, createComponent(Show, {
8670
9332
  get when() {
8671
9333
  return bookmark.intent || bookmark.expectedContent || (bookmark.keyFields?.length || 0) > 0 || (bookmark.agentHints && Object.keys(bookmark.agentHints).length || 0) > 0;
8672
9334
  },
8673
9335
  get children() {
8674
- var _el$196 = _tmpl$47();
8675
- insert(_el$196, createComponent(Show, {
9336
+ var _el$197 = _tmpl$47();
9337
+ insert(_el$197, createComponent(Show, {
8676
9338
  get when() {
8677
9339
  return bookmark.intent;
8678
9340
  },
8679
9341
  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;
9342
+ var _el$198 = _tmpl$48(), _el$199 = _el$198.firstChild;
9343
+ _el$199.nextSibling;
9344
+ insert(_el$198, () => bookmark.intent, null);
9345
+ return _el$198;
8684
9346
  }
8685
9347
  }), null);
8686
- insert(_el$196, createComponent(Show, {
9348
+ insert(_el$197, createComponent(Show, {
8687
9349
  get when() {
8688
9350
  return bookmark.expectedContent;
8689
9351
  },
8690
9352
  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;
9353
+ var _el$201 = _tmpl$49(), _el$202 = _el$201.firstChild;
9354
+ _el$202.nextSibling;
9355
+ insert(_el$201, () => bookmark.expectedContent, null);
9356
+ return _el$201;
8695
9357
  }
8696
9358
  }), null);
8697
- insert(_el$196, createComponent(Show, {
9359
+ insert(_el$197, createComponent(Show, {
8698
9360
  get when() {
8699
9361
  return (bookmark.keyFields?.length || 0) > 0;
8700
9362
  },
8701
9363
  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;
9364
+ var _el$204 = _tmpl$50(), _el$205 = _el$204.firstChild;
9365
+ _el$205.nextSibling;
9366
+ insert(_el$204, () => bookmark.keyFields?.join(", "), null);
9367
+ return _el$204;
8706
9368
  }
8707
9369
  }), null);
8708
- insert(_el$196, createComponent(Show, {
9370
+ insert(_el$197, createComponent(Show, {
8709
9371
  get when() {
8710
9372
  return memo(() => !!bookmark.agentHints)() && Object.keys(bookmark.agentHints).length > 0;
8711
9373
  },
8712
9374
  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;
9375
+ var _el$207 = _tmpl$51(), _el$208 = _el$207.firstChild;
9376
+ _el$208.nextSibling;
9377
+ insert(_el$207, () => Object.entries(bookmark.agentHints || {}).map(([key, hint]) => `${key}: ${hint}`).join(" • "), null);
9378
+ return _el$207;
8717
9379
  }
8718
9380
  }), null);
8719
- return _el$196;
9381
+ return _el$197;
8720
9382
  }
8721
- }), _el$219);
8722
- insert(_el$191, createComponent(Show, {
9383
+ }), _el$220);
9384
+ insert(_el$192, createComponent(Show, {
8723
9385
  get when() {
8724
9386
  return editingBookmarkId() === bookmark.id;
8725
9387
  },
8726
9388
  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;
9389
+ 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;
9390
+ _el$211.$$input = (e) => setEditingBookmarkTitle(e.currentTarget.value);
9391
+ _el$212.$$input = (e) => setEditingBookmarkNote(e.currentTarget.value);
9392
+ _el$213.$$input = (e) => setEditingBookmarkIntent(e.currentTarget.value);
9393
+ _el$214.$$input = (e) => setEditingBookmarkExpectedContent(e.currentTarget.value);
9394
+ _el$215.$$input = (e) => setEditingBookmarkKeyFields(e.currentTarget.value);
9395
+ _el$216.$$input = (e) => setEditingBookmarkAgentHints(e.currentTarget.value);
9396
+ _el$218.$$click = () => void handleUpdateBookmark(bookmark.id);
9397
+ _el$219.$$click = resetBookmarkEditor;
9398
+ createRenderEffect(() => _el$211.value = editingBookmarkTitle());
9399
+ createRenderEffect(() => _el$212.value = editingBookmarkNote());
9400
+ createRenderEffect(() => _el$213.value = editingBookmarkIntent());
9401
+ createRenderEffect(() => _el$214.value = editingBookmarkExpectedContent());
9402
+ createRenderEffect(() => _el$215.value = editingBookmarkKeyFields());
9403
+ createRenderEffect(() => _el$216.value = editingBookmarkAgentHints());
9404
+ return _el$210;
8743
9405
  }
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 = () => {
9406
+ }), _el$220);
9407
+ insert(_el$221, () => formatBookmarkDate(bookmark.savedAt));
9408
+ _el$222.$$click = () => editingBookmarkId() === bookmark.id ? resetBookmarkEditor() : startEditingBookmark(bookmark);
9409
+ insert(_el$222, () => editingBookmarkId() === bookmark.id ? "Close" : "Edit");
9410
+ _el$223.$$click = () => {
8749
9411
  if (editingBookmarkId() === bookmark.id) {
8750
9412
  resetBookmarkEditor();
8751
9413
  }
8752
9414
  void removeBookmark(bookmark.id);
8753
9415
  };
8754
- createRenderEffect(() => setAttribute(_el$191, "data-bookmark-id", bookmark.id));
8755
- return _el$191;
9416
+ createRenderEffect(() => setAttribute(_el$192, "data-bookmark-id", bookmark.id));
9417
+ return _el$192;
8756
9418
  })()
8757
9419
  }));
8758
- return _el$188;
9420
+ return _el$189;
8759
9421
  }
8760
9422
  });
8761
9423
  }
8762
9424
  }), null);
8763
- createRenderEffect(() => _el$163.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
8764
- return _el$160;
9425
+ createRenderEffect(() => _el$164.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
9426
+ return _el$161;
8765
9427
  })()
8766
9428
  });
8767
9429
  }
8768
9430
  }));
8769
9431
  createRenderEffect((_p$) => {
8770
9432
  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);
9433
+ _v$3 !== _p$.e && (_el$52.disabled = _p$.e = _v$3);
9434
+ _v$4 !== _p$.t && (_el$53.disabled = _p$.t = _v$4);
9435
+ _v$5 !== _p$.a && (_el$54.disabled = _p$.a = _v$5);
9436
+ _v$6 !== _p$.o && _el$59.classList.toggle("expanded", _p$.o = _v$6);
9437
+ _v$7 !== _p$.i && _el$68.classList.toggle("expanded", _p$.i = _v$7);
9438
+ _v$8 !== _p$.n && (_el$83.disabled = _p$.n = _v$8);
8777
9439
  return _p$;
8778
9440
  }, {
8779
9441
  e: void 0,
@@ -8783,32 +9445,32 @@ ${contextBlock}` : contextBlock);
8783
9445
  i: void 0,
8784
9446
  n: void 0
8785
9447
  });
8786
- createRenderEffect(() => _el$47.value = bookmarkSearchQuery());
8787
- createRenderEffect(() => _el$80.value = newFolderName());
8788
- createRenderEffect(() => _el$81.value = newFolderSummary());
8789
- return _el$41;
9448
+ createRenderEffect(() => _el$48.value = bookmarkSearchQuery());
9449
+ createRenderEffect(() => _el$81.value = newFolderName());
9450
+ createRenderEffect(() => _el$82.value = newFolderSummary());
9451
+ return _el$42;
8790
9452
  }
8791
- }), _el$124);
8792
- insert(_el$25, createComponent(Show, {
9453
+ }), _el$125);
9454
+ insert(_el$26, createComponent(Show, {
8793
9455
  get when() {
8794
9456
  return sidebarTab() === "checkpoints";
8795
9457
  },
8796
9458
  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, (() => {
9459
+ 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;
9460
+ _el$91.nextSibling;
9461
+ insert(_el$89, (() => {
8800
9462
  var _c$3 = memo(() => recentCheckpoints().length > 0);
8801
9463
  return () => _c$3() ? `${recentCheckpoints().length} saved snapshots` : "Save and restore session snapshots";
8802
9464
  })());
8803
- _el$91.$$input = (e) => setCheckpointName(e.currentTarget.value);
8804
- _el$92.$$input = (e) => setCheckpointNote(e.currentTarget.value);
8805
- _el$93.$$click = async () => {
9465
+ _el$92.$$input = (e) => setCheckpointName(e.currentTarget.value);
9466
+ _el$93.$$input = (e) => setCheckpointNote(e.currentTarget.value);
9467
+ _el$94.$$click = async () => {
8806
9468
  const name = checkpointName().trim();
8807
9469
  await createCheckpoint(name || void 0, checkpointNote() || void 0);
8808
9470
  setCheckpointName("");
8809
9471
  setCheckpointNote("");
8810
9472
  };
8811
- insert(_el$89, createComponent(Show, {
9473
+ insert(_el$90, createComponent(Show, {
8812
9474
  get when() {
8813
9475
  return recentCheckpoints().length > 0;
8814
9476
  },
@@ -8816,14 +9478,14 @@ ${contextBlock}` : contextBlock);
8816
9478
  return _tmpl$54();
8817
9479
  },
8818
9480
  get children() {
8819
- var _el$95 = _tmpl$11$3();
8820
- insert(_el$95, createComponent(For, {
9481
+ var _el$96 = _tmpl$11$3();
9482
+ insert(_el$96, createComponent(For, {
8821
9483
  get each() {
8822
9484
  return recentCheckpoints();
8823
9485
  },
8824
9486
  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, {
9487
+ 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;
9488
+ insert(_el$226, createComponent(Show, {
8827
9489
  get when() {
8828
9490
  return i() < recentCheckpoints().length - 1;
8829
9491
  },
@@ -8831,24 +9493,24 @@ ${contextBlock}` : contextBlock);
8831
9493
  return _tmpl$55();
8832
9494
  }
8833
9495
  }), 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;
9496
+ insert(_el$230, () => checkpoint.name);
9497
+ insert(_el$231, () => new Date(checkpoint.createdAt).toLocaleString());
9498
+ _el$232.addEventListener("blur", (e) => void updateCheckpointNote(checkpoint.id, e.currentTarget.value));
9499
+ _el$233.$$click = () => void restoreCheckpoint(checkpoint.id);
9500
+ createRenderEffect(() => _el$227.classList.toggle("latest", !!(i() === 0)));
9501
+ createRenderEffect(() => _el$232.value = checkpoint.note || "");
9502
+ return _el$225;
8841
9503
  })()
8842
9504
  }));
8843
- return _el$95;
9505
+ return _el$96;
8844
9506
  }
8845
9507
  }), null);
8846
- createRenderEffect(() => _el$91.value = checkpointName());
8847
- createRenderEffect(() => _el$92.value = checkpointNote());
8848
- return _el$84;
9508
+ createRenderEffect(() => _el$92.value = checkpointName());
9509
+ createRenderEffect(() => _el$93.value = checkpointNote());
9510
+ return _el$85;
8849
9511
  }
8850
- }), _el$124);
8851
- insert(_el$25, createComponent(Show, {
9512
+ }), _el$125);
9513
+ insert(_el$26, createComponent(Show, {
8852
9514
  get when() {
8853
9515
  return sidebarTab() === "automation";
8854
9516
  },
@@ -8857,42 +9519,50 @@ ${contextBlock}` : contextBlock);
8857
9519
  onRun: () => setSidebarTab("supervisor")
8858
9520
  });
8859
9521
  }
8860
- }), _el$124);
8861
- insert(_el$25, createComponent(Show, {
9522
+ }), _el$125);
9523
+ insert(_el$26, createComponent(Show, {
9524
+ get when() {
9525
+ return sidebarTab() === "research";
9526
+ },
9527
+ get children() {
9528
+ return createComponent(ResearchDesk, {});
9529
+ }
9530
+ }), _el$125);
9531
+ insert(_el$26, createComponent(Show, {
8862
9532
  get when() {
8863
9533
  return sidebarTab() === "history";
8864
9534
  },
8865
9535
  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 () => {
9536
+ 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;
9537
+ _el$101.$$click = async () => {
8868
9538
  await history.clear();
8869
9539
  };
8870
- _el$101.$$click = async () => {
9540
+ _el$102.$$click = async () => {
8871
9541
  const result = await window.vessel.history.exportHtml();
8872
9542
  if (!result) return;
8873
9543
  };
8874
- _el$102.$$click = async () => {
9544
+ _el$103.$$click = async () => {
8875
9545
  const result = await window.vessel.history.exportJson();
8876
9546
  if (!result) return;
8877
9547
  };
8878
- _el$103.$$click = async () => {
9548
+ _el$104.$$click = async () => {
8879
9549
  const result = await window.vessel.history.importFile();
8880
9550
  if (!result) return;
8881
9551
  };
8882
- insert(_el$104, createComponent(For, {
9552
+ insert(_el$105, createComponent(For, {
8883
9553
  get each() {
8884
9554
  return history.historyState().entries;
8885
9555
  },
8886
9556
  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;
9557
+ var _el$234 = _tmpl$57(), _el$235 = _el$234.firstChild, _el$236 = _el$235.nextSibling, _el$237 = _el$236.nextSibling;
9558
+ _el$234.$$click = () => createTab(entry.url);
9559
+ insert(_el$235, () => entry.title || entry.url);
9560
+ insert(_el$236, () => entry.url);
9561
+ insert(_el$237, () => new Date(entry.visitedAt).toLocaleString());
9562
+ return _el$234;
8893
9563
  })()
8894
9564
  }), null);
8895
- insert(_el$104, createComponent(Show, {
9565
+ insert(_el$105, createComponent(Show, {
8896
9566
  get when() {
8897
9567
  return history.historyState().entries.length === 0;
8898
9568
  },
@@ -8900,37 +9570,37 @@ ${contextBlock}` : contextBlock);
8900
9570
  return _tmpl$13$2();
8901
9571
  }
8902
9572
  }), null);
8903
- return _el$96;
9573
+ return _el$97;
8904
9574
  }
8905
- }), _el$124);
8906
- insert(_el$25, createComponent(Show, {
9575
+ }), _el$125);
9576
+ insert(_el$26, createComponent(Show, {
8907
9577
  get when() {
8908
9578
  return sidebarTab() === "diff";
8909
9579
  },
8910
9580
  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, {
9581
+ var _el$107 = _tmpl$15$2(), _el$108 = _el$107.firstChild, _el$109 = _el$108.firstChild, _el$110 = _el$109.nextSibling;
9582
+ insert(_el$110, () => isPremium() ? "Page change timeline" : "Premium feature");
9583
+ insert(_el$107, createComponent(Show, {
8914
9584
  get when() {
8915
9585
  return isPremium();
8916
9586
  },
8917
9587
  get fallback() {
8918
9588
  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(() => {
9589
+ 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;
9590
+ _el$242.$$click = () => void window.vessel.premium.checkout(premiumState().email || void 0).catch(() => {
8921
9591
  });
8922
- _el$242.$$click = openPremiumDetails;
8923
- return _el$237;
9592
+ _el$243.$$click = openPremiumDetails;
9593
+ return _el$238;
8924
9594
  })();
8925
9595
  },
8926
9596
  get children() {
8927
9597
  return createComponent(PageDiffTimeline, {});
8928
9598
  }
8929
9599
  }), null);
8930
- return _el$106;
9600
+ return _el$107;
8931
9601
  }
8932
- }), _el$124);
8933
- insert(_el$25, createComponent(Show, {
9602
+ }), _el$125);
9603
+ insert(_el$26, createComponent(Show, {
8934
9604
  get when() {
8935
9605
  return sidebarTab() === "chat";
8936
9606
  },
@@ -8940,23 +9610,23 @@ ${contextBlock}` : contextBlock);
8940
9610
  return !isPremium();
8941
9611
  },
8942
9612
  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;
9613
+ 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;
9614
+ _el$115.$$click = () => openPremiumCheckout("chat_banner_clicked");
9615
+ _el$116.$$click = openPremiumDetails;
9616
+ return _el$111;
8947
9617
  }
8948
9618
  }), createComponent(For, {
8949
9619
  get each() {
8950
9620
  return messages2();
8951
9621
  },
8952
9622
  children: (msg) => (() => {
8953
- var _el$243 = _tmpl$59();
8954
- insert(_el$243, createComponent(MarkdownMessage, {
9623
+ var _el$244 = _tmpl$59();
9624
+ insert(_el$244, createComponent(MarkdownMessage, {
8955
9625
  get content() {
8956
9626
  return msg.content;
8957
9627
  }
8958
9628
  }), null);
8959
- insert(_el$243, createComponent(Show, {
9629
+ insert(_el$244, createComponent(Show, {
8960
9630
  get when() {
8961
9631
  return memo(() => msg.role === "assistant")() ? getPremiumPromptKind(msg.content) : null;
8962
9632
  },
@@ -8969,16 +9639,16 @@ ${contextBlock}` : contextBlock);
8969
9639
  onOpenSettings: openPremiumDetails
8970
9640
  })
8971
9641
  }), null);
8972
- createRenderEffect(() => className(_el$243, `message message-${msg.role}`));
8973
- return _el$243;
9642
+ createRenderEffect(() => className(_el$244, `message message-${msg.role}`));
9643
+ return _el$244;
8974
9644
  })()
8975
9645
  }), createComponent(Show, {
8976
9646
  get when() {
8977
9647
  return isStreaming2();
8978
9648
  },
8979
9649
  get children() {
8980
- var _el$116 = _tmpl$19$1(), _el$117 = _el$116.firstChild;
8981
- insert(_el$117, createComponent(Show, {
9650
+ var _el$117 = _tmpl$19$1(), _el$118 = _el$117.firstChild;
9651
+ insert(_el$118, createComponent(Show, {
8982
9652
  get when() {
8983
9653
  return hasFirstChunk2();
8984
9654
  },
@@ -8986,14 +9656,14 @@ ${contextBlock}` : contextBlock);
8986
9656
  return _tmpl$60();
8987
9657
  },
8988
9658
  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, {
9659
+ var _el$119 = _tmpl$18$1(), _el$120 = _el$119.firstChild, _el$121 = _el$120.firstChild;
9660
+ _el$121.nextSibling;
9661
+ insert(_el$119, createComponent(MarkdownMessage, {
8992
9662
  get content() {
8993
9663
  return streamingText2();
8994
9664
  }
8995
- }), _el$119);
8996
- insert(_el$118, createComponent(Show, {
9665
+ }), _el$120);
9666
+ insert(_el$119, createComponent(Show, {
8997
9667
  get when() {
8998
9668
  return getPremiumPromptKind(streamingText2());
8999
9669
  },
@@ -9005,21 +9675,21 @@ ${contextBlock}` : contextBlock);
9005
9675
  onStartTrial: () => openPremiumCheckout(kind() === "premium_gate" ? "premium_gate_clicked" : "iteration_limit_clicked"),
9006
9676
  onOpenSettings: openPremiumDetails
9007
9677
  })
9008
- }), _el$119);
9009
- insert(_el$119, createComponent(Show, {
9678
+ }), _el$120);
9679
+ insert(_el$120, createComponent(Show, {
9010
9680
  get when() {
9011
9681
  return elapsedSeconds() > 0;
9012
9682
  },
9013
9683
  get children() {
9014
- var _el$122 = _tmpl$17$1();
9015
- insert(_el$122, () => ` • ${elapsedSeconds()}s`);
9016
- return _el$122;
9684
+ var _el$123 = _tmpl$17$1();
9685
+ insert(_el$123, () => ` • ${elapsedSeconds()}s`);
9686
+ return _el$123;
9017
9687
  }
9018
9688
  }), null);
9019
- return _el$118;
9689
+ return _el$119;
9020
9690
  }
9021
9691
  }));
9022
- return _el$116;
9692
+ return _el$117;
9023
9693
  }
9024
9694
  }), createComponent(Show, {
9025
9695
  get when() {
@@ -9031,22 +9701,22 @@ ${contextBlock}` : contextBlock);
9031
9701
  return runtimeState2().supervisor.pendingApprovals;
9032
9702
  },
9033
9703
  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, {
9704
+ 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;
9705
+ insert(_el$251, () => approval.name);
9706
+ insert(_el$248, createComponent(Show, {
9037
9707
  get when() {
9038
9708
  return approval.argsSummary;
9039
9709
  },
9040
9710
  get children() {
9041
- var _el$251 = _tmpl$61();
9042
- insert(_el$251, () => approval.argsSummary);
9043
- return _el$251;
9711
+ var _el$252 = _tmpl$61();
9712
+ insert(_el$252, () => approval.argsSummary);
9713
+ return _el$252;
9044
9714
  }
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;
9715
+ }), _el$253);
9716
+ insert(_el$253, () => approval.reason);
9717
+ _el$255.$$click = () => void resolveApproval(approval.id, true);
9718
+ _el$256.$$click = () => void resolveApproval(approval.id, false);
9719
+ return _el$246;
9050
9720
  })()
9051
9721
  });
9052
9722
  }
@@ -9059,9 +9729,9 @@ ${contextBlock}` : contextBlock);
9059
9729
  }
9060
9730
  })];
9061
9731
  }
9062
- }), _el$124);
9732
+ }), _el$125);
9063
9733
  var _ref$ = messagesEndRef;
9064
- typeof _ref$ === "function" ? use(_ref$, _el$124) : messagesEndRef = _el$124;
9734
+ typeof _ref$ === "function" ? use(_ref$, _el$125) : messagesEndRef = _el$125;
9065
9735
  insert(_el$9, createComponent(Show, {
9066
9736
  get when() {
9067
9737
  return sidebarTab() === "chat";
@@ -9072,125 +9742,125 @@ ${contextBlock}` : contextBlock);
9072
9742
  return isStreaming2() || messages2().length > 0;
9073
9743
  },
9074
9744
  get children() {
9075
- var _el$125 = _tmpl$23$1();
9076
- insert(_el$125, createComponent(Show, {
9745
+ var _el$126 = _tmpl$23$1();
9746
+ insert(_el$126, createComponent(Show, {
9077
9747
  get when() {
9078
9748
  return isStreaming2();
9079
9749
  },
9080
9750
  get children() {
9081
- var _el$126 = _tmpl$21$1();
9082
- _el$126.$$click = () => cancel();
9083
- return _el$126;
9751
+ var _el$127 = _tmpl$21$1();
9752
+ _el$127.$$click = () => cancel();
9753
+ return _el$127;
9084
9754
  }
9085
9755
  }), null);
9086
- insert(_el$125, createComponent(Show, {
9756
+ insert(_el$126, createComponent(Show, {
9087
9757
  get when() {
9088
9758
  return memo(() => !!!isStreaming2())() && messages2().length > 0;
9089
9759
  },
9090
9760
  get children() {
9091
- var _el$127 = _tmpl$22$1();
9092
- _el$127.$$click = handleRetry;
9093
- return _el$127;
9761
+ var _el$128 = _tmpl$22$1();
9762
+ _el$128.$$click = handleRetry;
9763
+ return _el$128;
9094
9764
  }
9095
9765
  }), null);
9096
- return _el$125;
9766
+ return _el$126;
9097
9767
  }
9098
9768
  }), createComponent(Show, {
9099
9769
  get when() {
9100
9770
  return highlightCount() > 0;
9101
9771
  },
9102
9772
  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, (() => {
9773
+ var _el$129 = _tmpl$24$1(), _el$130 = _el$129.firstChild, _el$131 = _el$130.nextSibling;
9774
+ _el$131.firstChild;
9775
+ var _el$133 = _el$131.nextSibling;
9776
+ _el$130.$$click = () => void scrollToHighlight(highlightIndex() - 1);
9777
+ _el$131.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
9778
+ insert(_el$131, (() => {
9109
9779
  var _c$4 = memo(() => highlightIndex() >= 0);
9110
9780
  return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
9111
9781
  })(), null);
9112
- _el$132.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
9782
+ _el$133.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
9113
9783
  createRenderEffect((_p$) => {
9114
9784
  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);
9785
+ _v$9 !== _p$.e && (_el$130.disabled = _p$.e = _v$9);
9786
+ _v$0 !== _p$.t && (_el$133.disabled = _p$.t = _v$0);
9117
9787
  return _p$;
9118
9788
  }, {
9119
9789
  e: void 0,
9120
9790
  t: void 0
9121
9791
  });
9122
- return _el$128;
9792
+ return _el$129;
9123
9793
  }
9124
9794
  }), createComponent(Show, {
9125
9795
  get when() {
9126
9796
  return queueNotice2() !== null || pendingQueryCount() > 0;
9127
9797
  },
9128
9798
  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, {
9799
+ var _el$134 = _tmpl$27$1(), _el$135 = _el$134.firstChild, _el$136 = _el$135.firstChild;
9800
+ insert(_el$136, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
9801
+ insert(_el$135, createComponent(Show, {
9132
9802
  get when() {
9133
9803
  return pendingQueryCount() > 0;
9134
9804
  },
9135
9805
  get children() {
9136
- var _el$136 = _tmpl$25$1();
9137
- _el$136.$$click = () => clearPendingQueries();
9138
- return _el$136;
9806
+ var _el$137 = _tmpl$25$1();
9807
+ _el$137.$$click = () => clearPendingQueries();
9808
+ return _el$137;
9139
9809
  }
9140
9810
  }), null);
9141
- insert(_el$133, createComponent(Show, {
9811
+ insert(_el$134, createComponent(Show, {
9142
9812
  get when() {
9143
9813
  return pendingQueries2().length > 0;
9144
9814
  },
9145
9815
  get children() {
9146
- var _el$137 = _tmpl$26$1();
9147
- insert(_el$137, createComponent(For, {
9816
+ var _el$138 = _tmpl$26$1();
9817
+ insert(_el$138, createComponent(For, {
9148
9818
  get each() {
9149
9819
  return pendingQueries2();
9150
9820
  },
9151
9821
  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;
9822
+ var _el$257 = _tmpl$63(), _el$258 = _el$257.firstChild, _el$259 = _el$258.nextSibling;
9823
+ setAttribute(_el$258, "title", pendingPrompt);
9824
+ insert(_el$258, pendingPrompt);
9825
+ _el$259.$$click = () => removePendingQuery(index());
9826
+ createRenderEffect(() => setAttribute(_el$259, "aria-label", `Remove queued prompt ${index() + 1}`));
9827
+ return _el$257;
9158
9828
  })()
9159
9829
  }));
9160
- return _el$137;
9830
+ return _el$138;
9161
9831
  }
9162
9832
  }), null);
9163
- return _el$133;
9833
+ return _el$134;
9164
9834
  }
9165
9835
  }), (() => {
9166
- var _el$138 = _tmpl$28$1(), _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling;
9167
- _el$139.$$keydown = (e) => {
9836
+ var _el$139 = _tmpl$28$1(), _el$140 = _el$139.firstChild, _el$141 = _el$140.nextSibling;
9837
+ _el$140.$$keydown = (e) => {
9168
9838
  if (e.key === "Enter" && !e.shiftKey) {
9169
9839
  e.preventDefault();
9170
9840
  void handleChatSend();
9171
9841
  }
9172
9842
  };
9173
- _el$139.$$input = (e) => setChatInput(e.currentTarget.value);
9843
+ _el$140.$$input = (e) => setChatInput(e.currentTarget.value);
9174
9844
  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");
9845
+ typeof _ref$2 === "function" ? use(_ref$2, _el$140) : chatInputRef = _el$140;
9846
+ _el$141.$$click = () => void handleChatSend();
9847
+ insert(_el$141, () => isStreaming2() ? "Queue" : "Send");
9178
9848
  createRenderEffect((_p$) => {
9179
9849
  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);
9850
+ _v$1 !== _p$.e && setAttribute(_el$140, "placeholder", _p$.e = _v$1);
9851
+ _v$10 !== _p$.t && (_el$141.disabled = _p$.t = _v$10);
9182
9852
  return _p$;
9183
9853
  }, {
9184
9854
  e: void 0,
9185
9855
  t: void 0
9186
9856
  });
9187
- createRenderEffect(() => _el$139.value = chatInput());
9188
- return _el$138;
9857
+ createRenderEffect(() => _el$140.value = chatInput());
9858
+ return _el$139;
9189
9859
  })()];
9190
9860
  }
9191
9861
  }), null);
9192
9862
  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";
9863
+ 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
9864
  _v$11 !== _p$.e && setStyleProperty(_el$9, "width", _p$.e = _v$11);
9195
9865
  _v$12 !== _p$.t && _el$0.classList.toggle("dragging", _p$.t = _v$12);
9196
9866
  _v$13 !== _p$.a && _el$16.classList.toggle("active", _p$.a = _v$13);
@@ -9207,6 +9877,8 @@ ${contextBlock}` : contextBlock);
9207
9877
  _v$24 !== _p$.w && setAttribute(_el$23, "aria-selected", _p$.w = _v$24);
9208
9878
  _v$25 !== _p$.m && _el$24.classList.toggle("active", _p$.m = _v$25);
9209
9879
  _v$26 !== _p$.f && setAttribute(_el$24, "aria-selected", _p$.f = _v$26);
9880
+ _v$27 !== _p$.y && _el$25.classList.toggle("active", _p$.y = _v$27);
9881
+ _v$28 !== _p$.g && setAttribute(_el$25, "aria-selected", _p$.g = _v$28);
9210
9882
  return _p$;
9211
9883
  }, {
9212
9884
  e: void 0,
@@ -9224,7 +9896,9 @@ ${contextBlock}` : contextBlock);
9224
9896
  c: void 0,
9225
9897
  w: void 0,
9226
9898
  m: void 0,
9227
- f: void 0
9899
+ f: void 0,
9900
+ y: void 0,
9901
+ g: void 0
9228
9902
  });
9229
9903
  return _el$9;
9230
9904
  }
@@ -9454,10 +10128,10 @@ const DevToolsPanel = () => {
9454
10128
  let exportBtnRef;
9455
10129
  let exportDropdownRef;
9456
10130
  createEffect(() => {
9457
- const cleanup = window.vessel.devtoolsPanel.onStateUpdate((newState) => {
10131
+ const cleanup2 = window.vessel.devtoolsPanel.onStateUpdate((newState) => {
9458
10132
  setState(newState);
9459
10133
  });
9460
- onCleanup(cleanup);
10134
+ onCleanup(cleanup2);
9461
10135
  });
9462
10136
  createEffect(() => {
9463
10137
  if (!showExport()) return;