dsh-browser-cdp 0.17.17 โ†’ 0.17.18

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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
3
3
  "id": "dsh-browser-cdp",
4
4
  "name": "dsh-browser-cdp",
5
- "version": "0.17.17",
5
+ "version": "0.17.18",
6
6
  "manifestVersion": "0.15",
7
7
  "facets": {
8
8
  "host": {
package/lib/client.js CHANGED
@@ -3065,6 +3065,7 @@ function apply(ctx) {
3065
3065
  mountFamilySettingsCard(ctx);
3066
3066
  mountPluginsPageCard(ctx);
3067
3067
  mountPicksDockCard(ctx);
3068
+ mountPicksBadge(ctx);
3068
3069
  var betterSidebarService;
3069
3070
  try {
3070
3071
  betterSidebarService = typeof ctx.get === "function" ? ctx.get("betterSidebar") : void 0;
@@ -4421,6 +4422,55 @@ function CdpPicksDockCard(props) {
4421
4422
  }, head, chips);
4422
4423
  }));
4423
4424
  }
4425
+ function CdpPicksBadge(props) {
4426
+ var h = React.createElement;
4427
+ var setTick = React.useState(0)[1];
4428
+ React.useEffect(function() {
4429
+ var timer = window.setInterval(function() {
4430
+ setTick(function(n) {
4431
+ return n + 1;
4432
+ });
4433
+ }, 1e3);
4434
+ return function() {
4435
+ window.clearInterval(timer);
4436
+ };
4437
+ }, []);
4438
+ var refs = [];
4439
+ try {
4440
+ if (props && props.sessionId !== void 0 && props.sessionId !== null ? String(props.sessionId) : null) {
4441
+ var draft = typeof props.getDraft === "function" ? String(props.getDraft() || "") : "";
4442
+ var refRe = /\[๐ŸŒ CDP-PICKS โ†’ ([^\s|]+) \| ([^|]*) \| ([^|]*) \| elements:(\d+)[^\]]*\]/g;
4443
+ var mm;
4444
+ while ((mm = refRe.exec(draft)) !== null) refs.push({
4445
+ file: mm[1],
4446
+ endpoint: mm[2],
4447
+ title: mm[3],
4448
+ count: Number(mm[4])
4449
+ });
4450
+ }
4451
+ } catch (e) {}
4452
+ try {
4453
+ window.__dshBrowserCdpDeco = Object.assign({}, window.__dshBrowserCdpDeco, { badgeRefs: refs.length });
4454
+ } catch (e) {}
4455
+ if (refs.length === 0) return null;
4456
+ return h("div", { className: "dsh-cdp-picks-badges" }, refs.map(function(r, i) {
4457
+ return h("span", {
4458
+ key: r.file,
4459
+ className: "dsh-cdp-picks-badge",
4460
+ title: "๐ŸŒ " + (r.title || "") + " ยท " + (r.endpoint || "") + " ยท elements:" + r.count
4461
+ }, "๐ŸŒ" + (refs.length > 1 ? " " + (i + 1) : ""));
4462
+ }));
4463
+ }
4464
+ function mountPicksBadge(ctx) {
4465
+ ctx.slots.inject("conversation.input.overlay", function() {
4466
+ return ctx.slots.register({
4467
+ name: "conversation.input.overlay",
4468
+ id: "dsh-browser-cdp.picks-badge",
4469
+ order: 110,
4470
+ label: "dsh-browser-cdp picks badge"
4471
+ }, CdpPicksBadge);
4472
+ }, "dsh-browser-cdp: picks badge");
4473
+ }
4424
4474
  function mountPicksDockCard(ctx) {
4425
4475
  injectPickCardStyles();
4426
4476
  try {
@@ -4440,7 +4490,12 @@ function mountPicksDockCard(ctx) {
4440
4490
  } catch (e) {
4441
4491
  input = null;
4442
4492
  }
4443
- return { input };
4493
+ return {
4494
+ input,
4495
+ getDraft: function() {
4496
+ return readDraftText(input);
4497
+ }
4498
+ };
4444
4499
  }
4445
4500
  }, CdpPicksDockCard);
4446
4501
  }, "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.17.17",
3
+ "version": "0.17.18",
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.1.7+ line: declarative settings via Config .volatile() fields; for DSH 0.1.2-rc.1 ~ 0.1.6 use the 0.16.x line]",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",