@quanta-intellect/vessel-browser 0.1.11 → 0.1.13
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 +4086 -549
- package/out/preload/content-script.js +61 -17
- package/out/preload/index.js +29 -0
- package/out/renderer/assets/{index-DOCQcMR5.css → index-DMd-y6tm.css} +95 -0
- package/out/renderer/assets/{index-BUYEjb3N.js → index-DiB_DxLD.js} +411 -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);
|
|
@@ -1579,6 +1587,157 @@ function useBookmarks() {
|
|
|
1579
1587
|
renameFolder: (id, newName, summary) => window.vessel.bookmarks.renameFolder(id, newName, summary)
|
|
1580
1588
|
};
|
|
1581
1589
|
}
|
|
1590
|
+
const MEMORY_STORAGE_KEY = "vessel.bookmark-context.memories";
|
|
1591
|
+
const MAX_MEMORY_LINES = 4;
|
|
1592
|
+
const MAX_MEMORY_CHARS = 420;
|
|
1593
|
+
function collapseWhitespace(value) {
|
|
1594
|
+
return value.replace(/\s+/g, " ").trim();
|
|
1595
|
+
}
|
|
1596
|
+
function cleanSnippet(value, maxLength = 140) {
|
|
1597
|
+
const cleaned = collapseWhitespace(
|
|
1598
|
+
value.replace(/`+/g, "").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1")
|
|
1599
|
+
);
|
|
1600
|
+
if (cleaned.length <= maxLength) return cleaned;
|
|
1601
|
+
return `${cleaned.slice(0, maxLength - 1).trimEnd()}...`;
|
|
1602
|
+
}
|
|
1603
|
+
function dedupe(values) {
|
|
1604
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1605
|
+
const result = [];
|
|
1606
|
+
for (const value of values) {
|
|
1607
|
+
const normalized = value.trim().toLowerCase();
|
|
1608
|
+
if (!normalized || seen.has(normalized)) continue;
|
|
1609
|
+
seen.add(normalized);
|
|
1610
|
+
result.push(value.trim());
|
|
1611
|
+
}
|
|
1612
|
+
return result;
|
|
1613
|
+
}
|
|
1614
|
+
function bookmarkMemoryKey(url) {
|
|
1615
|
+
try {
|
|
1616
|
+
return new URL(url).hostname.replace(/^www\./i, "").toLowerCase();
|
|
1617
|
+
} catch {
|
|
1618
|
+
return url.trim().toLowerCase();
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
function tokenize(value) {
|
|
1622
|
+
return dedupe(
|
|
1623
|
+
value.toLowerCase().split(/[^a-z0-9]+/i).filter((token) => token.length >= 4).slice(0, 8)
|
|
1624
|
+
);
|
|
1625
|
+
}
|
|
1626
|
+
function collectBookmarkConversationCues(bookmark, messages2) {
|
|
1627
|
+
const host = bookmarkMemoryKey(bookmark.url);
|
|
1628
|
+
const hostTokens = dedupe(
|
|
1629
|
+
host.split(".").filter((token) => token.length >= 4)
|
|
1630
|
+
);
|
|
1631
|
+
const titleTokens = tokenize(bookmark.title);
|
|
1632
|
+
const noteTokens = tokenize(bookmark.note || "").slice(0, 4);
|
|
1633
|
+
const urlLower = bookmark.url.toLowerCase();
|
|
1634
|
+
const cues = [];
|
|
1635
|
+
for (let index = messages2.length - 1; index >= 0; index -= 1) {
|
|
1636
|
+
const message = messages2[index];
|
|
1637
|
+
const content = collapseWhitespace(message.content);
|
|
1638
|
+
if (!content) continue;
|
|
1639
|
+
const lowered = content.toLowerCase();
|
|
1640
|
+
const matchedTokens = [...titleTokens, ...noteTokens].filter(
|
|
1641
|
+
(token) => lowered.includes(token)
|
|
1642
|
+
);
|
|
1643
|
+
const matchesBookmark = lowered.includes(host) || hostTokens.some((token) => lowered.includes(token)) || lowered.includes(urlLower) || matchedTokens.length >= 2 || matchedTokens.length >= 1 && titleTokens.length <= 1;
|
|
1644
|
+
if (!matchesBookmark) continue;
|
|
1645
|
+
const prefix = message.role === "user" ? "You" : "Assistant";
|
|
1646
|
+
cues.push(`${prefix}: ${cleanSnippet(content)}`);
|
|
1647
|
+
if (cues.length >= MAX_MEMORY_LINES) break;
|
|
1648
|
+
}
|
|
1649
|
+
return dedupe(cues);
|
|
1650
|
+
}
|
|
1651
|
+
function mergeBookmarkMemorySummary(existingSummary, cues) {
|
|
1652
|
+
const merged = dedupe([
|
|
1653
|
+
...existingSummary ? existingSummary.split(" • ").map((item) => cleanSnippet(item, 160)) : [],
|
|
1654
|
+
...cues
|
|
1655
|
+
]).slice(0, MAX_MEMORY_LINES);
|
|
1656
|
+
if (merged.length === 0) return void 0;
|
|
1657
|
+
let summary = merged.join(" • ");
|
|
1658
|
+
if (summary.length > MAX_MEMORY_CHARS) {
|
|
1659
|
+
summary = `${summary.slice(0, MAX_MEMORY_CHARS - 3).trimEnd()}...`;
|
|
1660
|
+
}
|
|
1661
|
+
return summary;
|
|
1662
|
+
}
|
|
1663
|
+
function getStorage(storage) {
|
|
1664
|
+
if (storage) return storage;
|
|
1665
|
+
if (typeof window !== "undefined" && window.localStorage) {
|
|
1666
|
+
return window.localStorage;
|
|
1667
|
+
}
|
|
1668
|
+
return null;
|
|
1669
|
+
}
|
|
1670
|
+
function readMemoryMap(storage) {
|
|
1671
|
+
const target = getStorage(storage);
|
|
1672
|
+
if (!target) return {};
|
|
1673
|
+
try {
|
|
1674
|
+
const raw = target.getItem(MEMORY_STORAGE_KEY);
|
|
1675
|
+
if (!raw) return {};
|
|
1676
|
+
const parsed = JSON.parse(raw);
|
|
1677
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
1678
|
+
} catch {
|
|
1679
|
+
return {};
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
function writeMemoryMap(map, storage) {
|
|
1683
|
+
const target = getStorage(storage);
|
|
1684
|
+
if (!target) return;
|
|
1685
|
+
try {
|
|
1686
|
+
target.setItem(MEMORY_STORAGE_KEY, JSON.stringify(map));
|
|
1687
|
+
} catch {
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
function rememberBookmarkContext(args) {
|
|
1691
|
+
const key = bookmarkMemoryKey(args.bookmark.url);
|
|
1692
|
+
const map = readMemoryMap(args.storage);
|
|
1693
|
+
const existing = map[key];
|
|
1694
|
+
const cues = collectBookmarkConversationCues(args.bookmark, args.messages);
|
|
1695
|
+
const summary = mergeBookmarkMemorySummary(existing?.summary, cues);
|
|
1696
|
+
if (!summary) {
|
|
1697
|
+
return existing ?? null;
|
|
1698
|
+
}
|
|
1699
|
+
const entry = {
|
|
1700
|
+
summary,
|
|
1701
|
+
title: args.bookmark.title || args.bookmark.url,
|
|
1702
|
+
url: args.bookmark.url,
|
|
1703
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1704
|
+
};
|
|
1705
|
+
map[key] = entry;
|
|
1706
|
+
writeMemoryMap(map, args.storage);
|
|
1707
|
+
return entry;
|
|
1708
|
+
}
|
|
1709
|
+
function buildBookmarkContextDraft(args) {
|
|
1710
|
+
const lines = [
|
|
1711
|
+
"Saved bookmark context for the next step:",
|
|
1712
|
+
`- Title: ${args.bookmark.title || args.bookmark.url}`,
|
|
1713
|
+
`- URL: ${args.bookmark.url}`
|
|
1714
|
+
];
|
|
1715
|
+
if (args.folder?.name) {
|
|
1716
|
+
lines.push(`- Folder: ${args.folder.name}`);
|
|
1717
|
+
}
|
|
1718
|
+
if (args.folder?.summary) {
|
|
1719
|
+
lines.push(`- Folder summary: ${cleanSnippet(args.folder.summary, 180)}`);
|
|
1720
|
+
}
|
|
1721
|
+
if (args.bookmark.note) {
|
|
1722
|
+
lines.push(`- Saved note: ${cleanSnippet(args.bookmark.note, 180)}`);
|
|
1723
|
+
}
|
|
1724
|
+
if (args.rememberedSummary) {
|
|
1725
|
+
lines.push(`- Remembered site context: ${args.rememberedSummary}`);
|
|
1726
|
+
}
|
|
1727
|
+
return lines.join("\n");
|
|
1728
|
+
}
|
|
1729
|
+
function buildAndRememberBookmarkContext(args) {
|
|
1730
|
+
const remembered = rememberBookmarkContext({
|
|
1731
|
+
bookmark: args.bookmark,
|
|
1732
|
+
messages: args.messages,
|
|
1733
|
+
storage: args.storage
|
|
1734
|
+
});
|
|
1735
|
+
return buildBookmarkContextDraft({
|
|
1736
|
+
bookmark: args.bookmark,
|
|
1737
|
+
folder: args.folder,
|
|
1738
|
+
rememberedSummary: remembered?.summary ?? null
|
|
1739
|
+
});
|
|
1740
|
+
}
|
|
1582
1741
|
const {
|
|
1583
1742
|
entries,
|
|
1584
1743
|
setPrototypeOf,
|
|
@@ -2683,10 +2842,17 @@ function renderBlock(block) {
|
|
|
2683
2842
|
if (codeMatch) {
|
|
2684
2843
|
return trimmed;
|
|
2685
2844
|
}
|
|
2686
|
-
const
|
|
2687
|
-
if (
|
|
2688
|
-
const level =
|
|
2689
|
-
return `<h${level}>${applyInlineMarkdown(
|
|
2845
|
+
const headingSingle = trimmed.match(/^(#{1,6})\s+(.+)$/);
|
|
2846
|
+
if (headingSingle) {
|
|
2847
|
+
const level = headingSingle[1].length;
|
|
2848
|
+
return `<h${level}>${applyInlineMarkdown(headingSingle[2].trim())}</h${level}>`;
|
|
2849
|
+
}
|
|
2850
|
+
const headingMulti = trimmed.match(/^(#{1,6})\s+(.+)\n([\s\S]+)$/);
|
|
2851
|
+
if (headingMulti) {
|
|
2852
|
+
const level = headingMulti[1].length;
|
|
2853
|
+
const headingHtml = `<h${level}>${applyInlineMarkdown(headingMulti[2].trim())}</h${level}>`;
|
|
2854
|
+
const rest = renderBlock(headingMulti[3]);
|
|
2855
|
+
return headingHtml + rest;
|
|
2690
2856
|
}
|
|
2691
2857
|
if (/^>\s?/m.test(trimmed) && trimmed.split("\n").every((line) => /^>\s?/.test(line))) {
|
|
2692
2858
|
const content = trimmed.split("\n").map((line) => line.replace(/^>\s?/, "")).join("\n");
|
|
@@ -2698,6 +2864,24 @@ function renderBlock(block) {
|
|
|
2698
2864
|
if (isTableBlock(trimmed)) {
|
|
2699
2865
|
return renderTable(trimmed);
|
|
2700
2866
|
}
|
|
2867
|
+
const lines = trimmed.split("\n");
|
|
2868
|
+
const tableStartIdx = lines.findIndex(
|
|
2869
|
+
(l, i) => l.trim().includes("|") && i + 1 < lines.length && /^\|?\s*[-:]+[-|\s:]*$/.test(lines[i + 1].trim())
|
|
2870
|
+
);
|
|
2871
|
+
if (tableStartIdx >= 0) {
|
|
2872
|
+
const beforeTable = lines.slice(0, tableStartIdx).join("\n").trim();
|
|
2873
|
+
const tableLines = lines.slice(tableStartIdx);
|
|
2874
|
+
const tableEndIdx = tableLines.findIndex(
|
|
2875
|
+
(l, i) => i > 1 && !l.trim().includes("|")
|
|
2876
|
+
);
|
|
2877
|
+
const tableBlock = tableEndIdx > 0 ? tableLines.slice(0, tableEndIdx).join("\n") : tableLines.join("\n");
|
|
2878
|
+
const afterTable = tableEndIdx > 0 ? tableLines.slice(tableEndIdx).join("\n").trim() : "";
|
|
2879
|
+
let result = "";
|
|
2880
|
+
if (beforeTable) result += `<p>${applyInlineMarkdown(beforeTable).replace(/\n/g, "<br>")}</p>`;
|
|
2881
|
+
result += renderTable(tableBlock);
|
|
2882
|
+
if (afterTable) result += `<p>${applyInlineMarkdown(afterTable).replace(/\n/g, "<br>")}</p>`;
|
|
2883
|
+
return result;
|
|
2884
|
+
}
|
|
2701
2885
|
if (trimmed.split("\n").every((line) => /^[-*+]\s+/.test(line))) {
|
|
2702
2886
|
return renderList(trimmed, false);
|
|
2703
2887
|
}
|
|
@@ -2876,7 +3060,7 @@ function getBookmarkSearchMatch(args) {
|
|
|
2876
3060
|
return { matchedFields, score };
|
|
2877
3061
|
}
|
|
2878
3062
|
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`);
|
|
3063
|
+
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
3064
|
const UNSORTED_FOLDER = {
|
|
2881
3065
|
id: "unsorted",
|
|
2882
3066
|
name: "Unsorted",
|
|
@@ -3018,6 +3202,81 @@ const Sidebar = (props) => {
|
|
|
3018
3202
|
} = useBookmarks();
|
|
3019
3203
|
const [sidebarTab, setSidebarTab] = createSignal("supervisor");
|
|
3020
3204
|
const [chatInput, setChatInput] = createSignal("");
|
|
3205
|
+
const [highlightCount, setHighlightCount] = createSignal(0);
|
|
3206
|
+
const [highlightIndex, setHighlightIndex] = createSignal(-1);
|
|
3207
|
+
createEffect(() => {
|
|
3208
|
+
if (sidebarTab() !== "chat") return;
|
|
3209
|
+
const poll = async () => {
|
|
3210
|
+
try {
|
|
3211
|
+
const count = await window.vessel?.highlights?.getCount?.() ?? 0;
|
|
3212
|
+
setHighlightCount(count);
|
|
3213
|
+
if (count === 0 && highlightIndex() >= 0) setHighlightIndex(-1);
|
|
3214
|
+
} catch {
|
|
3215
|
+
}
|
|
3216
|
+
};
|
|
3217
|
+
void poll();
|
|
3218
|
+
const id = setInterval(poll, 2e3);
|
|
3219
|
+
onCleanup(() => clearInterval(id));
|
|
3220
|
+
});
|
|
3221
|
+
const scrollToHighlight = async (idx) => {
|
|
3222
|
+
const count = highlightCount();
|
|
3223
|
+
if (count === 0) return;
|
|
3224
|
+
const clamped = Math.max(0, Math.min(idx, count - 1));
|
|
3225
|
+
setHighlightIndex(clamped);
|
|
3226
|
+
await window.vessel?.highlights?.scrollTo?.(clamped);
|
|
3227
|
+
};
|
|
3228
|
+
const removeCurrentHighlight = async () => {
|
|
3229
|
+
const idx = highlightIndex();
|
|
3230
|
+
if (idx < 0) return;
|
|
3231
|
+
await window.vessel?.highlights?.remove?.(idx);
|
|
3232
|
+
const newCount = await window.vessel?.highlights?.getCount?.() ?? 0;
|
|
3233
|
+
setHighlightCount(newCount);
|
|
3234
|
+
if (newCount === 0) {
|
|
3235
|
+
setHighlightIndex(-1);
|
|
3236
|
+
} else if (idx >= newCount) {
|
|
3237
|
+
setHighlightIndex(newCount - 1);
|
|
3238
|
+
await window.vessel?.highlights?.scrollTo?.(newCount - 1);
|
|
3239
|
+
}
|
|
3240
|
+
};
|
|
3241
|
+
const clearAllHighlights = async () => {
|
|
3242
|
+
await window.vessel?.highlights?.clearAll?.();
|
|
3243
|
+
setHighlightCount(0);
|
|
3244
|
+
setHighlightIndex(-1);
|
|
3245
|
+
};
|
|
3246
|
+
createEffect(() => {
|
|
3247
|
+
const unsubscribe = window.vessel.highlights.onSidebarAction((action) => {
|
|
3248
|
+
if (action === "remove-current") {
|
|
3249
|
+
void removeCurrentHighlight();
|
|
3250
|
+
return;
|
|
3251
|
+
}
|
|
3252
|
+
if (action === "clear-all") {
|
|
3253
|
+
void clearAllHighlights();
|
|
3254
|
+
}
|
|
3255
|
+
});
|
|
3256
|
+
onCleanup(unsubscribe);
|
|
3257
|
+
});
|
|
3258
|
+
createEffect(() => {
|
|
3259
|
+
const unsubscribe = window.vessel.bookmarks.onAddContextToChat((bookmarkId) => {
|
|
3260
|
+
const bookmark = bookmarksState2().bookmarks.find((item) => item.id === bookmarkId);
|
|
3261
|
+
if (!bookmark) return;
|
|
3262
|
+
const folder = bookmark.folderId === UNSORTED_FOLDER.id ? UNSORTED_FOLDER : bookmarksState2().folders.find((item) => item.id === bookmark.folderId) ?? null;
|
|
3263
|
+
const contextBlock = buildAndRememberBookmarkContext({
|
|
3264
|
+
bookmark,
|
|
3265
|
+
folder,
|
|
3266
|
+
messages: messages2()
|
|
3267
|
+
});
|
|
3268
|
+
setSidebarTab("chat");
|
|
3269
|
+
setChatInput((current) => current.trim() ? `${current.trim()}
|
|
3270
|
+
|
|
3271
|
+
${contextBlock}` : contextBlock);
|
|
3272
|
+
queueMicrotask(() => {
|
|
3273
|
+
chatInputRef?.focus();
|
|
3274
|
+
const length = chatInputRef?.value.length ?? 0;
|
|
3275
|
+
chatInputRef?.setSelectionRange(length, length);
|
|
3276
|
+
});
|
|
3277
|
+
});
|
|
3278
|
+
onCleanup(unsubscribe);
|
|
3279
|
+
});
|
|
3021
3280
|
const handleChatSend = async () => {
|
|
3022
3281
|
const prompt = chatInput().trim();
|
|
3023
3282
|
if (!prompt || isStreaming2()) return;
|
|
@@ -3050,6 +3309,7 @@ const Sidebar = (props) => {
|
|
|
3050
3309
|
const [elapsedSeconds, setElapsedSeconds] = createSignal(0);
|
|
3051
3310
|
let messagesContainerRef;
|
|
3052
3311
|
let messagesEndRef;
|
|
3312
|
+
let chatInputRef;
|
|
3053
3313
|
let hasInitializedMessageScroll = false;
|
|
3054
3314
|
const recentActions = createMemo(() => runtimeState2().actions.slice(-8).reverse());
|
|
3055
3315
|
const recentCheckpoints = createMemo(() => runtimeState2().checkpoints.slice(-5).reverse());
|
|
@@ -3225,7 +3485,7 @@ const Sidebar = (props) => {
|
|
|
3225
3485
|
return props.forceOpen || sidebarOpen2();
|
|
3226
3486
|
},
|
|
3227
3487
|
get children() {
|
|
3228
|
-
var _el$1 = _tmpl$
|
|
3488
|
+
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
3489
|
_el$18.firstChild;
|
|
3230
3490
|
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
3491
|
_el$10.$$pointerdown = startResize;
|
|
@@ -3279,7 +3539,7 @@ const Sidebar = (props) => {
|
|
|
3279
3539
|
return runtimeState2().supervisor.pendingApprovals.length > 0;
|
|
3280
3540
|
},
|
|
3281
3541
|
get fallback() {
|
|
3282
|
-
return _tmpl$
|
|
3542
|
+
return _tmpl$23();
|
|
3283
3543
|
},
|
|
3284
3544
|
get children() {
|
|
3285
3545
|
return [_tmpl$7$2(), createComponent(For, {
|
|
@@ -3287,13 +3547,13 @@ const Sidebar = (props) => {
|
|
|
3287
3547
|
return runtimeState2().supervisor.pendingApprovals;
|
|
3288
3548
|
},
|
|
3289
3549
|
children: (approval) => (() => {
|
|
3290
|
-
var _el$
|
|
3291
|
-
insert(_el$
|
|
3292
|
-
insert(_el$
|
|
3293
|
-
insert(_el$
|
|
3294
|
-
_el$
|
|
3295
|
-
_el$
|
|
3296
|
-
return _el$
|
|
3550
|
+
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;
|
|
3551
|
+
insert(_el$96, () => approval.name);
|
|
3552
|
+
insert(_el$97, () => approval.argsSummary);
|
|
3553
|
+
insert(_el$98, () => approval.reason);
|
|
3554
|
+
_el$100.$$click = () => void resolveApproval(approval.id, true);
|
|
3555
|
+
_el$101.$$click = () => void resolveApproval(approval.id, false);
|
|
3556
|
+
return _el$94;
|
|
3297
3557
|
})()
|
|
3298
3558
|
})];
|
|
3299
3559
|
}
|
|
@@ -3317,7 +3577,7 @@ const Sidebar = (props) => {
|
|
|
3317
3577
|
return recentActions().length > 0;
|
|
3318
3578
|
},
|
|
3319
3579
|
get fallback() {
|
|
3320
|
-
return _tmpl$
|
|
3580
|
+
return _tmpl$25();
|
|
3321
3581
|
},
|
|
3322
3582
|
get children() {
|
|
3323
3583
|
return createComponent(Show, {
|
|
@@ -3325,7 +3585,7 @@ const Sidebar = (props) => {
|
|
|
3325
3585
|
return actionsExpanded();
|
|
3326
3586
|
},
|
|
3327
3587
|
get fallback() {
|
|
3328
|
-
return _tmpl$
|
|
3588
|
+
return _tmpl$26();
|
|
3329
3589
|
},
|
|
3330
3590
|
get children() {
|
|
3331
3591
|
return createComponent(For, {
|
|
@@ -3333,32 +3593,32 @@ const Sidebar = (props) => {
|
|
|
3333
3593
|
return recentActions();
|
|
3334
3594
|
},
|
|
3335
3595
|
children: (action) => (() => {
|
|
3336
|
-
var _el$
|
|
3337
|
-
insert(_el$
|
|
3338
|
-
insert(_el$
|
|
3339
|
-
insert(_el$
|
|
3340
|
-
insert(_el$
|
|
3596
|
+
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;
|
|
3597
|
+
insert(_el$106, () => action.name);
|
|
3598
|
+
insert(_el$107, () => action.status);
|
|
3599
|
+
insert(_el$108, () => action.argsSummary);
|
|
3600
|
+
insert(_el$104, createComponent(Show, {
|
|
3341
3601
|
get when() {
|
|
3342
3602
|
return action.resultSummary;
|
|
3343
3603
|
},
|
|
3344
3604
|
get children() {
|
|
3345
|
-
var _el$
|
|
3346
|
-
insert(_el$
|
|
3347
|
-
return _el$
|
|
3605
|
+
var _el$109 = _tmpl$27();
|
|
3606
|
+
insert(_el$109, () => action.resultSummary);
|
|
3607
|
+
return _el$109;
|
|
3348
3608
|
}
|
|
3349
3609
|
}), null);
|
|
3350
|
-
insert(_el$
|
|
3610
|
+
insert(_el$104, createComponent(Show, {
|
|
3351
3611
|
get when() {
|
|
3352
3612
|
return action.error;
|
|
3353
3613
|
},
|
|
3354
3614
|
get children() {
|
|
3355
|
-
var _el$
|
|
3356
|
-
insert(_el$
|
|
3357
|
-
return _el$
|
|
3615
|
+
var _el$110 = _tmpl$28();
|
|
3616
|
+
insert(_el$110, () => action.error);
|
|
3617
|
+
return _el$110;
|
|
3358
3618
|
}
|
|
3359
3619
|
}), null);
|
|
3360
|
-
createRenderEffect(() => className(_el$
|
|
3361
|
-
return _el$
|
|
3620
|
+
createRenderEffect(() => className(_el$107, `agent-action-status ${action.status}`));
|
|
3621
|
+
return _el$104;
|
|
3362
3622
|
})()
|
|
3363
3623
|
});
|
|
3364
3624
|
}
|
|
@@ -3424,12 +3684,12 @@ const Sidebar = (props) => {
|
|
|
3424
3684
|
},
|
|
3425
3685
|
get fallback() {
|
|
3426
3686
|
return (() => {
|
|
3427
|
-
var _el$
|
|
3428
|
-
insert(_el$
|
|
3429
|
-
var _c$
|
|
3430
|
-
return () => _c$
|
|
3687
|
+
var _el$111 = _tmpl$30();
|
|
3688
|
+
insert(_el$111, (() => {
|
|
3689
|
+
var _c$5 = memo(() => !!normalizedBookmarkSearch());
|
|
3690
|
+
return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
|
|
3431
3691
|
})());
|
|
3432
|
-
return _el$
|
|
3692
|
+
return _el$111;
|
|
3433
3693
|
})();
|
|
3434
3694
|
},
|
|
3435
3695
|
get children() {
|
|
@@ -3438,71 +3698,71 @@ const Sidebar = (props) => {
|
|
|
3438
3698
|
return filteredGroupedBookmarks();
|
|
3439
3699
|
},
|
|
3440
3700
|
children: (folder) => (() => {
|
|
3441
|
-
var _el$
|
|
3442
|
-
_el$
|
|
3701
|
+
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;
|
|
3702
|
+
_el$113.$$keydown = (e) => {
|
|
3443
3703
|
if (e.key === "Enter" || e.key === " ") {
|
|
3444
3704
|
e.preventDefault();
|
|
3445
3705
|
toggleFolderExpanded(folder.id);
|
|
3446
3706
|
}
|
|
3447
3707
|
};
|
|
3448
|
-
_el$
|
|
3449
|
-
insert(_el$
|
|
3450
|
-
insert(_el$
|
|
3451
|
-
insert(_el$
|
|
3708
|
+
_el$113.$$click = () => toggleFolderExpanded(folder.id);
|
|
3709
|
+
insert(_el$117, () => folder.name);
|
|
3710
|
+
insert(_el$118, () => folder.items.length, _el$119);
|
|
3711
|
+
insert(_el$116, createComponent(Show, {
|
|
3452
3712
|
get when() {
|
|
3453
3713
|
return folder.summary;
|
|
3454
3714
|
},
|
|
3455
3715
|
get children() {
|
|
3456
|
-
var _el$
|
|
3457
|
-
insert(_el$
|
|
3458
|
-
return _el$
|
|
3716
|
+
var _el$120 = _tmpl$31();
|
|
3717
|
+
insert(_el$120, () => folder.summary);
|
|
3718
|
+
return _el$120;
|
|
3459
3719
|
}
|
|
3460
3720
|
}), null);
|
|
3461
|
-
insert(_el$
|
|
3721
|
+
insert(_el$113, createComponent(Show, {
|
|
3462
3722
|
get when() {
|
|
3463
3723
|
return folder.id !== UNSORTED_FOLDER.id;
|
|
3464
3724
|
},
|
|
3465
3725
|
get children() {
|
|
3466
|
-
var _el$
|
|
3467
|
-
_el$
|
|
3726
|
+
var _el$121 = _tmpl$32(), _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling;
|
|
3727
|
+
_el$122.$$click = (e) => {
|
|
3468
3728
|
e.stopPropagation();
|
|
3469
3729
|
setEditingFolderId(folder.id);
|
|
3470
3730
|
setEditingFolderName(folder.name);
|
|
3471
3731
|
setEditingFolderSummary(folder.summary || "");
|
|
3472
3732
|
};
|
|
3473
|
-
_el$
|
|
3733
|
+
_el$123.$$click = (e) => {
|
|
3474
3734
|
e.stopPropagation();
|
|
3475
3735
|
void handleRemoveFolder(folder.id);
|
|
3476
3736
|
};
|
|
3477
|
-
return _el$
|
|
3737
|
+
return _el$121;
|
|
3478
3738
|
}
|
|
3479
3739
|
}), null);
|
|
3480
|
-
insert(_el$
|
|
3740
|
+
insert(_el$112, createComponent(Show, {
|
|
3481
3741
|
get when() {
|
|
3482
3742
|
return editingFolderId() === folder.id;
|
|
3483
3743
|
},
|
|
3484
3744
|
get children() {
|
|
3485
|
-
var _el$
|
|
3486
|
-
_el$
|
|
3487
|
-
_el$
|
|
3488
|
-
_el$
|
|
3489
|
-
_el$
|
|
3745
|
+
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;
|
|
3746
|
+
_el$126.$$input = (e) => setEditingFolderName(e.currentTarget.value);
|
|
3747
|
+
_el$127.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
|
|
3748
|
+
_el$128.$$click = () => void handleRenameFolder(folder.id);
|
|
3749
|
+
_el$129.$$click = () => {
|
|
3490
3750
|
setEditingFolderId(null);
|
|
3491
3751
|
setEditingFolderName("");
|
|
3492
3752
|
setEditingFolderSummary("");
|
|
3493
3753
|
};
|
|
3494
|
-
createRenderEffect(() => _el$
|
|
3495
|
-
createRenderEffect(() => _el$
|
|
3496
|
-
createRenderEffect(() => _el$
|
|
3497
|
-
return _el$
|
|
3754
|
+
createRenderEffect(() => _el$128.disabled = !editingFolderName().trim());
|
|
3755
|
+
createRenderEffect(() => _el$126.value = editingFolderName());
|
|
3756
|
+
createRenderEffect(() => _el$127.value = editingFolderSummary());
|
|
3757
|
+
return _el$124;
|
|
3498
3758
|
}
|
|
3499
3759
|
}), null);
|
|
3500
|
-
insert(_el$
|
|
3760
|
+
insert(_el$112, createComponent(Show, {
|
|
3501
3761
|
get when() {
|
|
3502
3762
|
return isFolderExpanded(folder.id);
|
|
3503
3763
|
},
|
|
3504
3764
|
get fallback() {
|
|
3505
|
-
return _tmpl$
|
|
3765
|
+
return _tmpl$36();
|
|
3506
3766
|
},
|
|
3507
3767
|
get children() {
|
|
3508
3768
|
return createComponent(Show, {
|
|
@@ -3510,41 +3770,42 @@ const Sidebar = (props) => {
|
|
|
3510
3770
|
return folder.items.length > 0;
|
|
3511
3771
|
},
|
|
3512
3772
|
get fallback() {
|
|
3513
|
-
return _tmpl$
|
|
3773
|
+
return _tmpl$37();
|
|
3514
3774
|
},
|
|
3515
3775
|
get children() {
|
|
3516
|
-
var _el$
|
|
3517
|
-
insert(_el$
|
|
3776
|
+
var _el$130 = _tmpl$34();
|
|
3777
|
+
insert(_el$130, createComponent(For, {
|
|
3518
3778
|
get each() {
|
|
3519
3779
|
return folder.items;
|
|
3520
3780
|
},
|
|
3521
3781
|
children: (bookmark) => (() => {
|
|
3522
|
-
var _el$
|
|
3523
|
-
_el$
|
|
3524
|
-
insert(_el$
|
|
3525
|
-
insert(_el$
|
|
3526
|
-
insert(_el$
|
|
3782
|
+
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;
|
|
3783
|
+
_el$134.$$click = () => void createTab(bookmark.url);
|
|
3784
|
+
insert(_el$135, () => bookmark.title || bookmark.url);
|
|
3785
|
+
insert(_el$136, () => bookmark.url);
|
|
3786
|
+
insert(_el$133, createComponent(Show, {
|
|
3527
3787
|
get when() {
|
|
3528
3788
|
return bookmark.note;
|
|
3529
3789
|
},
|
|
3530
3790
|
get children() {
|
|
3531
|
-
var _el$
|
|
3532
|
-
insert(_el$
|
|
3533
|
-
return _el$
|
|
3791
|
+
var _el$137 = _tmpl$38();
|
|
3792
|
+
insert(_el$137, () => bookmark.note);
|
|
3793
|
+
return _el$137;
|
|
3534
3794
|
}
|
|
3535
|
-
}), _el$
|
|
3536
|
-
insert(_el$
|
|
3537
|
-
_el$
|
|
3538
|
-
|
|
3795
|
+
}), _el$138);
|
|
3796
|
+
insert(_el$139, () => formatBookmarkDate(bookmark.savedAt));
|
|
3797
|
+
_el$140.$$click = () => void removeBookmark(bookmark.id);
|
|
3798
|
+
createRenderEffect(() => setAttribute(_el$133, "data-bookmark-id", bookmark.id));
|
|
3799
|
+
return _el$133;
|
|
3539
3800
|
})()
|
|
3540
3801
|
}));
|
|
3541
|
-
return _el$
|
|
3802
|
+
return _el$130;
|
|
3542
3803
|
}
|
|
3543
3804
|
});
|
|
3544
3805
|
}
|
|
3545
3806
|
}), null);
|
|
3546
|
-
createRenderEffect(() => _el$
|
|
3547
|
-
return _el$
|
|
3807
|
+
createRenderEffect(() => _el$115.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
|
|
3808
|
+
return _el$112;
|
|
3548
3809
|
})()
|
|
3549
3810
|
});
|
|
3550
3811
|
}
|
|
@@ -3586,7 +3847,7 @@ const Sidebar = (props) => {
|
|
|
3586
3847
|
return recentCheckpoints().length > 0;
|
|
3587
3848
|
},
|
|
3588
3849
|
get fallback() {
|
|
3589
|
-
return _tmpl$
|
|
3850
|
+
return _tmpl$40();
|
|
3590
3851
|
},
|
|
3591
3852
|
get children() {
|
|
3592
3853
|
var _el$72 = _tmpl$11$2();
|
|
@@ -3595,20 +3856,20 @@ const Sidebar = (props) => {
|
|
|
3595
3856
|
return recentCheckpoints();
|
|
3596
3857
|
},
|
|
3597
3858
|
children: (checkpoint, i) => (() => {
|
|
3598
|
-
var _el$
|
|
3599
|
-
insert(_el$
|
|
3859
|
+
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;
|
|
3860
|
+
insert(_el$143, createComponent(Show, {
|
|
3600
3861
|
get when() {
|
|
3601
3862
|
return i() < recentCheckpoints().length - 1;
|
|
3602
3863
|
},
|
|
3603
3864
|
get children() {
|
|
3604
|
-
return _tmpl$
|
|
3865
|
+
return _tmpl$41();
|
|
3605
3866
|
}
|
|
3606
3867
|
}), null);
|
|
3607
|
-
insert(_el$
|
|
3608
|
-
insert(_el$
|
|
3609
|
-
_el$
|
|
3610
|
-
createRenderEffect(() => _el$
|
|
3611
|
-
return _el$
|
|
3868
|
+
insert(_el$147, () => checkpoint.name);
|
|
3869
|
+
insert(_el$148, () => new Date(checkpoint.createdAt).toLocaleString());
|
|
3870
|
+
_el$149.$$click = () => void restoreCheckpoint(checkpoint.id);
|
|
3871
|
+
createRenderEffect(() => _el$144.classList.toggle("latest", !!(i() === 0)));
|
|
3872
|
+
return _el$142;
|
|
3612
3873
|
})()
|
|
3613
3874
|
}));
|
|
3614
3875
|
return _el$72;
|
|
@@ -3628,14 +3889,14 @@ const Sidebar = (props) => {
|
|
|
3628
3889
|
return messages2();
|
|
3629
3890
|
},
|
|
3630
3891
|
children: (msg) => (() => {
|
|
3631
|
-
var _el$
|
|
3632
|
-
insert(_el$
|
|
3892
|
+
var _el$150 = _tmpl$43();
|
|
3893
|
+
insert(_el$150, createComponent(MarkdownMessage, {
|
|
3633
3894
|
get content() {
|
|
3634
3895
|
return msg.content;
|
|
3635
3896
|
}
|
|
3636
3897
|
}));
|
|
3637
|
-
createRenderEffect(() => className(_el$
|
|
3638
|
-
return _el$
|
|
3898
|
+
createRenderEffect(() => className(_el$150, `message message-${msg.role}`));
|
|
3899
|
+
return _el$150;
|
|
3639
3900
|
})()
|
|
3640
3901
|
}), createComponent(Show, {
|
|
3641
3902
|
get when() {
|
|
@@ -3648,7 +3909,7 @@ const Sidebar = (props) => {
|
|
|
3648
3909
|
return hasFirstChunk2();
|
|
3649
3910
|
},
|
|
3650
3911
|
get fallback() {
|
|
3651
|
-
return _tmpl$
|
|
3912
|
+
return _tmpl$44();
|
|
3652
3913
|
},
|
|
3653
3914
|
get children() {
|
|
3654
3915
|
var _el$75 = _tmpl$14$1(), _el$76 = _el$75.firstChild, _el$77 = _el$76.firstChild;
|
|
@@ -3683,22 +3944,22 @@ const Sidebar = (props) => {
|
|
|
3683
3944
|
return runtimeState2().supervisor.pendingApprovals;
|
|
3684
3945
|
},
|
|
3685
3946
|
children: (approval) => (() => {
|
|
3686
|
-
var _el$
|
|
3687
|
-
insert(_el$
|
|
3688
|
-
insert(_el$
|
|
3947
|
+
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;
|
|
3948
|
+
insert(_el$157, () => approval.name);
|
|
3949
|
+
insert(_el$154, createComponent(Show, {
|
|
3689
3950
|
get when() {
|
|
3690
3951
|
return approval.argsSummary;
|
|
3691
3952
|
},
|
|
3692
3953
|
get children() {
|
|
3693
|
-
var _el$
|
|
3694
|
-
insert(_el$
|
|
3695
|
-
return _el$
|
|
3954
|
+
var _el$158 = _tmpl$45();
|
|
3955
|
+
insert(_el$158, () => approval.argsSummary);
|
|
3956
|
+
return _el$158;
|
|
3696
3957
|
}
|
|
3697
|
-
}), _el$
|
|
3698
|
-
insert(_el$
|
|
3699
|
-
_el$
|
|
3700
|
-
_el$
|
|
3701
|
-
return _el$
|
|
3958
|
+
}), _el$159);
|
|
3959
|
+
insert(_el$159, () => approval.reason);
|
|
3960
|
+
_el$161.$$click = () => void resolveApproval(approval.id, true);
|
|
3961
|
+
_el$162.$$click = () => void resolveApproval(approval.id, false);
|
|
3962
|
+
return _el$152;
|
|
3702
3963
|
})()
|
|
3703
3964
|
});
|
|
3704
3965
|
}
|
|
@@ -3747,34 +4008,62 @@ const Sidebar = (props) => {
|
|
|
3747
4008
|
}), null);
|
|
3748
4009
|
return _el$82;
|
|
3749
4010
|
}
|
|
4011
|
+
}), createComponent(Show, {
|
|
4012
|
+
get when() {
|
|
4013
|
+
return highlightCount() > 0;
|
|
4014
|
+
},
|
|
4015
|
+
get children() {
|
|
4016
|
+
var _el$85 = _tmpl$20(), _el$86 = _el$85.firstChild, _el$87 = _el$86.nextSibling;
|
|
4017
|
+
_el$87.firstChild;
|
|
4018
|
+
var _el$89 = _el$87.nextSibling;
|
|
4019
|
+
_el$86.$$click = () => void scrollToHighlight(highlightIndex() - 1);
|
|
4020
|
+
_el$87.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
|
|
4021
|
+
insert(_el$87, (() => {
|
|
4022
|
+
var _c$4 = memo(() => highlightIndex() >= 0);
|
|
4023
|
+
return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
|
|
4024
|
+
})(), null);
|
|
4025
|
+
_el$89.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
|
|
4026
|
+
createRenderEffect((_p$) => {
|
|
4027
|
+
var _v$9 = highlightIndex() <= 0, _v$0 = highlightIndex() >= highlightCount() - 1;
|
|
4028
|
+
_v$9 !== _p$.e && (_el$86.disabled = _p$.e = _v$9);
|
|
4029
|
+
_v$0 !== _p$.t && (_el$89.disabled = _p$.t = _v$0);
|
|
4030
|
+
return _p$;
|
|
4031
|
+
}, {
|
|
4032
|
+
e: void 0,
|
|
4033
|
+
t: void 0
|
|
4034
|
+
});
|
|
4035
|
+
return _el$85;
|
|
4036
|
+
}
|
|
3750
4037
|
}), (() => {
|
|
3751
|
-
var _el$
|
|
3752
|
-
_el$
|
|
4038
|
+
var _el$90 = _tmpl$21(), _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling;
|
|
4039
|
+
_el$91.$$keydown = (e) => {
|
|
3753
4040
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
3754
4041
|
e.preventDefault();
|
|
3755
4042
|
void handleChatSend();
|
|
3756
4043
|
}
|
|
3757
4044
|
};
|
|
3758
|
-
_el$
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
4045
|
+
_el$91.$$input = (e) => setChatInput(e.currentTarget.value);
|
|
4046
|
+
var _ref$3 = chatInputRef;
|
|
4047
|
+
typeof _ref$3 === "function" ? use(_ref$3, _el$91) : chatInputRef = _el$91;
|
|
4048
|
+
_el$92.$$click = () => void handleChatSend();
|
|
4049
|
+
createRenderEffect(() => _el$92.disabled = !chatInput().trim() || isStreaming2());
|
|
4050
|
+
createRenderEffect(() => _el$91.value = chatInput());
|
|
4051
|
+
return _el$90;
|
|
3763
4052
|
})()];
|
|
3764
4053
|
}
|
|
3765
4054
|
}), null);
|
|
3766
4055
|
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$
|
|
4056
|
+
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";
|
|
4057
|
+
_v$1 !== _p$.e && setStyleProperty(_el$1, "width", _p$.e = _v$1);
|
|
4058
|
+
_v$10 !== _p$.t && _el$10.classList.toggle("dragging", _p$.t = _v$10);
|
|
4059
|
+
_v$11 !== _p$.a && _el$18.classList.toggle("active", _p$.a = _v$11);
|
|
4060
|
+
_v$12 !== _p$.o && setAttribute(_el$18, "aria-selected", _p$.o = _v$12);
|
|
4061
|
+
_v$13 !== _p$.i && _el$21.classList.toggle("active", _p$.i = _v$13);
|
|
4062
|
+
_v$14 !== _p$.n && setAttribute(_el$21, "aria-selected", _p$.n = _v$14);
|
|
4063
|
+
_v$15 !== _p$.s && _el$22.classList.toggle("active", _p$.s = _v$15);
|
|
4064
|
+
_v$16 !== _p$.h && setAttribute(_el$22, "aria-selected", _p$.h = _v$16);
|
|
4065
|
+
_v$17 !== _p$.r && _el$23.classList.toggle("active", _p$.r = _v$17);
|
|
4066
|
+
_v$18 !== _p$.d && setAttribute(_el$23, "aria-selected", _p$.d = _v$18);
|
|
3778
4067
|
return _p$;
|
|
3779
4068
|
}, {
|
|
3780
4069
|
e: void 0,
|