@quanta-intellect/vessel-browser 0.1.10 → 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 +9 -1
- package/out/main/index.js +3356 -758
- package/out/preload/content-script.js +121 -9
- package/out/preload/index.js +20 -0
- package/out/renderer/assets/{index-Cud0VqFQ.css → index-DMd-y6tm.css} +267 -0
- package/out/renderer/assets/{index-CCVxW0YM.js → index-Do3B3G1W.js} +467 -211
- package/out/renderer/index.html +2 -2
- package/package.json +1 -1
|
@@ -905,7 +905,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
|
|
|
905
905
|
}
|
|
906
906
|
return "idle";
|
|
907
907
|
}
|
|
908
|
-
var _tmpl$$9 = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$8 = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$5 = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list
|
|
908
|
+
var _tmpl$$9 = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$8 = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$5 = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list><button class=tab-new data-tooltip="New Tab">+`), _tmpl$4$4 = /* @__PURE__ */ template(`<div role=tab><span class=tab-title></span><button class=tab-close>×`), _tmpl$5$3 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$6$3 = /* @__PURE__ */ template(`<span class=tab-loading>`);
|
|
909
909
|
function stringToHue(str) {
|
|
910
910
|
let hash = 0;
|
|
911
911
|
for (let i = 0; i < str.length; i++) {
|
|
@@ -961,7 +961,7 @@ const TabBar = () => {
|
|
|
961
961
|
onCleanup(() => clearInterval(ticker));
|
|
962
962
|
const modelActiveTabIds = createMemo(() => getAgentActiveTabIds(runtimeState2(), now()));
|
|
963
963
|
return (() => {
|
|
964
|
-
var _el$3 = _tmpl$3$5(), _el$4 = _el$3.firstChild, _el$5 = _el$4.
|
|
964
|
+
var _el$3 = _tmpl$3$5(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
965
965
|
insert(_el$4, createComponent(For, {
|
|
966
966
|
get each() {
|
|
967
967
|
return tabs2();
|
|
@@ -1007,7 +1007,7 @@ const TabBar = () => {
|
|
|
1007
1007
|
});
|
|
1008
1008
|
return _el$6;
|
|
1009
1009
|
})()
|
|
1010
|
-
}));
|
|
1010
|
+
}), _el$5);
|
|
1011
1011
|
_el$5.$$click = () => createTab();
|
|
1012
1012
|
return _el$3;
|
|
1013
1013
|
})();
|
|
@@ -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);
|
|
@@ -2642,6 +2650,40 @@ function renderList(block, ordered) {
|
|
|
2642
2650
|
const items = block.split("\n").map((line) => line.replace(pattern, "").trim()).filter(Boolean).map((item) => `<li>${applyInlineMarkdown(item)}</li>`).join("");
|
|
2643
2651
|
return ordered ? `<ol>${items}</ol>` : `<ul>${items}</ul>`;
|
|
2644
2652
|
}
|
|
2653
|
+
function isTableBlock(text2) {
|
|
2654
|
+
const lines = text2.split("\n").filter((l) => l.trim());
|
|
2655
|
+
if (lines.length < 2) return false;
|
|
2656
|
+
const hasPipes = lines.every((l) => l.trim().includes("|"));
|
|
2657
|
+
const hasSeparator = lines.some((l) => /^\|?\s*[-:]+[-|\s:]*$/.test(l.trim()));
|
|
2658
|
+
return hasPipes && hasSeparator;
|
|
2659
|
+
}
|
|
2660
|
+
function renderTable(block) {
|
|
2661
|
+
const lines = block.split("\n").map((l) => l.trim()).filter(Boolean);
|
|
2662
|
+
const parseRow = (line) => line.replace(/^\|/, "").replace(/\|$/, "").split("|").map((cell) => cell.trim());
|
|
2663
|
+
const sepIndex = lines.findIndex(
|
|
2664
|
+
(l) => /^\|?\s*[-:]+[-|\s:]*$/.test(l)
|
|
2665
|
+
);
|
|
2666
|
+
const headerRows = sepIndex > 0 ? lines.slice(0, sepIndex) : [lines[0]];
|
|
2667
|
+
const bodyRows = lines.slice(sepIndex + 1);
|
|
2668
|
+
const sepCells = sepIndex >= 0 ? parseRow(lines[sepIndex]) : [];
|
|
2669
|
+
const alignments = sepCells.map((cell) => {
|
|
2670
|
+
const trimmed = cell.replace(/\s/g, "");
|
|
2671
|
+
if (trimmed.startsWith(":") && trimmed.endsWith(":")) return "center";
|
|
2672
|
+
if (trimmed.endsWith(":")) return "right";
|
|
2673
|
+
return "left";
|
|
2674
|
+
});
|
|
2675
|
+
const alignAttr = (i) => {
|
|
2676
|
+
const align = alignments[i];
|
|
2677
|
+
return align && align !== "left" ? ` style="text-align:${align}"` : "";
|
|
2678
|
+
};
|
|
2679
|
+
const thead = headerRows.map(
|
|
2680
|
+
(row) => `<tr>${parseRow(row).map((cell, i) => `<th${alignAttr(i)}>${applyInlineMarkdown(cell)}</th>`).join("")}</tr>`
|
|
2681
|
+
).join("");
|
|
2682
|
+
const tbody = bodyRows.map(
|
|
2683
|
+
(row) => `<tr>${parseRow(row).map((cell, i) => `<td${alignAttr(i)}>${applyInlineMarkdown(cell)}</td>`).join("")}</tr>`
|
|
2684
|
+
).join("");
|
|
2685
|
+
return `<table><thead>${thead}</thead><tbody>${tbody}</tbody></table>`;
|
|
2686
|
+
}
|
|
2645
2687
|
function renderBlock(block) {
|
|
2646
2688
|
const trimmed = block.trim();
|
|
2647
2689
|
if (!trimmed) return "";
|
|
@@ -2649,10 +2691,17 @@ function renderBlock(block) {
|
|
|
2649
2691
|
if (codeMatch) {
|
|
2650
2692
|
return trimmed;
|
|
2651
2693
|
}
|
|
2652
|
-
const
|
|
2653
|
-
if (
|
|
2654
|
-
const level =
|
|
2655
|
-
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;
|
|
2656
2705
|
}
|
|
2657
2706
|
if (/^>\s?/m.test(trimmed) && trimmed.split("\n").every((line) => /^>\s?/.test(line))) {
|
|
2658
2707
|
const content = trimmed.split("\n").map((line) => line.replace(/^>\s?/, "")).join("\n");
|
|
@@ -2661,6 +2710,27 @@ function renderBlock(block) {
|
|
|
2661
2710
|
if (trimmed === "---" || trimmed === "***") {
|
|
2662
2711
|
return "<hr />";
|
|
2663
2712
|
}
|
|
2713
|
+
if (isTableBlock(trimmed)) {
|
|
2714
|
+
return renderTable(trimmed);
|
|
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
|
+
}
|
|
2664
2734
|
if (trimmed.split("\n").every((line) => /^[-*+]\s+/.test(line))) {
|
|
2665
2735
|
return renderList(trimmed, false);
|
|
2666
2736
|
}
|
|
@@ -2669,9 +2739,64 @@ function renderBlock(block) {
|
|
|
2669
2739
|
}
|
|
2670
2740
|
return `<p>${applyInlineMarkdown(trimmed).replace(/\n/g, "<br>")}</p>`;
|
|
2671
2741
|
}
|
|
2742
|
+
const TOOL_ICONS = {
|
|
2743
|
+
navigate: "→",
|
|
2744
|
+
go_back: "←",
|
|
2745
|
+
go_forward: "→",
|
|
2746
|
+
reload: "↻",
|
|
2747
|
+
click: "◉",
|
|
2748
|
+
type_text: "⌨",
|
|
2749
|
+
select_option: "▾",
|
|
2750
|
+
submit_form: "⏎",
|
|
2751
|
+
press_key: "⌥",
|
|
2752
|
+
scroll: "↕",
|
|
2753
|
+
hover: "◌",
|
|
2754
|
+
focus: "◎",
|
|
2755
|
+
read_page: "◫",
|
|
2756
|
+
search: "⌕",
|
|
2757
|
+
login: "🔑",
|
|
2758
|
+
fill_form: "⌨",
|
|
2759
|
+
paginate: "⟫",
|
|
2760
|
+
suggest: "✦",
|
|
2761
|
+
highlight: "🖍",
|
|
2762
|
+
clear_highlights: "✕",
|
|
2763
|
+
flow_start: "▶",
|
|
2764
|
+
flow_advance: "▸",
|
|
2765
|
+
flow_status: "◈",
|
|
2766
|
+
flow_end: "■",
|
|
2767
|
+
dismiss_popup: "✕",
|
|
2768
|
+
wait_for: "◴",
|
|
2769
|
+
create_tab: "+",
|
|
2770
|
+
switch_tab: "⇥",
|
|
2771
|
+
close_tab: "✕",
|
|
2772
|
+
current_tab: "◉",
|
|
2773
|
+
list_tabs: "≡",
|
|
2774
|
+
save_bookmark: "★",
|
|
2775
|
+
list_bookmarks: "☆",
|
|
2776
|
+
create_checkpoint: "⚑",
|
|
2777
|
+
restore_checkpoint: "⟲"
|
|
2778
|
+
};
|
|
2779
|
+
function renderToolChip(name, args) {
|
|
2780
|
+
const icon = TOOL_ICONS[name] || "⚙";
|
|
2781
|
+
const displayName = name.replace(/_/g, " ");
|
|
2782
|
+
const argsHtml = args ? `<span class="tool-chip-args">${escapeHtml(args.length > 60 ? args.slice(0, 57) + "..." : args)}</span>` : "";
|
|
2783
|
+
return `<div class="tool-chip"><span class="tool-chip-icon">${icon}</span><span class="tool-chip-name">${escapeHtml(displayName)}</span>${argsHtml}</div>`;
|
|
2784
|
+
}
|
|
2672
2785
|
function renderMarkdown(source) {
|
|
2673
2786
|
const codeBlocks = [];
|
|
2787
|
+
const toolChips = [];
|
|
2674
2788
|
const normalized = source.replace(/\r\n?/g, "\n").replace(
|
|
2789
|
+
/<<tool:([^:>\n]+)(?::([^>\n]*))?>>/g,
|
|
2790
|
+
(_, name, args) => {
|
|
2791
|
+
const token = `\0TC${toolChips.length}\0`;
|
|
2792
|
+
toolChips.push(renderToolChip(name.trim(), (args || "").trim()));
|
|
2793
|
+
return `
|
|
2794
|
+
|
|
2795
|
+
${token}
|
|
2796
|
+
|
|
2797
|
+
`;
|
|
2798
|
+
}
|
|
2799
|
+
).replace(
|
|
2675
2800
|
/```([\w-]+)?\n([\s\S]*?)```/g,
|
|
2676
2801
|
(_, language, code) => {
|
|
2677
2802
|
const token = `\0CB${codeBlocks.length}\0`;
|
|
@@ -2682,17 +2807,27 @@ function renderMarkdown(source) {
|
|
|
2682
2807
|
return token;
|
|
2683
2808
|
}
|
|
2684
2809
|
);
|
|
2685
|
-
const rendered = normalized.split(/\n{2,}/).map(
|
|
2686
|
-
|
|
2687
|
-
(
|
|
2688
|
-
|
|
2810
|
+
const rendered = normalized.split(/\n{2,}/).map((block) => {
|
|
2811
|
+
const trimmed = block.trim();
|
|
2812
|
+
if (/^\x00TC\d+\x00$/.test(trimmed)) return trimmed;
|
|
2813
|
+
return renderBlock(block);
|
|
2814
|
+
}).filter(Boolean).join("");
|
|
2815
|
+
let output = rendered;
|
|
2816
|
+
output = codeBlocks.reduce(
|
|
2817
|
+
(out, snippet, index) => out.replace(`\0CB${index}\0`, snippet),
|
|
2818
|
+
output
|
|
2689
2819
|
);
|
|
2690
|
-
|
|
2820
|
+
output = toolChips.reduce(
|
|
2821
|
+
(out, snippet, index) => out.replace(`\0TC${index}\0`, snippet),
|
|
2822
|
+
output
|
|
2823
|
+
);
|
|
2824
|
+
return purify.sanitize(output, {
|
|
2691
2825
|
ALLOWED_TAGS: [
|
|
2692
2826
|
"a",
|
|
2693
2827
|
"blockquote",
|
|
2694
2828
|
"br",
|
|
2695
2829
|
"code",
|
|
2830
|
+
"div",
|
|
2696
2831
|
"em",
|
|
2697
2832
|
"h1",
|
|
2698
2833
|
"h2",
|
|
@@ -2705,10 +2840,17 @@ function renderMarkdown(source) {
|
|
|
2705
2840
|
"ol",
|
|
2706
2841
|
"p",
|
|
2707
2842
|
"pre",
|
|
2843
|
+
"span",
|
|
2708
2844
|
"strong",
|
|
2845
|
+
"table",
|
|
2846
|
+
"tbody",
|
|
2847
|
+
"td",
|
|
2848
|
+
"th",
|
|
2849
|
+
"thead",
|
|
2850
|
+
"tr",
|
|
2709
2851
|
"ul"
|
|
2710
2852
|
],
|
|
2711
|
-
ALLOWED_ATTR: ["href", "target", "rel", "data-language"]
|
|
2853
|
+
ALLOWED_ATTR: ["href", "target", "rel", "data-language", "style", "class"]
|
|
2712
2854
|
});
|
|
2713
2855
|
}
|
|
2714
2856
|
const WORD_NORMALIZATIONS = [
|
|
@@ -2767,7 +2909,7 @@ function getBookmarkSearchMatch(args) {
|
|
|
2767
2909
|
return { matchedFields, score };
|
|
2768
2910
|
}
|
|
2769
2911
|
const vesselLogo = "" + new URL("vessel-logo-transparent-IT25qr-Z.png", import.meta.url).href;
|
|
2770
|
-
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`);
|
|
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`);
|
|
2771
2913
|
const UNSORTED_FOLDER = {
|
|
2772
2914
|
id: "unsorted",
|
|
2773
2915
|
name: "Unsorted",
|
|
@@ -2909,6 +3051,59 @@ const Sidebar = (props) => {
|
|
|
2909
3051
|
} = useBookmarks();
|
|
2910
3052
|
const [sidebarTab, setSidebarTab] = createSignal("supervisor");
|
|
2911
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
|
+
});
|
|
2912
3107
|
const handleChatSend = async () => {
|
|
2913
3108
|
const prompt = chatInput().trim();
|
|
2914
3109
|
if (!prompt || isStreaming2()) return;
|
|
@@ -3116,7 +3311,7 @@ const Sidebar = (props) => {
|
|
|
3116
3311
|
return props.forceOpen || sidebarOpen2();
|
|
3117
3312
|
},
|
|
3118
3313
|
get children() {
|
|
3119
|
-
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;
|
|
3120
3315
|
_el$18.firstChild;
|
|
3121
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;
|
|
3122
3317
|
_el$10.$$pointerdown = startResize;
|
|
@@ -3170,7 +3365,7 @@ const Sidebar = (props) => {
|
|
|
3170
3365
|
return runtimeState2().supervisor.pendingApprovals.length > 0;
|
|
3171
3366
|
},
|
|
3172
3367
|
get fallback() {
|
|
3173
|
-
return _tmpl$
|
|
3368
|
+
return _tmpl$23();
|
|
3174
3369
|
},
|
|
3175
3370
|
get children() {
|
|
3176
3371
|
return [_tmpl$7$2(), createComponent(For, {
|
|
@@ -3178,13 +3373,13 @@ const Sidebar = (props) => {
|
|
|
3178
3373
|
return runtimeState2().supervisor.pendingApprovals;
|
|
3179
3374
|
},
|
|
3180
3375
|
children: (approval) => (() => {
|
|
3181
|
-
var _el$
|
|
3182
|
-
insert(_el$
|
|
3183
|
-
insert(_el$
|
|
3184
|
-
insert(_el$
|
|
3185
|
-
_el$
|
|
3186
|
-
_el$
|
|
3187
|
-
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;
|
|
3188
3383
|
})()
|
|
3189
3384
|
})];
|
|
3190
3385
|
}
|
|
@@ -3208,7 +3403,7 @@ const Sidebar = (props) => {
|
|
|
3208
3403
|
return recentActions().length > 0;
|
|
3209
3404
|
},
|
|
3210
3405
|
get fallback() {
|
|
3211
|
-
return _tmpl$
|
|
3406
|
+
return _tmpl$25();
|
|
3212
3407
|
},
|
|
3213
3408
|
get children() {
|
|
3214
3409
|
return createComponent(Show, {
|
|
@@ -3216,7 +3411,7 @@ const Sidebar = (props) => {
|
|
|
3216
3411
|
return actionsExpanded();
|
|
3217
3412
|
},
|
|
3218
3413
|
get fallback() {
|
|
3219
|
-
return _tmpl$
|
|
3414
|
+
return _tmpl$26();
|
|
3220
3415
|
},
|
|
3221
3416
|
get children() {
|
|
3222
3417
|
return createComponent(For, {
|
|
@@ -3224,32 +3419,32 @@ const Sidebar = (props) => {
|
|
|
3224
3419
|
return recentActions();
|
|
3225
3420
|
},
|
|
3226
3421
|
children: (action) => (() => {
|
|
3227
|
-
var _el$
|
|
3228
|
-
insert(_el$
|
|
3229
|
-
insert(_el$
|
|
3230
|
-
insert(_el$
|
|
3231
|
-
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, {
|
|
3232
3427
|
get when() {
|
|
3233
3428
|
return action.resultSummary;
|
|
3234
3429
|
},
|
|
3235
3430
|
get children() {
|
|
3236
|
-
var _el$
|
|
3237
|
-
insert(_el$
|
|
3238
|
-
return _el$
|
|
3431
|
+
var _el$109 = _tmpl$27();
|
|
3432
|
+
insert(_el$109, () => action.resultSummary);
|
|
3433
|
+
return _el$109;
|
|
3239
3434
|
}
|
|
3240
3435
|
}), null);
|
|
3241
|
-
insert(_el$
|
|
3436
|
+
insert(_el$104, createComponent(Show, {
|
|
3242
3437
|
get when() {
|
|
3243
3438
|
return action.error;
|
|
3244
3439
|
},
|
|
3245
3440
|
get children() {
|
|
3246
|
-
var _el$
|
|
3247
|
-
insert(_el$
|
|
3248
|
-
return _el$
|
|
3441
|
+
var _el$110 = _tmpl$28();
|
|
3442
|
+
insert(_el$110, () => action.error);
|
|
3443
|
+
return _el$110;
|
|
3249
3444
|
}
|
|
3250
3445
|
}), null);
|
|
3251
|
-
createRenderEffect(() => className(_el$
|
|
3252
|
-
return _el$
|
|
3446
|
+
createRenderEffect(() => className(_el$107, `agent-action-status ${action.status}`));
|
|
3447
|
+
return _el$104;
|
|
3253
3448
|
})()
|
|
3254
3449
|
});
|
|
3255
3450
|
}
|
|
@@ -3315,12 +3510,12 @@ const Sidebar = (props) => {
|
|
|
3315
3510
|
},
|
|
3316
3511
|
get fallback() {
|
|
3317
3512
|
return (() => {
|
|
3318
|
-
var _el$
|
|
3319
|
-
insert(_el$
|
|
3320
|
-
var _c$
|
|
3321
|
-
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.";
|
|
3322
3517
|
})());
|
|
3323
|
-
return _el$
|
|
3518
|
+
return _el$111;
|
|
3324
3519
|
})();
|
|
3325
3520
|
},
|
|
3326
3521
|
get children() {
|
|
@@ -3329,71 +3524,71 @@ const Sidebar = (props) => {
|
|
|
3329
3524
|
return filteredGroupedBookmarks();
|
|
3330
3525
|
},
|
|
3331
3526
|
children: (folder) => (() => {
|
|
3332
|
-
var _el$
|
|
3333
|
-
_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) => {
|
|
3334
3529
|
if (e.key === "Enter" || e.key === " ") {
|
|
3335
3530
|
e.preventDefault();
|
|
3336
3531
|
toggleFolderExpanded(folder.id);
|
|
3337
3532
|
}
|
|
3338
3533
|
};
|
|
3339
|
-
_el$
|
|
3340
|
-
insert(_el$
|
|
3341
|
-
insert(_el$
|
|
3342
|
-
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, {
|
|
3343
3538
|
get when() {
|
|
3344
3539
|
return folder.summary;
|
|
3345
3540
|
},
|
|
3346
3541
|
get children() {
|
|
3347
|
-
var _el$
|
|
3348
|
-
insert(_el$
|
|
3349
|
-
return _el$
|
|
3542
|
+
var _el$120 = _tmpl$31();
|
|
3543
|
+
insert(_el$120, () => folder.summary);
|
|
3544
|
+
return _el$120;
|
|
3350
3545
|
}
|
|
3351
3546
|
}), null);
|
|
3352
|
-
insert(_el$
|
|
3547
|
+
insert(_el$113, createComponent(Show, {
|
|
3353
3548
|
get when() {
|
|
3354
3549
|
return folder.id !== UNSORTED_FOLDER.id;
|
|
3355
3550
|
},
|
|
3356
3551
|
get children() {
|
|
3357
|
-
var _el$
|
|
3358
|
-
_el$
|
|
3552
|
+
var _el$121 = _tmpl$32(), _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling;
|
|
3553
|
+
_el$122.$$click = (e) => {
|
|
3359
3554
|
e.stopPropagation();
|
|
3360
3555
|
setEditingFolderId(folder.id);
|
|
3361
3556
|
setEditingFolderName(folder.name);
|
|
3362
3557
|
setEditingFolderSummary(folder.summary || "");
|
|
3363
3558
|
};
|
|
3364
|
-
_el$
|
|
3559
|
+
_el$123.$$click = (e) => {
|
|
3365
3560
|
e.stopPropagation();
|
|
3366
3561
|
void handleRemoveFolder(folder.id);
|
|
3367
3562
|
};
|
|
3368
|
-
return _el$
|
|
3563
|
+
return _el$121;
|
|
3369
3564
|
}
|
|
3370
3565
|
}), null);
|
|
3371
|
-
insert(_el$
|
|
3566
|
+
insert(_el$112, createComponent(Show, {
|
|
3372
3567
|
get when() {
|
|
3373
3568
|
return editingFolderId() === folder.id;
|
|
3374
3569
|
},
|
|
3375
3570
|
get children() {
|
|
3376
|
-
var _el$
|
|
3377
|
-
_el$
|
|
3378
|
-
_el$
|
|
3379
|
-
_el$
|
|
3380
|
-
_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 = () => {
|
|
3381
3576
|
setEditingFolderId(null);
|
|
3382
3577
|
setEditingFolderName("");
|
|
3383
3578
|
setEditingFolderSummary("");
|
|
3384
3579
|
};
|
|
3385
|
-
createRenderEffect(() => _el$
|
|
3386
|
-
createRenderEffect(() => _el$
|
|
3387
|
-
createRenderEffect(() => _el$
|
|
3388
|
-
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;
|
|
3389
3584
|
}
|
|
3390
3585
|
}), null);
|
|
3391
|
-
insert(_el$
|
|
3586
|
+
insert(_el$112, createComponent(Show, {
|
|
3392
3587
|
get when() {
|
|
3393
3588
|
return isFolderExpanded(folder.id);
|
|
3394
3589
|
},
|
|
3395
3590
|
get fallback() {
|
|
3396
|
-
return _tmpl$
|
|
3591
|
+
return _tmpl$36();
|
|
3397
3592
|
},
|
|
3398
3593
|
get children() {
|
|
3399
3594
|
return createComponent(Show, {
|
|
@@ -3401,41 +3596,41 @@ const Sidebar = (props) => {
|
|
|
3401
3596
|
return folder.items.length > 0;
|
|
3402
3597
|
},
|
|
3403
3598
|
get fallback() {
|
|
3404
|
-
return _tmpl$
|
|
3599
|
+
return _tmpl$37();
|
|
3405
3600
|
},
|
|
3406
3601
|
get children() {
|
|
3407
|
-
var _el$
|
|
3408
|
-
insert(_el$
|
|
3602
|
+
var _el$130 = _tmpl$34();
|
|
3603
|
+
insert(_el$130, createComponent(For, {
|
|
3409
3604
|
get each() {
|
|
3410
3605
|
return folder.items;
|
|
3411
3606
|
},
|
|
3412
3607
|
children: (bookmark) => (() => {
|
|
3413
|
-
var _el$
|
|
3414
|
-
_el$
|
|
3415
|
-
insert(_el$
|
|
3416
|
-
insert(_el$
|
|
3417
|
-
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, {
|
|
3418
3613
|
get when() {
|
|
3419
3614
|
return bookmark.note;
|
|
3420
3615
|
},
|
|
3421
3616
|
get children() {
|
|
3422
|
-
var _el$
|
|
3423
|
-
insert(_el$
|
|
3424
|
-
return _el$
|
|
3617
|
+
var _el$137 = _tmpl$38();
|
|
3618
|
+
insert(_el$137, () => bookmark.note);
|
|
3619
|
+
return _el$137;
|
|
3425
3620
|
}
|
|
3426
|
-
}), _el$
|
|
3427
|
-
insert(_el$
|
|
3428
|
-
_el$
|
|
3429
|
-
return _el$
|
|
3621
|
+
}), _el$138);
|
|
3622
|
+
insert(_el$139, () => formatBookmarkDate(bookmark.savedAt));
|
|
3623
|
+
_el$140.$$click = () => void removeBookmark(bookmark.id);
|
|
3624
|
+
return _el$133;
|
|
3430
3625
|
})()
|
|
3431
3626
|
}));
|
|
3432
|
-
return _el$
|
|
3627
|
+
return _el$130;
|
|
3433
3628
|
}
|
|
3434
3629
|
});
|
|
3435
3630
|
}
|
|
3436
3631
|
}), null);
|
|
3437
|
-
createRenderEffect(() => _el$
|
|
3438
|
-
return _el$
|
|
3632
|
+
createRenderEffect(() => _el$115.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
|
|
3633
|
+
return _el$112;
|
|
3439
3634
|
})()
|
|
3440
3635
|
});
|
|
3441
3636
|
}
|
|
@@ -3477,7 +3672,7 @@ const Sidebar = (props) => {
|
|
|
3477
3672
|
return recentCheckpoints().length > 0;
|
|
3478
3673
|
},
|
|
3479
3674
|
get fallback() {
|
|
3480
|
-
return _tmpl$
|
|
3675
|
+
return _tmpl$40();
|
|
3481
3676
|
},
|
|
3482
3677
|
get children() {
|
|
3483
3678
|
var _el$72 = _tmpl$11$2();
|
|
@@ -3486,20 +3681,20 @@ const Sidebar = (props) => {
|
|
|
3486
3681
|
return recentCheckpoints();
|
|
3487
3682
|
},
|
|
3488
3683
|
children: (checkpoint, i) => (() => {
|
|
3489
|
-
var _el$
|
|
3490
|
-
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, {
|
|
3491
3686
|
get when() {
|
|
3492
3687
|
return i() < recentCheckpoints().length - 1;
|
|
3493
3688
|
},
|
|
3494
3689
|
get children() {
|
|
3495
|
-
return _tmpl$
|
|
3690
|
+
return _tmpl$41();
|
|
3496
3691
|
}
|
|
3497
3692
|
}), null);
|
|
3498
|
-
insert(_el$
|
|
3499
|
-
insert(_el$
|
|
3500
|
-
_el$
|
|
3501
|
-
createRenderEffect(() => _el$
|
|
3502
|
-
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;
|
|
3503
3698
|
})()
|
|
3504
3699
|
}));
|
|
3505
3700
|
return _el$72;
|
|
@@ -3519,14 +3714,14 @@ const Sidebar = (props) => {
|
|
|
3519
3714
|
return messages2();
|
|
3520
3715
|
},
|
|
3521
3716
|
children: (msg) => (() => {
|
|
3522
|
-
var _el$
|
|
3523
|
-
insert(_el$
|
|
3717
|
+
var _el$150 = _tmpl$43();
|
|
3718
|
+
insert(_el$150, createComponent(MarkdownMessage, {
|
|
3524
3719
|
get content() {
|
|
3525
3720
|
return msg.content;
|
|
3526
3721
|
}
|
|
3527
3722
|
}));
|
|
3528
|
-
createRenderEffect(() => className(_el$
|
|
3529
|
-
return _el$
|
|
3723
|
+
createRenderEffect(() => className(_el$150, `message message-${msg.role}`));
|
|
3724
|
+
return _el$150;
|
|
3530
3725
|
})()
|
|
3531
3726
|
}), createComponent(Show, {
|
|
3532
3727
|
get when() {
|
|
@@ -3539,7 +3734,7 @@ const Sidebar = (props) => {
|
|
|
3539
3734
|
return hasFirstChunk2();
|
|
3540
3735
|
},
|
|
3541
3736
|
get fallback() {
|
|
3542
|
-
return _tmpl$
|
|
3737
|
+
return _tmpl$44();
|
|
3543
3738
|
},
|
|
3544
3739
|
get children() {
|
|
3545
3740
|
var _el$75 = _tmpl$14$1(), _el$76 = _el$75.firstChild, _el$77 = _el$76.firstChild;
|
|
@@ -3564,6 +3759,35 @@ const Sidebar = (props) => {
|
|
|
3564
3759
|
}));
|
|
3565
3760
|
return _el$73;
|
|
3566
3761
|
}
|
|
3762
|
+
}), createComponent(Show, {
|
|
3763
|
+
get when() {
|
|
3764
|
+
return runtimeState2().supervisor.pendingApprovals.length > 0;
|
|
3765
|
+
},
|
|
3766
|
+
get children() {
|
|
3767
|
+
return createComponent(For, {
|
|
3768
|
+
get each() {
|
|
3769
|
+
return runtimeState2().supervisor.pendingApprovals;
|
|
3770
|
+
},
|
|
3771
|
+
children: (approval) => (() => {
|
|
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, {
|
|
3775
|
+
get when() {
|
|
3776
|
+
return approval.argsSummary;
|
|
3777
|
+
},
|
|
3778
|
+
get children() {
|
|
3779
|
+
var _el$158 = _tmpl$45();
|
|
3780
|
+
insert(_el$158, () => approval.argsSummary);
|
|
3781
|
+
return _el$158;
|
|
3782
|
+
}
|
|
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;
|
|
3788
|
+
})()
|
|
3789
|
+
});
|
|
3790
|
+
}
|
|
3567
3791
|
}), createComponent(Show, {
|
|
3568
3792
|
get when() {
|
|
3569
3793
|
return memo(() => messages2().length === 0)() && !isStreaming2();
|
|
@@ -3609,34 +3833,60 @@ const Sidebar = (props) => {
|
|
|
3609
3833
|
}), null);
|
|
3610
3834
|
return _el$82;
|
|
3611
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
|
+
}
|
|
3612
3862
|
}), (() => {
|
|
3613
|
-
var _el$
|
|
3614
|
-
_el$
|
|
3863
|
+
var _el$90 = _tmpl$21(), _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling;
|
|
3864
|
+
_el$91.$$keydown = (e) => {
|
|
3615
3865
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
3616
3866
|
e.preventDefault();
|
|
3617
3867
|
void handleChatSend();
|
|
3618
3868
|
}
|
|
3619
3869
|
};
|
|
3620
|
-
_el$
|
|
3621
|
-
_el$
|
|
3622
|
-
createRenderEffect(() => _el$
|
|
3623
|
-
createRenderEffect(() => _el$
|
|
3624
|
-
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;
|
|
3625
3875
|
})()];
|
|
3626
3876
|
}
|
|
3627
3877
|
}), null);
|
|
3628
3878
|
createRenderEffect((_p$) => {
|
|
3629
|
-
var _v$
|
|
3630
|
-
_v$
|
|
3631
|
-
_v$
|
|
3632
|
-
_v$
|
|
3633
|
-
_v$
|
|
3634
|
-
_v$
|
|
3635
|
-
_v$
|
|
3636
|
-
_v$
|
|
3637
|
-
_v$
|
|
3638
|
-
_v$
|
|
3639
|
-
_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);
|
|
3640
3890
|
return _p$;
|
|
3641
3891
|
}, {
|
|
3642
3892
|
e: void 0,
|
|
@@ -4102,7 +4352,7 @@ const DevToolsPanel = () => {
|
|
|
4102
4352
|
})();
|
|
4103
4353
|
};
|
|
4104
4354
|
delegateEvents(["click", "input"]);
|
|
4105
|
-
var _tmpl$$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-provider>Provider</label><select id=chat-provider class="settings-input settings-select">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-api-key>API Key</label><input id=chat-api-key class=settings-input type=password>`), _tmpl$3 = /* @__PURE__ */ template(`<select id=chat-model class="settings-input settings-select"style=flex:1>`), _tmpl$4 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>Could not fetch models — check your API key and connection.`), _tmpl$5 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-model>Model</label><div style=display:flex;gap:6px;align-items:center><button type=button class=settings-refresh-btn title="Refresh model list">↺`), _tmpl$6 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-base-url>Base URL</label><input id=chat-base-url class=settings-input>`), _tmpl$7 = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=settings-panel><h2 class=settings-title>Runtime Settings</h2><div class=settings-callout><div class=settings-callout-title>External Agent Control</div><p class=settings-callout-copy>Vessel is configured to run under an external harness such as Hermes Agent or OpenClaw. Provider and model selection are not configured inside Vessel.</p></div><div class=settings-field><label class=settings-label for=mcp-port>MCP Port</label><input id=mcp-port class=settings-input placeholder=3100><p class=settings-hint>External harnesses connect to Vessel at <code>http://127.0.0.1:<port>/mcp</code>. Changing this value restarts the MCP server immediately.</p></div><div class=settings-field><label class=settings-label for=obsidian-vault-path>Obsidian Vault Path</label><input id=obsidian-vault-path class=settings-input placeholder=/home/you/Documents/MyVault><p class=settings-hint>Optional. When set, Vessel memory tools can write markdown notes into this vault for research breadcrumbs and summaries.</p></div><div class=settings-field><label class=settings-label for=agent-transcript-mode>Agent Transcript Monitor</label><select id=agent-transcript-mode class="settings-input settings-select"><option value=off>Off</option><option value=summary>Summary HUD</option><option value=full>Full transcript</option></select><p class=settings-hint>Controls the in-browser transcript monitor when an external harness publishes reasoning or status updates into Vessel via the<code>vessel_publish_transcript</code> MCP tool. Summary HUD shows a compact 2-line status surface; Full transcript shows the recent entry list.</p></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Restore last browser session on launch</span></label></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Start bookmarks fresh on launch</span></label><p class=settings-hint>Off by default. When enabled, bookmark folders and saved pages are cleared each time Vessel starts.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Enable Chat Assistant</span></label><p class=settings-hint>Adds a Chat tab to the sidebar for conversing with an AI provider of your choice.</p></div><div class=settings-actions><button class=settings-save>Save</button><button class=settings-close>Close`), _tmpl$8 = /* @__PURE__ */ template(`<style>
|
|
4355
|
+
var _tmpl$$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-provider>Provider</label><select id=chat-provider class="settings-input settings-select">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-api-key>API Key</label><input id=chat-api-key class=settings-input type=password>`), _tmpl$3 = /* @__PURE__ */ template(`<select id=chat-model class="settings-input settings-select"style=flex:1>`), _tmpl$4 = /* @__PURE__ */ template(`<p class=settings-hint style=color:var(--error)>Could not fetch models — check your API key and connection.`), _tmpl$5 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-model>Model</label><div style=display:flex;gap:6px;align-items:center><button type=button class=settings-refresh-btn title="Refresh model list">↺`), _tmpl$6 = /* @__PURE__ */ template(`<div class=settings-field><label class=settings-label for=chat-base-url>Base URL</label><input id=chat-base-url class=settings-input>`), _tmpl$7 = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=settings-panel><h2 class=settings-title>Runtime Settings</h2><div class=settings-callout><div class=settings-callout-title>External Agent Control</div><p class=settings-callout-copy>Vessel is configured to run under an external harness such as Hermes Agent or OpenClaw. Provider and model selection are not configured inside Vessel.</p></div><div class=settings-field><label class=settings-label for=mcp-port>MCP Port</label><input id=mcp-port class=settings-input placeholder=3100><p class=settings-hint>External harnesses connect to Vessel at <code>http://127.0.0.1:<port>/mcp</code>. Changing this value restarts the MCP server immediately.</p></div><div class=settings-field><label class=settings-label for=max-tool-iterations>Max Tool Iterations</label><input id=max-tool-iterations class=settings-input type=number min=10 max=1000 placeholder=200><p class=settings-hint>Maximum number of tool calls the AI agent can make per conversation turn before pausing. Higher values let the agent complete longer multi-step workflows without stopping. Range: 10–1000.</p></div><div class=settings-field><label class=settings-label for=obsidian-vault-path>Obsidian Vault Path</label><input id=obsidian-vault-path class=settings-input placeholder=/home/you/Documents/MyVault><p class=settings-hint>Optional. When set, Vessel memory tools can write markdown notes into this vault for research breadcrumbs and summaries.</p></div><div class=settings-field><label class=settings-label for=agent-transcript-mode>Agent Transcript Monitor</label><select id=agent-transcript-mode class="settings-input settings-select"><option value=off>Off</option><option value=summary>Summary HUD</option><option value=full>Full transcript</option></select><p class=settings-hint>Controls the in-browser transcript monitor when an external harness publishes reasoning or status updates into Vessel via the<code>vessel_publish_transcript</code> MCP tool. Summary HUD shows a compact 2-line status surface; Full transcript shows the recent entry list.</p></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Restore last browser session on launch</span></label></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Start bookmarks fresh on launch</span></label><p class=settings-hint>Off by default. When enabled, bookmark folders and saved pages are cleared each time Vessel starts.</p></div><div class=settings-section-divider></div><div class=settings-field><label class=settings-toggle><button type=button class=toggle-switch role=switch><span class=toggle-switch-thumb></span></button><span>Enable Chat Assistant</span></label><p class=settings-hint>Adds a Chat tab to the sidebar for conversing with an AI provider of your choice.</p></div><div class=settings-actions><button class=settings-save>Save</button><button class=settings-close>Close`), _tmpl$8 = /* @__PURE__ */ template(`<style>
|
|
4106
4356
|
.settings-panel {
|
|
4107
4357
|
width: min(440px, calc(100vw - 32px));
|
|
4108
4358
|
max-height: calc(100vh - 48px);
|
|
@@ -4403,6 +4653,7 @@ const Settings = () => {
|
|
|
4403
4653
|
const [clearBookmarksOnLaunch, setClearBookmarksOnLaunch] = createSignal(false);
|
|
4404
4654
|
const [obsidianVaultPath, setObsidianVaultPath] = createSignal("");
|
|
4405
4655
|
const [mcpPort, setMcpPort] = createSignal("3100");
|
|
4656
|
+
const [maxToolIterations, setMaxToolIterations] = createSignal("200");
|
|
4406
4657
|
const [agentTranscriptMode, setAgentTranscriptMode] = createSignal("summary");
|
|
4407
4658
|
const [health, setHealth] = createSignal(null);
|
|
4408
4659
|
const [status, setStatus] = createSignal(null);
|
|
@@ -4466,6 +4717,7 @@ const Settings = () => {
|
|
|
4466
4717
|
setClearBookmarksOnLaunch(settings.clearBookmarksOnLaunch ?? false);
|
|
4467
4718
|
setObsidianVaultPath(settings.obsidianVaultPath ?? "");
|
|
4468
4719
|
setMcpPort(String(settings.mcpPort ?? 3100));
|
|
4720
|
+
setMaxToolIterations(String(settings.maxToolIterations ?? 200));
|
|
4469
4721
|
setAgentTranscriptMode(settings.agentTranscriptMode ?? "summary");
|
|
4470
4722
|
setHealth(runtimeHealth);
|
|
4471
4723
|
const cp = settings.chatProvider ?? null;
|
|
@@ -4499,6 +4751,8 @@ const Settings = () => {
|
|
|
4499
4751
|
await window.vessel.settings.set("clearBookmarksOnLaunch", clearBookmarksOnLaunch());
|
|
4500
4752
|
await window.vessel.settings.set("obsidianVaultPath", obsidianVaultPath());
|
|
4501
4753
|
await window.vessel.settings.set("mcpPort", parsedPort);
|
|
4754
|
+
const parsedIterations = Number(maxToolIterations().trim()) || 200;
|
|
4755
|
+
await window.vessel.settings.set("maxToolIterations", Math.max(10, Math.min(1e3, parsedIterations)));
|
|
4502
4756
|
await window.vessel.settings.set("agentTranscriptMode", agentTranscriptMode());
|
|
4503
4757
|
const chatConfig = chatEnabled() ? {
|
|
4504
4758
|
id: chatProviderId(),
|
|
@@ -4528,82 +4782,83 @@ const Settings = () => {
|
|
|
4528
4782
|
},
|
|
4529
4783
|
get children() {
|
|
4530
4784
|
return [(() => {
|
|
4531
|
-
var _el$ = _tmpl$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.
|
|
4785
|
+
var _el$ = _tmpl$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$12.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$15.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$18.nextSibling, _el$22 = _el$21.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$23.firstChild, _el$40 = _el$22.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.nextSibling;
|
|
4532
4786
|
addEventListener(_el$, "click", closeSettings);
|
|
4533
4787
|
_el$2.$$keydown = handleKeyDown;
|
|
4534
4788
|
_el$2.$$click = (e) => e.stopPropagation();
|
|
4535
4789
|
_el$7.$$input = (e) => setMcpPort(e.currentTarget.value);
|
|
4536
4790
|
setAttribute(_el$7, "spellcheck", false);
|
|
4791
|
+
_el$0.$$input = (e) => setMaxToolIterations(e.currentTarget.value);
|
|
4537
4792
|
insert(_el$2, createComponent(Show, {
|
|
4538
4793
|
get when() {
|
|
4539
4794
|
return health();
|
|
4540
4795
|
},
|
|
4541
4796
|
children: (currentHealth) => (() => {
|
|
4542
|
-
var _el$
|
|
4543
|
-
_el$
|
|
4544
|
-
insert(_el$
|
|
4545
|
-
insert(_el$
|
|
4546
|
-
insert(_el$
|
|
4797
|
+
var _el$44 = _tmpl$0(), _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling, _el$47 = _el$46.firstChild, _el$49 = _el$47.nextSibling;
|
|
4798
|
+
_el$49.nextSibling;
|
|
4799
|
+
insert(_el$49, () => currentHealth().mcp.status);
|
|
4800
|
+
insert(_el$46, () => currentHealth().mcp.message, null);
|
|
4801
|
+
insert(_el$44, createComponent(Show, {
|
|
4547
4802
|
get when() {
|
|
4548
4803
|
return currentHealth().mcp.endpoint;
|
|
4549
4804
|
},
|
|
4550
4805
|
children: (endpoint) => (() => {
|
|
4551
|
-
var _el$
|
|
4552
|
-
insert(_el$
|
|
4553
|
-
return _el$
|
|
4806
|
+
var _el$52 = _tmpl$1(), _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling;
|
|
4807
|
+
insert(_el$54, endpoint);
|
|
4808
|
+
return _el$52;
|
|
4554
4809
|
})()
|
|
4555
4810
|
}), null);
|
|
4556
|
-
insert(_el$
|
|
4811
|
+
insert(_el$44, createComponent(Show, {
|
|
4557
4812
|
get when() {
|
|
4558
4813
|
return currentHealth().startupIssues.length > 0;
|
|
4559
4814
|
},
|
|
4560
4815
|
get children() {
|
|
4561
|
-
var _el$
|
|
4562
|
-
insert(_el$
|
|
4563
|
-
var _el$
|
|
4564
|
-
insert(_el$
|
|
4565
|
-
insert(_el$
|
|
4566
|
-
insert(_el$
|
|
4816
|
+
var _el$51 = _tmpl$9();
|
|
4817
|
+
insert(_el$51, () => currentHealth().startupIssues.map((issue) => (() => {
|
|
4818
|
+
var _el$55 = _tmpl$10(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
|
|
4819
|
+
insert(_el$56, () => issue.title);
|
|
4820
|
+
insert(_el$57, () => issue.detail);
|
|
4821
|
+
insert(_el$55, createComponent(Show, {
|
|
4567
4822
|
get when() {
|
|
4568
4823
|
return issue.action;
|
|
4569
4824
|
},
|
|
4570
4825
|
children: (action) => (() => {
|
|
4571
|
-
var _el$
|
|
4572
|
-
insert(_el$
|
|
4573
|
-
return _el$
|
|
4826
|
+
var _el$58 = _tmpl$11();
|
|
4827
|
+
insert(_el$58, action);
|
|
4828
|
+
return _el$58;
|
|
4574
4829
|
})()
|
|
4575
4830
|
}), null);
|
|
4576
4831
|
createRenderEffect((_p$) => {
|
|
4577
4832
|
var _v$7 = !!(issue.severity === "warning"), _v$8 = !!(issue.severity === "error");
|
|
4578
|
-
_v$7 !== _p$.e && _el$
|
|
4579
|
-
_v$8 !== _p$.t && _el$
|
|
4833
|
+
_v$7 !== _p$.e && _el$55.classList.toggle("warning", _p$.e = _v$7);
|
|
4834
|
+
_v$8 !== _p$.t && _el$55.classList.toggle("error", _p$.t = _v$8);
|
|
4580
4835
|
return _p$;
|
|
4581
4836
|
}, {
|
|
4582
4837
|
e: void 0,
|
|
4583
4838
|
t: void 0
|
|
4584
4839
|
});
|
|
4585
|
-
return _el$
|
|
4840
|
+
return _el$55;
|
|
4586
4841
|
})()));
|
|
4587
|
-
return _el$
|
|
4842
|
+
return _el$51;
|
|
4588
4843
|
}
|
|
4589
4844
|
}), null);
|
|
4590
|
-
return _el$
|
|
4845
|
+
return _el$44;
|
|
4591
4846
|
})()
|
|
4592
|
-
}), _el$
|
|
4593
|
-
_el$
|
|
4594
|
-
setAttribute(_el$
|
|
4595
|
-
_el$
|
|
4596
|
-
_el$
|
|
4597
|
-
_el$
|
|
4598
|
-
_el$
|
|
4847
|
+
}), _el$1);
|
|
4848
|
+
_el$11.$$input = (e) => setObsidianVaultPath(e.currentTarget.value);
|
|
4849
|
+
setAttribute(_el$11, "spellcheck", false);
|
|
4850
|
+
_el$14.addEventListener("change", (e) => setAgentTranscriptMode(e.currentTarget.value));
|
|
4851
|
+
_el$17.$$click = () => setAutoRestoreSession(!autoRestoreSession());
|
|
4852
|
+
_el$20.$$click = () => setClearBookmarksOnLaunch(!clearBookmarksOnLaunch());
|
|
4853
|
+
_el$24.$$click = () => setChatEnabled(!chatEnabled());
|
|
4599
4854
|
insert(_el$2, createComponent(Show, {
|
|
4600
4855
|
get when() {
|
|
4601
4856
|
return chatEnabled();
|
|
4602
4857
|
},
|
|
4603
4858
|
get children() {
|
|
4604
4859
|
return [(() => {
|
|
4605
|
-
var _el$
|
|
4606
|
-
_el$
|
|
4860
|
+
var _el$25 = _tmpl$$1(), _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling;
|
|
4861
|
+
_el$27.addEventListener("change", (e) => {
|
|
4607
4862
|
const id = e.currentTarget.value;
|
|
4608
4863
|
setChatProviderId(id);
|
|
4609
4864
|
setChatModel("");
|
|
@@ -4612,65 +4867,65 @@ const Settings = () => {
|
|
|
4612
4867
|
setProviderModels([]);
|
|
4613
4868
|
setModelFetchState("idle");
|
|
4614
4869
|
});
|
|
4615
|
-
insert(_el$
|
|
4870
|
+
insert(_el$27, createComponent(For, {
|
|
4616
4871
|
each: CHAT_PROVIDERS,
|
|
4617
4872
|
children: (p) => (() => {
|
|
4618
|
-
var _el$
|
|
4619
|
-
insert(_el$
|
|
4620
|
-
createRenderEffect(() => _el$
|
|
4621
|
-
return _el$
|
|
4873
|
+
var _el$59 = _tmpl$12();
|
|
4874
|
+
insert(_el$59, () => p.name);
|
|
4875
|
+
createRenderEffect(() => _el$59.value = p.id);
|
|
4876
|
+
return _el$59;
|
|
4622
4877
|
})()
|
|
4623
4878
|
}));
|
|
4624
|
-
createRenderEffect(() => _el$
|
|
4625
|
-
return _el$
|
|
4879
|
+
createRenderEffect(() => _el$27.value = chatProviderId());
|
|
4880
|
+
return _el$25;
|
|
4626
4881
|
})(), createComponent(Show, {
|
|
4627
4882
|
get when() {
|
|
4628
4883
|
return chatProviderMeta().requiresKey;
|
|
4629
4884
|
},
|
|
4630
4885
|
get children() {
|
|
4631
|
-
var _el$
|
|
4632
|
-
_el$
|
|
4633
|
-
setAttribute(_el$
|
|
4634
|
-
createRenderEffect(() => setAttribute(_el$
|
|
4635
|
-
createRenderEffect(() => _el$
|
|
4636
|
-
return _el$
|
|
4886
|
+
var _el$28 = _tmpl$2$1(), _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling;
|
|
4887
|
+
_el$30.$$input = (e) => setChatApiKey(e.currentTarget.value);
|
|
4888
|
+
setAttribute(_el$30, "spellcheck", false);
|
|
4889
|
+
createRenderEffect(() => setAttribute(_el$30, "placeholder", chatProviderMeta().keyPlaceholder));
|
|
4890
|
+
createRenderEffect(() => _el$30.value = chatApiKey());
|
|
4891
|
+
return _el$28;
|
|
4637
4892
|
}
|
|
4638
4893
|
}), (() => {
|
|
4639
|
-
var _el$
|
|
4640
|
-
insert(_el$
|
|
4894
|
+
var _el$31 = _tmpl$5(), _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$35 = _el$33.firstChild;
|
|
4895
|
+
insert(_el$33, createComponent(Show, {
|
|
4641
4896
|
get when() {
|
|
4642
4897
|
return providerModels().length > 0;
|
|
4643
4898
|
},
|
|
4644
4899
|
get fallback() {
|
|
4645
4900
|
return (() => {
|
|
4646
|
-
var _el$
|
|
4647
|
-
_el$
|
|
4648
|
-
setAttribute(_el$
|
|
4649
|
-
createRenderEffect(() => setAttribute(_el$
|
|
4650
|
-
createRenderEffect(() => _el$
|
|
4651
|
-
return _el$
|
|
4901
|
+
var _el$60 = _tmpl$13();
|
|
4902
|
+
_el$60.$$input = (e) => setChatModel(e.currentTarget.value);
|
|
4903
|
+
setAttribute(_el$60, "spellcheck", false);
|
|
4904
|
+
createRenderEffect(() => setAttribute(_el$60, "placeholder", modelFetchState() === "loading" ? "Fetching models…" : chatProviderMeta().requiresKey && !chatApiKey().trim() ? "Enter API key to load models" : chatProviderMeta().defaultModel || "model name"));
|
|
4905
|
+
createRenderEffect(() => _el$60.value = chatModel());
|
|
4906
|
+
return _el$60;
|
|
4652
4907
|
})();
|
|
4653
4908
|
},
|
|
4654
4909
|
get children() {
|
|
4655
|
-
var _el$
|
|
4656
|
-
_el$
|
|
4657
|
-
insert(_el$
|
|
4910
|
+
var _el$34 = _tmpl$3();
|
|
4911
|
+
_el$34.addEventListener("change", (e) => setChatModel(e.currentTarget.value));
|
|
4912
|
+
insert(_el$34, createComponent(For, {
|
|
4658
4913
|
get each() {
|
|
4659
4914
|
return providerModels();
|
|
4660
4915
|
},
|
|
4661
4916
|
children: (m) => (() => {
|
|
4662
|
-
var _el$
|
|
4663
|
-
_el$
|
|
4664
|
-
insert(_el$
|
|
4665
|
-
return _el$
|
|
4917
|
+
var _el$61 = _tmpl$12();
|
|
4918
|
+
_el$61.value = m;
|
|
4919
|
+
insert(_el$61, m);
|
|
4920
|
+
return _el$61;
|
|
4666
4921
|
})()
|
|
4667
4922
|
}));
|
|
4668
|
-
createRenderEffect(() => _el$
|
|
4669
|
-
return _el$
|
|
4923
|
+
createRenderEffect(() => _el$34.value = chatModel());
|
|
4924
|
+
return _el$34;
|
|
4670
4925
|
}
|
|
4671
|
-
}), _el$
|
|
4672
|
-
_el$
|
|
4673
|
-
insert(_el$
|
|
4926
|
+
}), _el$35);
|
|
4927
|
+
_el$35.$$click = doFetchModels;
|
|
4928
|
+
insert(_el$31, createComponent(Show, {
|
|
4674
4929
|
get when() {
|
|
4675
4930
|
return modelFetchState() === "error";
|
|
4676
4931
|
},
|
|
@@ -4678,52 +4933,52 @@ const Settings = () => {
|
|
|
4678
4933
|
return _tmpl$4();
|
|
4679
4934
|
}
|
|
4680
4935
|
}), null);
|
|
4681
|
-
createRenderEffect(() => _el$
|
|
4682
|
-
return _el$
|
|
4936
|
+
createRenderEffect(() => _el$35.disabled = modelFetchState() === "loading");
|
|
4937
|
+
return _el$31;
|
|
4683
4938
|
})(), createComponent(Show, {
|
|
4684
4939
|
get when() {
|
|
4685
4940
|
return chatProviderMeta().needsBaseUrl || chatProviderId() === "custom";
|
|
4686
4941
|
},
|
|
4687
4942
|
get children() {
|
|
4688
|
-
var _el$
|
|
4689
|
-
_el$
|
|
4690
|
-
setAttribute(_el$
|
|
4691
|
-
createRenderEffect(() => setAttribute(_el$
|
|
4692
|
-
createRenderEffect(() => _el$
|
|
4693
|
-
return _el$
|
|
4943
|
+
var _el$37 = _tmpl$6(), _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling;
|
|
4944
|
+
_el$39.$$input = (e) => setChatBaseUrl(e.currentTarget.value);
|
|
4945
|
+
setAttribute(_el$39, "spellcheck", false);
|
|
4946
|
+
createRenderEffect(() => setAttribute(_el$39, "placeholder", chatProviderMeta().defaultBaseUrl ?? "https://..."));
|
|
4947
|
+
createRenderEffect(() => _el$39.value = chatBaseUrl());
|
|
4948
|
+
return _el$37;
|
|
4694
4949
|
}
|
|
4695
4950
|
})];
|
|
4696
4951
|
}
|
|
4697
|
-
}), _el$
|
|
4698
|
-
_el$
|
|
4699
|
-
addEventListener(_el$
|
|
4952
|
+
}), _el$40);
|
|
4953
|
+
_el$41.$$click = handleSave;
|
|
4954
|
+
addEventListener(_el$42, "click", closeSettings);
|
|
4700
4955
|
insert(_el$2, createComponent(Show, {
|
|
4701
4956
|
get when() {
|
|
4702
4957
|
return status();
|
|
4703
4958
|
},
|
|
4704
4959
|
children: (currentStatus) => (() => {
|
|
4705
|
-
var _el$
|
|
4706
|
-
insert(_el$
|
|
4960
|
+
var _el$62 = _tmpl$14();
|
|
4961
|
+
insert(_el$62, () => currentStatus().text);
|
|
4707
4962
|
createRenderEffect((_p$) => {
|
|
4708
4963
|
var _v$9 = !!(currentStatus().kind === "success"), _v$0 = !!(currentStatus().kind === "error");
|
|
4709
|
-
_v$9 !== _p$.e && _el$
|
|
4710
|
-
_v$0 !== _p$.t && _el$
|
|
4964
|
+
_v$9 !== _p$.e && _el$62.classList.toggle("success", _p$.e = _v$9);
|
|
4965
|
+
_v$0 !== _p$.t && _el$62.classList.toggle("error", _p$.t = _v$0);
|
|
4711
4966
|
return _p$;
|
|
4712
4967
|
}, {
|
|
4713
4968
|
e: void 0,
|
|
4714
4969
|
t: void 0
|
|
4715
4970
|
});
|
|
4716
|
-
return _el$
|
|
4971
|
+
return _el$62;
|
|
4717
4972
|
})()
|
|
4718
4973
|
}), null);
|
|
4719
4974
|
createRenderEffect((_p$) => {
|
|
4720
4975
|
var _v$ = !!autoRestoreSession(), _v$2 = autoRestoreSession(), _v$3 = !!clearBookmarksOnLaunch(), _v$4 = clearBookmarksOnLaunch(), _v$5 = !!chatEnabled(), _v$6 = chatEnabled();
|
|
4721
|
-
_v$ !== _p$.e && _el$
|
|
4722
|
-
_v$2 !== _p$.t && setAttribute(_el$
|
|
4723
|
-
_v$3 !== _p$.a && _el$
|
|
4724
|
-
_v$4 !== _p$.o && setAttribute(_el$
|
|
4725
|
-
_v$5 !== _p$.i && _el$
|
|
4726
|
-
_v$6 !== _p$.n && setAttribute(_el$
|
|
4976
|
+
_v$ !== _p$.e && _el$17.classList.toggle("on", _p$.e = _v$);
|
|
4977
|
+
_v$2 !== _p$.t && setAttribute(_el$17, "aria-checked", _p$.t = _v$2);
|
|
4978
|
+
_v$3 !== _p$.a && _el$20.classList.toggle("on", _p$.a = _v$3);
|
|
4979
|
+
_v$4 !== _p$.o && setAttribute(_el$20, "aria-checked", _p$.o = _v$4);
|
|
4980
|
+
_v$5 !== _p$.i && _el$24.classList.toggle("on", _p$.i = _v$5);
|
|
4981
|
+
_v$6 !== _p$.n && setAttribute(_el$24, "aria-checked", _p$.n = _v$6);
|
|
4727
4982
|
return _p$;
|
|
4728
4983
|
}, {
|
|
4729
4984
|
e: void 0,
|
|
@@ -4734,8 +4989,9 @@ const Settings = () => {
|
|
|
4734
4989
|
n: void 0
|
|
4735
4990
|
});
|
|
4736
4991
|
createRenderEffect(() => _el$7.value = mcpPort());
|
|
4737
|
-
createRenderEffect(() => _el$0.value =
|
|
4738
|
-
createRenderEffect(() => _el$11.value =
|
|
4992
|
+
createRenderEffect(() => _el$0.value = maxToolIterations());
|
|
4993
|
+
createRenderEffect(() => _el$11.value = obsidianVaultPath());
|
|
4994
|
+
createRenderEffect(() => _el$14.value = agentTranscriptMode());
|
|
4739
4995
|
return _el$;
|
|
4740
4996
|
})(), _tmpl$8()];
|
|
4741
4997
|
}
|