dsh-browser-cdp 0.18.7 → 0.18.9

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.18.7",
5
+ "version": "0.18.9",
6
6
  "manifestVersion": "0.15",
7
7
  "facets": {
8
8
  "host": {
package/lib/client.js CHANGED
@@ -193,7 +193,9 @@ function bindSnapshotSelector(source) {
193
193
  const inject = [
194
194
  "slots",
195
195
  "locale",
196
- "connection"
196
+ "connection",
197
+ "sessions",
198
+ "conversation"
197
199
  ];
198
200
  var _egoLocale = (function() {
199
201
  try {
@@ -3182,11 +3184,26 @@ function mountComposerDecoration(ctx) {
3182
3184
  return el;
3183
3185
  }
3184
3186
  function composerEl() {
3185
- var el = document.querySelector("[data-composer-input]");
3186
- if (!el) el = document.querySelector("[data-composer-input] [contenteditable=\"true\"]");
3187
- if (!el) el = document.querySelector("[contenteditable=\"true\"]");
3188
- if (!el) el = document.querySelector("textarea");
3189
- return el;
3187
+ var selectors = [
3188
+ "[data-composer-input]",
3189
+ "[contenteditable=\"true\"]",
3190
+ "textarea"
3191
+ ];
3192
+ for (var s = 0; s < selectors.length; s++) {
3193
+ var list = document.querySelectorAll(selectors[s]);
3194
+ var best = null, bestBottom = -1;
3195
+ for (var i = 0; i < list.length; i++) {
3196
+ var r = list[i].getBoundingClientRect();
3197
+ if (r.width < 120 || r.height < 32) continue;
3198
+ if (r.top > window.innerHeight || r.bottom < 0) continue;
3199
+ if (r.bottom > bestBottom) {
3200
+ bestBottom = r.bottom;
3201
+ best = list[i];
3202
+ }
3203
+ }
3204
+ if (best) return best;
3205
+ }
3206
+ return null;
3190
3207
  }
3191
3208
  function render(pageTitle, endpoint, elements) {
3192
3209
  var comp = composerEl();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-browser-cdp",
3
- "version": "0.18.7",
3
+ "version": "0.18.9",
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",