dsh-browser-cdp 0.18.14 โ 0.18.15
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/dsh-plugin.json +1 -1
- package/lib/client.js +60 -1
- package/package.json +1 -1
package/dsh-plugin.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -1857,6 +1857,7 @@ function apply(ctx) {
|
|
|
1857
1857
|
mountFamilySettingsCard(ctx);
|
|
1858
1858
|
mountPluginsPageCard(ctx);
|
|
1859
1859
|
mountPicksDockCard(ctx);
|
|
1860
|
+
mountPicksBadge(ctx);
|
|
1860
1861
|
var betterSidebarService;
|
|
1861
1862
|
try {
|
|
1862
1863
|
betterSidebarService = typeof ctx.get === "function" ? ctx.get("betterSidebar") : void 0;
|
|
@@ -3213,6 +3214,59 @@ function CdpPicksDockCard(props) {
|
|
|
3213
3214
|
}, head, chips);
|
|
3214
3215
|
}));
|
|
3215
3216
|
}
|
|
3217
|
+
function CdpPicksBadge(props) {
|
|
3218
|
+
var h = React.createElement;
|
|
3219
|
+
var setTick = React.useState(0)[1];
|
|
3220
|
+
React.useEffect(function() {
|
|
3221
|
+
var timer = window.setInterval(function() {
|
|
3222
|
+
setTick(function(n) {
|
|
3223
|
+
return n + 1;
|
|
3224
|
+
});
|
|
3225
|
+
}, 1e3);
|
|
3226
|
+
return function() {
|
|
3227
|
+
window.clearInterval(timer);
|
|
3228
|
+
};
|
|
3229
|
+
}, []);
|
|
3230
|
+
var refs = [];
|
|
3231
|
+
try {
|
|
3232
|
+
if (props && props.sessionId !== void 0 && props.sessionId !== null ? String(props.sessionId) : null) {
|
|
3233
|
+
var draft = typeof props.getDraft === "function" ? String(props.getDraft() || "") : "";
|
|
3234
|
+
var countRefs = (draft.match(/\[(?:๐ )?CDP-PICKS/g) || []).length;
|
|
3235
|
+
var refRe2 = /\[๐ CDP-PICKS โ ([^\s|]+) \| ([^|]*) \| ([^|]*) \| elements:(\d+)[^\]]*\]/g;
|
|
3236
|
+
var mm;
|
|
3237
|
+
while ((mm = refRe2.exec(draft)) !== null) refs.push({
|
|
3238
|
+
file: mm[1],
|
|
3239
|
+
endpoint: mm[2],
|
|
3240
|
+
title: mm[3],
|
|
3241
|
+
count: Number(mm[4])
|
|
3242
|
+
});
|
|
3243
|
+
}
|
|
3244
|
+
} catch (e) {}
|
|
3245
|
+
try {
|
|
3246
|
+
window.__dshBrowserCdpDeco = Object.assign({}, window.__dshBrowserCdpDeco, {
|
|
3247
|
+
badgeRefs: refs.length,
|
|
3248
|
+
blockMarkers: countRefs
|
|
3249
|
+
});
|
|
3250
|
+
} catch (e) {}
|
|
3251
|
+
if (refs.length === 0) return null;
|
|
3252
|
+
return h("div", { className: "dsh-cdp-picks-badges" }, refs.map(function(r, i) {
|
|
3253
|
+
return h("span", {
|
|
3254
|
+
key: r.file,
|
|
3255
|
+
className: "dsh-cdp-picks-badge",
|
|
3256
|
+
title: "๐ " + (r.title || "") + " ยท " + (r.endpoint || "") + " ยท elements:" + r.count
|
|
3257
|
+
}, "๐" + (refs.length > 1 ? " ร" + (i + 1) : ""));
|
|
3258
|
+
}));
|
|
3259
|
+
}
|
|
3260
|
+
function mountPicksBadge(ctx) {
|
|
3261
|
+
ctx.slots.inject("conversation.input.overlay", function() {
|
|
3262
|
+
return ctx.slots.register({
|
|
3263
|
+
name: "conversation.input.overlay",
|
|
3264
|
+
id: "dsh-browser-cdp.picks-badge",
|
|
3265
|
+
order: 110,
|
|
3266
|
+
label: "dsh-browser-cdp picks badge"
|
|
3267
|
+
}, CdpPicksBadge);
|
|
3268
|
+
}, "dsh-browser-cdp: picks badge");
|
|
3269
|
+
}
|
|
3216
3270
|
function mountPicksDockCard(ctx) {
|
|
3217
3271
|
injectPickCardStyles();
|
|
3218
3272
|
try {
|
|
@@ -3232,7 +3286,12 @@ function mountPicksDockCard(ctx) {
|
|
|
3232
3286
|
} catch (e) {
|
|
3233
3287
|
input = null;
|
|
3234
3288
|
}
|
|
3235
|
-
return {
|
|
3289
|
+
return {
|
|
3290
|
+
input,
|
|
3291
|
+
getDraft: function() {
|
|
3292
|
+
return readDraftText(input);
|
|
3293
|
+
}
|
|
3294
|
+
};
|
|
3236
3295
|
}
|
|
3237
3296
|
}, CdpPicksDockCard);
|
|
3238
3297
|
}, "dsh-browser-cdp: picks dock card");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-browser-cdp",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.15",
|
|
4
4
|
"description": "dsh-browser-cdp: DSH browser plugin โ attach to a running Chrome/Edge over CDP (no bundled browser needed); structured browser-automation tools (30+ bcdp_*) that drive the vendored ego runtime through ctx.subprocess, plus a realtime watch panel (live SSE screencast + direct mouse interaction + download capture + human-verification notice). Web shell: floating watch panel without dsh-better-sidebar, sidebar tab with it. Headless/TUI hosts: tools-only. [DSH 0.2.0-rc.1+ line: declarative settings via Config .volatile() fields; for DSH 0.1.2-rc.1 ~ 0.1.7 use the 0.17.x line]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|