@quanta-intellect/vessel-browser 0.1.11 → 0.1.12
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.
- package/README.md +6 -3
- package/out/main/index.js +2214 -431
- package/out/preload/content-script.js +61 -17
- package/out/preload/index.js +20 -0
- package/out/renderer/assets/{index-DOCQcMR5.css → index-DMd-y6tm.css} +95 -0
- package/out/renderer/assets/{index-BUYEjb3N.js → index-Do3B3G1W.js} +234 -122
- package/out/renderer/index.html +2 -2
- package/package.json +1 -1
|
@@ -1018,6 +1018,14 @@ const MIN_SIDEBAR = 240;
|
|
|
1018
1018
|
const MAX_SIDEBAR = 800;
|
|
1019
1019
|
const [sidebarOpen, setSidebarOpen] = createSignal(false);
|
|
1020
1020
|
const [sidebarWidth, setSidebarWidth] = createSignal(DEFAULT_SIDEBAR_WIDTH);
|
|
1021
|
+
window.vessel?.settings?.get().then((settings) => {
|
|
1022
|
+
if (settings?.sidebarWidth && typeof settings.sidebarWidth === "number") {
|
|
1023
|
+
setSidebarWidth(
|
|
1024
|
+
Math.max(MIN_SIDEBAR, Math.min(MAX_SIDEBAR, settings.sidebarWidth))
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
1027
|
+
}).catch(() => {
|
|
1028
|
+
});
|
|
1021
1029
|
const [focusMode, setFocusMode] = createSignal(false);
|
|
1022
1030
|
const [commandBarOpen, setCommandBarOpen] = createSignal(false);
|
|
1023
1031
|
const [settingsOpen, setSettingsOpen] = createSignal(false);
|
|
@@ -2683,10 +2691,17 @@ function renderBlock(block) {
|
|
|
2683
2691
|
if (codeMatch) {
|
|
2684
2692
|
return trimmed;
|
|
2685
2693
|
}
|
|
2686
|
-
const
|
|
2687
|
-
if (
|
|
2688
|
-
const level =
|
|
2689
|
-
return `<h${level}>${applyInlineMarkdown(
|
|
2694
|
+
const headingSingle = trimmed.match(/^(#{1,6})\s+(.+)$/);
|
|
2695
|
+
if (headingSingle) {
|
|
2696
|
+
const level = headingSingle[1].length;
|
|
2697
|
+
return `<h${level}>${applyInlineMarkdown(headingSingle[2].trim())}</h${level}>`;
|
|
2698
|
+
}
|
|
2699
|
+
const headingMulti = trimmed.match(/^(#{1,6})\s+(.+)\n([\s\S]+)$/);
|
|
2700
|
+
if (headingMulti) {
|
|
2701
|
+
const level = headingMulti[1].length;
|
|
2702
|
+
const headingHtml = `<h${level}>${applyInlineMarkdown(headingMulti[2].trim())}</h${level}>`;
|
|
2703
|
+
const rest = renderBlock(headingMulti[3]);
|
|
2704
|
+
return headingHtml + rest;
|
|
2690
2705
|
}
|
|
2691
2706
|
if (/^>\s?/m.test(trimmed) && trimmed.split("\n").every((line) => /^>\s?/.test(line))) {
|
|
2692
2707
|
const content = trimmed.split("\n").map((line) => line.replace(/^>\s?/, "")).join("\n");
|
|
@@ -2698,6 +2713,24 @@ function renderBlock(block) {
|
|
|
2698
2713
|
if (isTableBlock(trimmed)) {
|
|
2699
2714
|
return renderTable(trimmed);
|
|
2700
2715
|
}
|
|
2716
|
+
const lines = trimmed.split("\n");
|
|
2717
|
+
const tableStartIdx = lines.findIndex(
|
|
2718
|
+
(l, i) => l.trim().includes("|") && i + 1 < lines.length && /^\|?\s*[-:]+[-|\s:]*$/.test(lines[i + 1].trim())
|
|
2719
|
+
);
|
|
2720
|
+
if (tableStartIdx >= 0) {
|
|
2721
|
+
const beforeTable = lines.slice(0, tableStartIdx).join("\n").trim();
|
|
2722
|
+
const tableLines = lines.slice(tableStartIdx);
|
|
2723
|
+
const tableEndIdx = tableLines.findIndex(
|
|
2724
|
+
(l, i) => i > 1 && !l.trim().includes("|")
|
|
2725
|
+
);
|
|
2726
|
+
const tableBlock = tableEndIdx > 0 ? tableLines.slice(0, tableEndIdx).join("\n") : tableLines.join("\n");
|
|
2727
|
+
const afterTable = tableEndIdx > 0 ? tableLines.slice(tableEndIdx).join("\n").trim() : "";
|
|
2728
|
+
let result = "";
|
|
2729
|
+
if (beforeTable) result += `<p>${applyInlineMarkdown(beforeTable).replace(/\n/g, "<br>")}</p>`;
|
|
2730
|
+
result += renderTable(tableBlock);
|
|
2731
|
+
if (afterTable) result += `<p>${applyInlineMarkdown(afterTable).replace(/\n/g, "<br>")}</p>`;
|
|
2732
|
+
return result;
|
|
2733
|
+
}
|
|
2701
2734
|
if (trimmed.split("\n").every((line) => /^[-*+]\s+/.test(line))) {
|
|
2702
2735
|
return renderList(trimmed, false);
|
|
2703
2736
|
}
|
|
@@ -2876,7 +2909,7 @@ function getBookmarkSearchMatch(args) {
|
|
|
2876
2909
|
return { matchedFields, score };
|
|
2877
2910
|
}
|
|
2878
2911
|
const vesselLogo = "" + new URL("vessel-logo-transparent-IT25qr-Z.png", import.meta.url).href;
|
|
2879
|
-
var _tmpl$$3 = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=dropdown-select-menu role=listbox>`), _tmpl$3$2 = /* @__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$4$2 = /* @__PURE__ */ template(`<span class=dropdown-select-option-description>`), _tmpl$5$2 = /* @__PURE__ */ template(`<button class=dropdown-select-option type=button role=option><span class=dropdown-select-option-copy><span class=dropdown-select-option-label>`), _tmpl$6$2 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$7$2 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$8$2 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$9$2 = /* @__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$0$2 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$1$2 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2>`), _tmpl$10$2 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$11$2 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$12$2 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$13$1 = /* @__PURE__ */ template(`<span>`), _tmpl$14$1 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$15 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$16 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$17 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$18 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$19 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$20 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2 placeholder="Ask anything..."></textarea><button class=sidebar-send>Send`), _tmpl$21 = /* @__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></div><div class=sidebar-messages><div>`), _tmpl$22 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$23 = /* @__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$24 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$25 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$26 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$27 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$28 = /* @__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$29 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$30 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$31 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$32 = /* @__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$33 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$34 = /* @__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$35 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$36 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$37 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$38 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$39 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$40 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$41 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><button class=agent-control-button type=button>Restore`), _tmpl$42 = /* @__PURE__ */ template(`<div>`), _tmpl$43 = /* @__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$44 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$45 = /* @__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`);
|
|
2912
|
+
var _tmpl$$3 = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=dropdown-select-menu role=listbox>`), _tmpl$3$2 = /* @__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$4$2 = /* @__PURE__ */ template(`<span class=dropdown-select-option-description>`), _tmpl$5$2 = /* @__PURE__ */ template(`<button class=dropdown-select-option type=button role=option><span class=dropdown-select-option-copy><span class=dropdown-select-option-label>`), _tmpl$6$2 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$7$2 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$8$2 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$9$2 = /* @__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$0$2 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$1$2 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2>`), _tmpl$10$2 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$11$2 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$12$2 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$13$1 = /* @__PURE__ */ template(`<span>`), _tmpl$14$1 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$15 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$16 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$17 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$18 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$19 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$20 = /* @__PURE__ */ template(`<div class=highlight-nav><button class=highlight-nav-btn type=button title="Previous highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M8 10L4 6l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=highlight-nav-label type=button title="Go to current highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><circle cx=6 cy=6 r=3 fill="rgba(196, 160, 90, 0.6)"stroke="rgba(196, 160, 90, 0.9)"stroke-width=1></circle></svg></button><button class=highlight-nav-btn type=button title="Next highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M4 2l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$21 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2 placeholder="Ask anything..."></textarea><button class=sidebar-send>Send`), _tmpl$22 = /* @__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></div><div class=sidebar-messages><div>`), _tmpl$23 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$24 = /* @__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$25 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$26 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$27 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$28 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$29 = /* @__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$30 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$31 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$32 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$33 = /* @__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$34 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$35 = /* @__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$36 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$37 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$38 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$39 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$40 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$41 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$42 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><button class=agent-control-button type=button>Restore`), _tmpl$43 = /* @__PURE__ */ template(`<div>`), _tmpl$44 = /* @__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$45 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$46 = /* @__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`);
|
|
2880
2913
|
const UNSORTED_FOLDER = {
|
|
2881
2914
|
id: "unsorted",
|
|
2882
2915
|
name: "Unsorted",
|
|
@@ -3018,6 +3051,59 @@ const Sidebar = (props) => {
|
|
|
3018
3051
|
} = useBookmarks();
|
|
3019
3052
|
const [sidebarTab, setSidebarTab] = createSignal("supervisor");
|
|
3020
3053
|
const [chatInput, setChatInput] = createSignal("");
|
|
3054
|
+
const [highlightCount, setHighlightCount] = createSignal(0);
|
|
3055
|
+
const [highlightIndex, setHighlightIndex] = createSignal(-1);
|
|
3056
|
+
createEffect(() => {
|
|
3057
|
+
if (sidebarTab() !== "chat") return;
|
|
3058
|
+
const poll = async () => {
|
|
3059
|
+
try {
|
|
3060
|
+
const count = await window.vessel?.highlights?.getCount?.() ?? 0;
|
|
3061
|
+
setHighlightCount(count);
|
|
3062
|
+
if (count === 0 && highlightIndex() >= 0) setHighlightIndex(-1);
|
|
3063
|
+
} catch {
|
|
3064
|
+
}
|
|
3065
|
+
};
|
|
3066
|
+
void poll();
|
|
3067
|
+
const id = setInterval(poll, 2e3);
|
|
3068
|
+
onCleanup(() => clearInterval(id));
|
|
3069
|
+
});
|
|
3070
|
+
const scrollToHighlight = async (idx) => {
|
|
3071
|
+
const count = highlightCount();
|
|
3072
|
+
if (count === 0) return;
|
|
3073
|
+
const clamped = Math.max(0, Math.min(idx, count - 1));
|
|
3074
|
+
setHighlightIndex(clamped);
|
|
3075
|
+
await window.vessel?.highlights?.scrollTo?.(clamped);
|
|
3076
|
+
};
|
|
3077
|
+
const removeCurrentHighlight = async () => {
|
|
3078
|
+
const idx = highlightIndex();
|
|
3079
|
+
if (idx < 0) return;
|
|
3080
|
+
await window.vessel?.highlights?.remove?.(idx);
|
|
3081
|
+
const newCount = await window.vessel?.highlights?.getCount?.() ?? 0;
|
|
3082
|
+
setHighlightCount(newCount);
|
|
3083
|
+
if (newCount === 0) {
|
|
3084
|
+
setHighlightIndex(-1);
|
|
3085
|
+
} else if (idx >= newCount) {
|
|
3086
|
+
setHighlightIndex(newCount - 1);
|
|
3087
|
+
await window.vessel?.highlights?.scrollTo?.(newCount - 1);
|
|
3088
|
+
}
|
|
3089
|
+
};
|
|
3090
|
+
const clearAllHighlights = async () => {
|
|
3091
|
+
await window.vessel?.highlights?.clearAll?.();
|
|
3092
|
+
setHighlightCount(0);
|
|
3093
|
+
setHighlightIndex(-1);
|
|
3094
|
+
};
|
|
3095
|
+
createEffect(() => {
|
|
3096
|
+
const unsubscribe = window.vessel.highlights.onSidebarAction((action) => {
|
|
3097
|
+
if (action === "remove-current") {
|
|
3098
|
+
void removeCurrentHighlight();
|
|
3099
|
+
return;
|
|
3100
|
+
}
|
|
3101
|
+
if (action === "clear-all") {
|
|
3102
|
+
void clearAllHighlights();
|
|
3103
|
+
}
|
|
3104
|
+
});
|
|
3105
|
+
onCleanup(unsubscribe);
|
|
3106
|
+
});
|
|
3021
3107
|
const handleChatSend = async () => {
|
|
3022
3108
|
const prompt = chatInput().trim();
|
|
3023
3109
|
if (!prompt || isStreaming2()) return;
|
|
@@ -3225,7 +3311,7 @@ const Sidebar = (props) => {
|
|
|
3225
3311
|
return props.forceOpen || sidebarOpen2();
|
|
3226
3312
|
},
|
|
3227
3313
|
get children() {
|
|
3228
|
-
var _el$1 = _tmpl$
|
|
3314
|
+
var _el$1 = _tmpl$22(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$12.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$11.nextSibling, _el$18 = _el$17.firstChild;
|
|
3229
3315
|
_el$18.firstChild;
|
|
3230
3316
|
var _el$21 = _el$18.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$17.nextSibling, _el$81 = _el$24.firstChild;
|
|
3231
3317
|
_el$10.$$pointerdown = startResize;
|
|
@@ -3279,7 +3365,7 @@ const Sidebar = (props) => {
|
|
|
3279
3365
|
return runtimeState2().supervisor.pendingApprovals.length > 0;
|
|
3280
3366
|
},
|
|
3281
3367
|
get fallback() {
|
|
3282
|
-
return _tmpl$
|
|
3368
|
+
return _tmpl$23();
|
|
3283
3369
|
},
|
|
3284
3370
|
get children() {
|
|
3285
3371
|
return [_tmpl$7$2(), createComponent(For, {
|
|
@@ -3287,13 +3373,13 @@ const Sidebar = (props) => {
|
|
|
3287
3373
|
return runtimeState2().supervisor.pendingApprovals;
|
|
3288
3374
|
},
|
|
3289
3375
|
children: (approval) => (() => {
|
|
3290
|
-
var _el$
|
|
3291
|
-
insert(_el$
|
|
3292
|
-
insert(_el$
|
|
3293
|
-
insert(_el$
|
|
3294
|
-
_el$
|
|
3295
|
-
_el$
|
|
3296
|
-
return _el$
|
|
3376
|
+
var _el$94 = _tmpl$24(), _el$95 = _el$94.firstChild, _el$96 = _el$95.nextSibling, _el$97 = _el$96.nextSibling, _el$98 = _el$97.nextSibling, _el$99 = _el$98.nextSibling, _el$100 = _el$99.firstChild, _el$101 = _el$100.nextSibling;
|
|
3377
|
+
insert(_el$96, () => approval.name);
|
|
3378
|
+
insert(_el$97, () => approval.argsSummary);
|
|
3379
|
+
insert(_el$98, () => approval.reason);
|
|
3380
|
+
_el$100.$$click = () => void resolveApproval(approval.id, true);
|
|
3381
|
+
_el$101.$$click = () => void resolveApproval(approval.id, false);
|
|
3382
|
+
return _el$94;
|
|
3297
3383
|
})()
|
|
3298
3384
|
})];
|
|
3299
3385
|
}
|
|
@@ -3317,7 +3403,7 @@ const Sidebar = (props) => {
|
|
|
3317
3403
|
return recentActions().length > 0;
|
|
3318
3404
|
},
|
|
3319
3405
|
get fallback() {
|
|
3320
|
-
return _tmpl$
|
|
3406
|
+
return _tmpl$25();
|
|
3321
3407
|
},
|
|
3322
3408
|
get children() {
|
|
3323
3409
|
return createComponent(Show, {
|
|
@@ -3325,7 +3411,7 @@ const Sidebar = (props) => {
|
|
|
3325
3411
|
return actionsExpanded();
|
|
3326
3412
|
},
|
|
3327
3413
|
get fallback() {
|
|
3328
|
-
return _tmpl$
|
|
3414
|
+
return _tmpl$26();
|
|
3329
3415
|
},
|
|
3330
3416
|
get children() {
|
|
3331
3417
|
return createComponent(For, {
|
|
@@ -3333,32 +3419,32 @@ const Sidebar = (props) => {
|
|
|
3333
3419
|
return recentActions();
|
|
3334
3420
|
},
|
|
3335
3421
|
children: (action) => (() => {
|
|
3336
|
-
var _el$
|
|
3337
|
-
insert(_el$
|
|
3338
|
-
insert(_el$
|
|
3339
|
-
insert(_el$
|
|
3340
|
-
insert(_el$
|
|
3422
|
+
var _el$104 = _tmpl$29(), _el$105 = _el$104.firstChild, _el$106 = _el$105.firstChild, _el$107 = _el$106.nextSibling, _el$108 = _el$105.nextSibling;
|
|
3423
|
+
insert(_el$106, () => action.name);
|
|
3424
|
+
insert(_el$107, () => action.status);
|
|
3425
|
+
insert(_el$108, () => action.argsSummary);
|
|
3426
|
+
insert(_el$104, createComponent(Show, {
|
|
3341
3427
|
get when() {
|
|
3342
3428
|
return action.resultSummary;
|
|
3343
3429
|
},
|
|
3344
3430
|
get children() {
|
|
3345
|
-
var _el$
|
|
3346
|
-
insert(_el$
|
|
3347
|
-
return _el$
|
|
3431
|
+
var _el$109 = _tmpl$27();
|
|
3432
|
+
insert(_el$109, () => action.resultSummary);
|
|
3433
|
+
return _el$109;
|
|
3348
3434
|
}
|
|
3349
3435
|
}), null);
|
|
3350
|
-
insert(_el$
|
|
3436
|
+
insert(_el$104, createComponent(Show, {
|
|
3351
3437
|
get when() {
|
|
3352
3438
|
return action.error;
|
|
3353
3439
|
},
|
|
3354
3440
|
get children() {
|
|
3355
|
-
var _el$
|
|
3356
|
-
insert(_el$
|
|
3357
|
-
return _el$
|
|
3441
|
+
var _el$110 = _tmpl$28();
|
|
3442
|
+
insert(_el$110, () => action.error);
|
|
3443
|
+
return _el$110;
|
|
3358
3444
|
}
|
|
3359
3445
|
}), null);
|
|
3360
|
-
createRenderEffect(() => className(_el$
|
|
3361
|
-
return _el$
|
|
3446
|
+
createRenderEffect(() => className(_el$107, `agent-action-status ${action.status}`));
|
|
3447
|
+
return _el$104;
|
|
3362
3448
|
})()
|
|
3363
3449
|
});
|
|
3364
3450
|
}
|
|
@@ -3424,12 +3510,12 @@ const Sidebar = (props) => {
|
|
|
3424
3510
|
},
|
|
3425
3511
|
get fallback() {
|
|
3426
3512
|
return (() => {
|
|
3427
|
-
var _el$
|
|
3428
|
-
insert(_el$
|
|
3429
|
-
var _c$
|
|
3430
|
-
return () => _c$
|
|
3513
|
+
var _el$111 = _tmpl$30();
|
|
3514
|
+
insert(_el$111, (() => {
|
|
3515
|
+
var _c$5 = memo(() => !!normalizedBookmarkSearch());
|
|
3516
|
+
return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
|
|
3431
3517
|
})());
|
|
3432
|
-
return _el$
|
|
3518
|
+
return _el$111;
|
|
3433
3519
|
})();
|
|
3434
3520
|
},
|
|
3435
3521
|
get children() {
|
|
@@ -3438,71 +3524,71 @@ const Sidebar = (props) => {
|
|
|
3438
3524
|
return filteredGroupedBookmarks();
|
|
3439
3525
|
},
|
|
3440
3526
|
children: (folder) => (() => {
|
|
3441
|
-
var _el$
|
|
3442
|
-
_el$
|
|
3527
|
+
var _el$112 = _tmpl$35(), _el$113 = _el$112.firstChild, _el$114 = _el$113.firstChild, _el$115 = _el$114.firstChild, _el$116 = _el$115.nextSibling, _el$117 = _el$116.firstChild, _el$118 = _el$117.nextSibling, _el$119 = _el$118.firstChild;
|
|
3528
|
+
_el$113.$$keydown = (e) => {
|
|
3443
3529
|
if (e.key === "Enter" || e.key === " ") {
|
|
3444
3530
|
e.preventDefault();
|
|
3445
3531
|
toggleFolderExpanded(folder.id);
|
|
3446
3532
|
}
|
|
3447
3533
|
};
|
|
3448
|
-
_el$
|
|
3449
|
-
insert(_el$
|
|
3450
|
-
insert(_el$
|
|
3451
|
-
insert(_el$
|
|
3534
|
+
_el$113.$$click = () => toggleFolderExpanded(folder.id);
|
|
3535
|
+
insert(_el$117, () => folder.name);
|
|
3536
|
+
insert(_el$118, () => folder.items.length, _el$119);
|
|
3537
|
+
insert(_el$116, createComponent(Show, {
|
|
3452
3538
|
get when() {
|
|
3453
3539
|
return folder.summary;
|
|
3454
3540
|
},
|
|
3455
3541
|
get children() {
|
|
3456
|
-
var _el$
|
|
3457
|
-
insert(_el$
|
|
3458
|
-
return _el$
|
|
3542
|
+
var _el$120 = _tmpl$31();
|
|
3543
|
+
insert(_el$120, () => folder.summary);
|
|
3544
|
+
return _el$120;
|
|
3459
3545
|
}
|
|
3460
3546
|
}), null);
|
|
3461
|
-
insert(_el$
|
|
3547
|
+
insert(_el$113, createComponent(Show, {
|
|
3462
3548
|
get when() {
|
|
3463
3549
|
return folder.id !== UNSORTED_FOLDER.id;
|
|
3464
3550
|
},
|
|
3465
3551
|
get children() {
|
|
3466
|
-
var _el$
|
|
3467
|
-
_el$
|
|
3552
|
+
var _el$121 = _tmpl$32(), _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling;
|
|
3553
|
+
_el$122.$$click = (e) => {
|
|
3468
3554
|
e.stopPropagation();
|
|
3469
3555
|
setEditingFolderId(folder.id);
|
|
3470
3556
|
setEditingFolderName(folder.name);
|
|
3471
3557
|
setEditingFolderSummary(folder.summary || "");
|
|
3472
3558
|
};
|
|
3473
|
-
_el$
|
|
3559
|
+
_el$123.$$click = (e) => {
|
|
3474
3560
|
e.stopPropagation();
|
|
3475
3561
|
void handleRemoveFolder(folder.id);
|
|
3476
3562
|
};
|
|
3477
|
-
return _el$
|
|
3563
|
+
return _el$121;
|
|
3478
3564
|
}
|
|
3479
3565
|
}), null);
|
|
3480
|
-
insert(_el$
|
|
3566
|
+
insert(_el$112, createComponent(Show, {
|
|
3481
3567
|
get when() {
|
|
3482
3568
|
return editingFolderId() === folder.id;
|
|
3483
3569
|
},
|
|
3484
3570
|
get children() {
|
|
3485
|
-
var _el$
|
|
3486
|
-
_el$
|
|
3487
|
-
_el$
|
|
3488
|
-
_el$
|
|
3489
|
-
_el$
|
|
3571
|
+
var _el$124 = _tmpl$33(), _el$125 = _el$124.firstChild, _el$126 = _el$125.firstChild, _el$127 = _el$126.nextSibling, _el$128 = _el$125.nextSibling, _el$129 = _el$128.nextSibling;
|
|
3572
|
+
_el$126.$$input = (e) => setEditingFolderName(e.currentTarget.value);
|
|
3573
|
+
_el$127.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
|
|
3574
|
+
_el$128.$$click = () => void handleRenameFolder(folder.id);
|
|
3575
|
+
_el$129.$$click = () => {
|
|
3490
3576
|
setEditingFolderId(null);
|
|
3491
3577
|
setEditingFolderName("");
|
|
3492
3578
|
setEditingFolderSummary("");
|
|
3493
3579
|
};
|
|
3494
|
-
createRenderEffect(() => _el$
|
|
3495
|
-
createRenderEffect(() => _el$
|
|
3496
|
-
createRenderEffect(() => _el$
|
|
3497
|
-
return _el$
|
|
3580
|
+
createRenderEffect(() => _el$128.disabled = !editingFolderName().trim());
|
|
3581
|
+
createRenderEffect(() => _el$126.value = editingFolderName());
|
|
3582
|
+
createRenderEffect(() => _el$127.value = editingFolderSummary());
|
|
3583
|
+
return _el$124;
|
|
3498
3584
|
}
|
|
3499
3585
|
}), null);
|
|
3500
|
-
insert(_el$
|
|
3586
|
+
insert(_el$112, createComponent(Show, {
|
|
3501
3587
|
get when() {
|
|
3502
3588
|
return isFolderExpanded(folder.id);
|
|
3503
3589
|
},
|
|
3504
3590
|
get fallback() {
|
|
3505
|
-
return _tmpl$
|
|
3591
|
+
return _tmpl$36();
|
|
3506
3592
|
},
|
|
3507
3593
|
get children() {
|
|
3508
3594
|
return createComponent(Show, {
|
|
@@ -3510,41 +3596,41 @@ const Sidebar = (props) => {
|
|
|
3510
3596
|
return folder.items.length > 0;
|
|
3511
3597
|
},
|
|
3512
3598
|
get fallback() {
|
|
3513
|
-
return _tmpl$
|
|
3599
|
+
return _tmpl$37();
|
|
3514
3600
|
},
|
|
3515
3601
|
get children() {
|
|
3516
|
-
var _el$
|
|
3517
|
-
insert(_el$
|
|
3602
|
+
var _el$130 = _tmpl$34();
|
|
3603
|
+
insert(_el$130, createComponent(For, {
|
|
3518
3604
|
get each() {
|
|
3519
3605
|
return folder.items;
|
|
3520
3606
|
},
|
|
3521
3607
|
children: (bookmark) => (() => {
|
|
3522
|
-
var _el$
|
|
3523
|
-
_el$
|
|
3524
|
-
insert(_el$
|
|
3525
|
-
insert(_el$
|
|
3526
|
-
insert(_el$
|
|
3608
|
+
var _el$133 = _tmpl$39(), _el$134 = _el$133.firstChild, _el$135 = _el$134.firstChild, _el$136 = _el$135.nextSibling, _el$138 = _el$134.nextSibling, _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling;
|
|
3609
|
+
_el$134.$$click = () => void createTab(bookmark.url);
|
|
3610
|
+
insert(_el$135, () => bookmark.title || bookmark.url);
|
|
3611
|
+
insert(_el$136, () => bookmark.url);
|
|
3612
|
+
insert(_el$133, createComponent(Show, {
|
|
3527
3613
|
get when() {
|
|
3528
3614
|
return bookmark.note;
|
|
3529
3615
|
},
|
|
3530
3616
|
get children() {
|
|
3531
|
-
var _el$
|
|
3532
|
-
insert(_el$
|
|
3533
|
-
return _el$
|
|
3617
|
+
var _el$137 = _tmpl$38();
|
|
3618
|
+
insert(_el$137, () => bookmark.note);
|
|
3619
|
+
return _el$137;
|
|
3534
3620
|
}
|
|
3535
|
-
}), _el$
|
|
3536
|
-
insert(_el$
|
|
3537
|
-
_el$
|
|
3538
|
-
return _el$
|
|
3621
|
+
}), _el$138);
|
|
3622
|
+
insert(_el$139, () => formatBookmarkDate(bookmark.savedAt));
|
|
3623
|
+
_el$140.$$click = () => void removeBookmark(bookmark.id);
|
|
3624
|
+
return _el$133;
|
|
3539
3625
|
})()
|
|
3540
3626
|
}));
|
|
3541
|
-
return _el$
|
|
3627
|
+
return _el$130;
|
|
3542
3628
|
}
|
|
3543
3629
|
});
|
|
3544
3630
|
}
|
|
3545
3631
|
}), null);
|
|
3546
|
-
createRenderEffect(() => _el$
|
|
3547
|
-
return _el$
|
|
3632
|
+
createRenderEffect(() => _el$115.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
|
|
3633
|
+
return _el$112;
|
|
3548
3634
|
})()
|
|
3549
3635
|
});
|
|
3550
3636
|
}
|
|
@@ -3586,7 +3672,7 @@ const Sidebar = (props) => {
|
|
|
3586
3672
|
return recentCheckpoints().length > 0;
|
|
3587
3673
|
},
|
|
3588
3674
|
get fallback() {
|
|
3589
|
-
return _tmpl$
|
|
3675
|
+
return _tmpl$40();
|
|
3590
3676
|
},
|
|
3591
3677
|
get children() {
|
|
3592
3678
|
var _el$72 = _tmpl$11$2();
|
|
@@ -3595,20 +3681,20 @@ const Sidebar = (props) => {
|
|
|
3595
3681
|
return recentCheckpoints();
|
|
3596
3682
|
},
|
|
3597
3683
|
children: (checkpoint, i) => (() => {
|
|
3598
|
-
var _el$
|
|
3599
|
-
insert(_el$
|
|
3684
|
+
var _el$142 = _tmpl$42(), _el$143 = _el$142.firstChild, _el$144 = _el$143.firstChild, _el$146 = _el$143.nextSibling, _el$147 = _el$146.firstChild, _el$148 = _el$147.nextSibling, _el$149 = _el$148.nextSibling;
|
|
3685
|
+
insert(_el$143, createComponent(Show, {
|
|
3600
3686
|
get when() {
|
|
3601
3687
|
return i() < recentCheckpoints().length - 1;
|
|
3602
3688
|
},
|
|
3603
3689
|
get children() {
|
|
3604
|
-
return _tmpl$
|
|
3690
|
+
return _tmpl$41();
|
|
3605
3691
|
}
|
|
3606
3692
|
}), null);
|
|
3607
|
-
insert(_el$
|
|
3608
|
-
insert(_el$
|
|
3609
|
-
_el$
|
|
3610
|
-
createRenderEffect(() => _el$
|
|
3611
|
-
return _el$
|
|
3693
|
+
insert(_el$147, () => checkpoint.name);
|
|
3694
|
+
insert(_el$148, () => new Date(checkpoint.createdAt).toLocaleString());
|
|
3695
|
+
_el$149.$$click = () => void restoreCheckpoint(checkpoint.id);
|
|
3696
|
+
createRenderEffect(() => _el$144.classList.toggle("latest", !!(i() === 0)));
|
|
3697
|
+
return _el$142;
|
|
3612
3698
|
})()
|
|
3613
3699
|
}));
|
|
3614
3700
|
return _el$72;
|
|
@@ -3628,14 +3714,14 @@ const Sidebar = (props) => {
|
|
|
3628
3714
|
return messages2();
|
|
3629
3715
|
},
|
|
3630
3716
|
children: (msg) => (() => {
|
|
3631
|
-
var _el$
|
|
3632
|
-
insert(_el$
|
|
3717
|
+
var _el$150 = _tmpl$43();
|
|
3718
|
+
insert(_el$150, createComponent(MarkdownMessage, {
|
|
3633
3719
|
get content() {
|
|
3634
3720
|
return msg.content;
|
|
3635
3721
|
}
|
|
3636
3722
|
}));
|
|
3637
|
-
createRenderEffect(() => className(_el$
|
|
3638
|
-
return _el$
|
|
3723
|
+
createRenderEffect(() => className(_el$150, `message message-${msg.role}`));
|
|
3724
|
+
return _el$150;
|
|
3639
3725
|
})()
|
|
3640
3726
|
}), createComponent(Show, {
|
|
3641
3727
|
get when() {
|
|
@@ -3648,7 +3734,7 @@ const Sidebar = (props) => {
|
|
|
3648
3734
|
return hasFirstChunk2();
|
|
3649
3735
|
},
|
|
3650
3736
|
get fallback() {
|
|
3651
|
-
return _tmpl$
|
|
3737
|
+
return _tmpl$44();
|
|
3652
3738
|
},
|
|
3653
3739
|
get children() {
|
|
3654
3740
|
var _el$75 = _tmpl$14$1(), _el$76 = _el$75.firstChild, _el$77 = _el$76.firstChild;
|
|
@@ -3683,22 +3769,22 @@ const Sidebar = (props) => {
|
|
|
3683
3769
|
return runtimeState2().supervisor.pendingApprovals;
|
|
3684
3770
|
},
|
|
3685
3771
|
children: (approval) => (() => {
|
|
3686
|
-
var _el$
|
|
3687
|
-
insert(_el$
|
|
3688
|
-
insert(_el$
|
|
3772
|
+
var _el$152 = _tmpl$46(), _el$153 = _el$152.firstChild, _el$154 = _el$153.nextSibling, _el$155 = _el$154.firstChild, _el$156 = _el$155.firstChild, _el$157 = _el$156.nextSibling, _el$159 = _el$155.nextSibling, _el$160 = _el$159.nextSibling, _el$161 = _el$160.firstChild, _el$162 = _el$161.nextSibling;
|
|
3773
|
+
insert(_el$157, () => approval.name);
|
|
3774
|
+
insert(_el$154, createComponent(Show, {
|
|
3689
3775
|
get when() {
|
|
3690
3776
|
return approval.argsSummary;
|
|
3691
3777
|
},
|
|
3692
3778
|
get children() {
|
|
3693
|
-
var _el$
|
|
3694
|
-
insert(_el$
|
|
3695
|
-
return _el$
|
|
3779
|
+
var _el$158 = _tmpl$45();
|
|
3780
|
+
insert(_el$158, () => approval.argsSummary);
|
|
3781
|
+
return _el$158;
|
|
3696
3782
|
}
|
|
3697
|
-
}), _el$
|
|
3698
|
-
insert(_el$
|
|
3699
|
-
_el$
|
|
3700
|
-
_el$
|
|
3701
|
-
return _el$
|
|
3783
|
+
}), _el$159);
|
|
3784
|
+
insert(_el$159, () => approval.reason);
|
|
3785
|
+
_el$161.$$click = () => void resolveApproval(approval.id, true);
|
|
3786
|
+
_el$162.$$click = () => void resolveApproval(approval.id, false);
|
|
3787
|
+
return _el$152;
|
|
3702
3788
|
})()
|
|
3703
3789
|
});
|
|
3704
3790
|
}
|
|
@@ -3747,34 +3833,60 @@ const Sidebar = (props) => {
|
|
|
3747
3833
|
}), null);
|
|
3748
3834
|
return _el$82;
|
|
3749
3835
|
}
|
|
3836
|
+
}), createComponent(Show, {
|
|
3837
|
+
get when() {
|
|
3838
|
+
return highlightCount() > 0;
|
|
3839
|
+
},
|
|
3840
|
+
get children() {
|
|
3841
|
+
var _el$85 = _tmpl$20(), _el$86 = _el$85.firstChild, _el$87 = _el$86.nextSibling;
|
|
3842
|
+
_el$87.firstChild;
|
|
3843
|
+
var _el$89 = _el$87.nextSibling;
|
|
3844
|
+
_el$86.$$click = () => void scrollToHighlight(highlightIndex() - 1);
|
|
3845
|
+
_el$87.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
|
|
3846
|
+
insert(_el$87, (() => {
|
|
3847
|
+
var _c$4 = memo(() => highlightIndex() >= 0);
|
|
3848
|
+
return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
|
|
3849
|
+
})(), null);
|
|
3850
|
+
_el$89.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
|
|
3851
|
+
createRenderEffect((_p$) => {
|
|
3852
|
+
var _v$9 = highlightIndex() <= 0, _v$0 = highlightIndex() >= highlightCount() - 1;
|
|
3853
|
+
_v$9 !== _p$.e && (_el$86.disabled = _p$.e = _v$9);
|
|
3854
|
+
_v$0 !== _p$.t && (_el$89.disabled = _p$.t = _v$0);
|
|
3855
|
+
return _p$;
|
|
3856
|
+
}, {
|
|
3857
|
+
e: void 0,
|
|
3858
|
+
t: void 0
|
|
3859
|
+
});
|
|
3860
|
+
return _el$85;
|
|
3861
|
+
}
|
|
3750
3862
|
}), (() => {
|
|
3751
|
-
var _el$
|
|
3752
|
-
_el$
|
|
3863
|
+
var _el$90 = _tmpl$21(), _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling;
|
|
3864
|
+
_el$91.$$keydown = (e) => {
|
|
3753
3865
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
3754
3866
|
e.preventDefault();
|
|
3755
3867
|
void handleChatSend();
|
|
3756
3868
|
}
|
|
3757
3869
|
};
|
|
3758
|
-
_el$
|
|
3759
|
-
_el$
|
|
3760
|
-
createRenderEffect(() => _el$
|
|
3761
|
-
createRenderEffect(() => _el$
|
|
3762
|
-
return _el$
|
|
3870
|
+
_el$91.$$input = (e) => setChatInput(e.currentTarget.value);
|
|
3871
|
+
_el$92.$$click = () => void handleChatSend();
|
|
3872
|
+
createRenderEffect(() => _el$92.disabled = !chatInput().trim() || isStreaming2());
|
|
3873
|
+
createRenderEffect(() => _el$91.value = chatInput());
|
|
3874
|
+
return _el$90;
|
|
3763
3875
|
})()];
|
|
3764
3876
|
}
|
|
3765
3877
|
}), null);
|
|
3766
3878
|
createRenderEffect((_p$) => {
|
|
3767
|
-
var _v$
|
|
3768
|
-
_v$
|
|
3769
|
-
_v$
|
|
3770
|
-
_v$
|
|
3771
|
-
_v$
|
|
3772
|
-
_v$
|
|
3773
|
-
_v$
|
|
3774
|
-
_v$
|
|
3775
|
-
_v$
|
|
3776
|
-
_v$
|
|
3777
|
-
_v$
|
|
3879
|
+
var _v$1 = `${sidebarWidth2()}px`, _v$10 = !!isDragging(), _v$11 = !!(sidebarTab() === "supervisor"), _v$12 = sidebarTab() === "supervisor", _v$13 = !!(sidebarTab() === "bookmarks"), _v$14 = sidebarTab() === "bookmarks", _v$15 = !!(sidebarTab() === "checkpoints"), _v$16 = sidebarTab() === "checkpoints", _v$17 = !!(sidebarTab() === "chat"), _v$18 = sidebarTab() === "chat";
|
|
3880
|
+
_v$1 !== _p$.e && setStyleProperty(_el$1, "width", _p$.e = _v$1);
|
|
3881
|
+
_v$10 !== _p$.t && _el$10.classList.toggle("dragging", _p$.t = _v$10);
|
|
3882
|
+
_v$11 !== _p$.a && _el$18.classList.toggle("active", _p$.a = _v$11);
|
|
3883
|
+
_v$12 !== _p$.o && setAttribute(_el$18, "aria-selected", _p$.o = _v$12);
|
|
3884
|
+
_v$13 !== _p$.i && _el$21.classList.toggle("active", _p$.i = _v$13);
|
|
3885
|
+
_v$14 !== _p$.n && setAttribute(_el$21, "aria-selected", _p$.n = _v$14);
|
|
3886
|
+
_v$15 !== _p$.s && _el$22.classList.toggle("active", _p$.s = _v$15);
|
|
3887
|
+
_v$16 !== _p$.h && setAttribute(_el$22, "aria-selected", _p$.h = _v$16);
|
|
3888
|
+
_v$17 !== _p$.r && _el$23.classList.toggle("active", _p$.r = _v$17);
|
|
3889
|
+
_v$18 !== _p$.d && setAttribute(_el$23, "aria-selected", _p$.d = _v$18);
|
|
3778
3890
|
return _p$;
|
|
3779
3891
|
}, {
|
|
3780
3892
|
e: void 0,
|