@quanta-intellect/vessel-browser 0.1.104 → 0.1.115
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 +5 -5
- package/out/main/index.js +1535 -1083
- package/out/preload/content-script.js +20 -3
- package/out/preload/index.js +20 -0
- package/out/renderer/assets/{index-BF_JrL2V.css → index-CFbT1_av.css} +29 -2
- package/out/renderer/assets/{index-D3ABnKy4.js → index-CWiMuKTX.js} +907 -598
- package/out/renderer/index.html +2 -2
- package/package.json +1 -1
|
@@ -2151,13 +2151,30 @@ const PAGE_DIFF_MUTATION_DEBOUNCE_MS = 1200;
|
|
|
2151
2151
|
function normalizeSignatureText(value) {
|
|
2152
2152
|
return (value || "").replace(/\s+/g, " ").trim();
|
|
2153
2153
|
}
|
|
2154
|
+
function collectBoundedVisibleText(root, maxLength) {
|
|
2155
|
+
if (!root) return "";
|
|
2156
|
+
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
|
|
2157
|
+
const parts = [];
|
|
2158
|
+
let length = 0;
|
|
2159
|
+
while (length < maxLength) {
|
|
2160
|
+
const node = walker.nextNode();
|
|
2161
|
+
if (!node) break;
|
|
2162
|
+
const parent = node.parentElement;
|
|
2163
|
+
if (!parent || parent.closest("script, style, noscript, [hidden], [aria-hidden='true']")) {
|
|
2164
|
+
continue;
|
|
2165
|
+
}
|
|
2166
|
+
const text = normalizeSignatureText(node.textContent);
|
|
2167
|
+
if (!text) continue;
|
|
2168
|
+
parts.push(text);
|
|
2169
|
+
length += text.length + 1;
|
|
2170
|
+
}
|
|
2171
|
+
return parts.join(" ").slice(0, maxLength);
|
|
2172
|
+
}
|
|
2154
2173
|
function getPageDiffSignature() {
|
|
2155
2174
|
const title = normalizeSignatureText(document.title);
|
|
2156
2175
|
const headings = Array.from(document.querySelectorAll("h1, h2, h3")).slice(0, 8).map((el) => normalizeSignatureText(el.textContent)).filter(Boolean).join(" | ");
|
|
2157
2176
|
const mainRoot = document.querySelector("main, article, [role='main']") || document.body;
|
|
2158
|
-
const visibleText =
|
|
2159
|
-
mainRoot instanceof HTMLElement ? mainRoot.innerText : document.body?.innerText || ""
|
|
2160
|
-
).slice(0, 1200);
|
|
2177
|
+
const visibleText = collectBoundedVisibleText(mainRoot, 1200);
|
|
2161
2178
|
return [window.location.href, title, headings, visibleText].join("\n");
|
|
2162
2179
|
}
|
|
2163
2180
|
function asElement(node) {
|
package/out/preload/index.js
CHANGED
|
@@ -55,6 +55,8 @@ const Channels = {
|
|
|
55
55
|
SETTINGS_HEALTH_GET: "settings:health:get",
|
|
56
56
|
SETTINGS_HEALTH_UPDATE: "settings:health:update",
|
|
57
57
|
MCP_REGENERATE_TOKEN: "mcp:regenerate-token",
|
|
58
|
+
// Support
|
|
59
|
+
SUPPORT_SUBMIT_FEEDBACK: "support:submit-feedback",
|
|
58
60
|
// Bookmarks
|
|
59
61
|
BOOKMARKS_GET: "bookmarks:get",
|
|
60
62
|
BOOKMARKS_UPDATE: "bookmarks:update",
|
|
@@ -125,6 +127,7 @@ const Channels = {
|
|
|
125
127
|
FIND_IN_PAGE_RESULT: "find:result",
|
|
126
128
|
// Browsing history
|
|
127
129
|
HISTORY_GET: "history:get",
|
|
130
|
+
HISTORY_LIST: "history:list",
|
|
128
131
|
HISTORY_SEARCH: "history:search",
|
|
129
132
|
HISTORY_CLEAR: "history:clear",
|
|
130
133
|
HISTORY_UPDATE: "history:update",
|
|
@@ -211,6 +214,10 @@ const Channels = {
|
|
|
211
214
|
CODEX_CANCEL_AUTH: "codex:cancel-auth",
|
|
212
215
|
CODEX_AUTH_STATUS: "codex:auth-status",
|
|
213
216
|
CODEX_DISCONNECT: "codex:disconnect",
|
|
217
|
+
// OpenRouter OAuth
|
|
218
|
+
OPENROUTER_START_AUTH: "openrouter:start-auth",
|
|
219
|
+
OPENROUTER_CANCEL_AUTH: "openrouter:cancel-auth",
|
|
220
|
+
OPENROUTER_AUTH_STATUS: "openrouter:auth-status",
|
|
214
221
|
// Updates
|
|
215
222
|
UPDATES_CHECK: "updates:check",
|
|
216
223
|
UPDATES_OPEN_DOWNLOAD: "updates:open-download",
|
|
@@ -398,6 +405,9 @@ const api = {
|
|
|
398
405
|
return () => electron.ipcRenderer.removeListener(Channels.SETTINGS_UPDATE, handler);
|
|
399
406
|
}
|
|
400
407
|
},
|
|
408
|
+
support: {
|
|
409
|
+
submitFeedback: (email, message) => electron.ipcRenderer.invoke(Channels.SUPPORT_SUBMIT_FEEDBACK, email, message)
|
|
410
|
+
},
|
|
401
411
|
bookmarks: {
|
|
402
412
|
get: () => electron.ipcRenderer.invoke(Channels.BOOKMARKS_GET),
|
|
403
413
|
saveBookmark: (url, title, folderId, note, intent, expectedContent, keyFields, agentHints) => electron.ipcRenderer.invoke(
|
|
@@ -457,6 +467,7 @@ const api = {
|
|
|
457
467
|
},
|
|
458
468
|
history: {
|
|
459
469
|
get: () => electron.ipcRenderer.invoke(Channels.HISTORY_GET),
|
|
470
|
+
list: (offset, limit) => electron.ipcRenderer.invoke(Channels.HISTORY_LIST, offset, limit),
|
|
460
471
|
search: (query) => electron.ipcRenderer.invoke(Channels.HISTORY_SEARCH, query),
|
|
461
472
|
clear: () => electron.ipcRenderer.invoke(Channels.HISTORY_CLEAR),
|
|
462
473
|
exportHtml: () => electron.ipcRenderer.invoke(Channels.HISTORY_EXPORT_HTML),
|
|
@@ -610,6 +621,15 @@ const api = {
|
|
|
610
621
|
electron.ipcRenderer.on(Channels.CODEX_AUTH_STATUS, handler);
|
|
611
622
|
return () => electron.ipcRenderer.removeListener(Channels.CODEX_AUTH_STATUS, handler);
|
|
612
623
|
}
|
|
624
|
+
},
|
|
625
|
+
openrouter: {
|
|
626
|
+
startAuth: () => electron.ipcRenderer.invoke(Channels.OPENROUTER_START_AUTH),
|
|
627
|
+
cancelAuth: () => electron.ipcRenderer.invoke(Channels.OPENROUTER_CANCEL_AUTH),
|
|
628
|
+
onAuthStatus: (cb) => {
|
|
629
|
+
const handler = (_, payload) => cb(payload);
|
|
630
|
+
electron.ipcRenderer.on(Channels.OPENROUTER_AUTH_STATUS, handler);
|
|
631
|
+
return () => electron.ipcRenderer.removeListener(Channels.OPENROUTER_AUTH_STATUS, handler);
|
|
632
|
+
}
|
|
613
633
|
}
|
|
614
634
|
};
|
|
615
635
|
electron.contextBridge.exposeInMainWorld("vessel", api);
|
|
@@ -2282,14 +2282,41 @@
|
|
|
2282
2282
|
transform var(--duration-fast) var(--ease-out-expo);
|
|
2283
2283
|
}
|
|
2284
2284
|
|
|
2285
|
-
.command-bar-no-provider-btn:hover {
|
|
2285
|
+
.command-bar-no-provider-btn:hover:not(:disabled) {
|
|
2286
2286
|
background: var(--button-primary-hover-bg);
|
|
2287
2287
|
}
|
|
2288
2288
|
|
|
2289
|
-
.command-bar-no-provider-btn:active {
|
|
2289
|
+
.command-bar-no-provider-btn:active:not(:disabled) {
|
|
2290
2290
|
transform: scale(0.97);
|
|
2291
2291
|
}
|
|
2292
2292
|
|
|
2293
|
+
.command-bar-no-provider-btn:disabled {
|
|
2294
|
+
opacity: 0.65;
|
|
2295
|
+
cursor: wait;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
.command-bar-no-provider-link {
|
|
2299
|
+
height: 32px;
|
|
2300
|
+
margin-left: 8px;
|
|
2301
|
+
padding: 0 10px;
|
|
2302
|
+
border: 1px solid var(--border-subtle);
|
|
2303
|
+
border-radius: var(--radius-md);
|
|
2304
|
+
background: transparent;
|
|
2305
|
+
color: var(--text-secondary);
|
|
2306
|
+
font-size: 12px;
|
|
2307
|
+
cursor: pointer;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
.command-bar-no-provider-link:hover {
|
|
2311
|
+
color: var(--text-primary);
|
|
2312
|
+
border-color: var(--border-visible);
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
.command-bar-no-provider-error {
|
|
2316
|
+
color: var(--status-error) !important;
|
|
2317
|
+
margin-top: 10px !important;
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2293
2320
|
.command-bar-no-provider-btn kbd {
|
|
2294
2321
|
margin-left: 6px;
|
|
2295
2322
|
background: color-mix(in srgb, var(--bg-primary) 15%, transparent);
|