local-operator-ui 0.32.10 → 0.32.11
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/out/main/index.js +19 -6
- package/package.json +1 -1
package/out/main/index.js
CHANGED
|
@@ -19524,16 +19524,22 @@ const FOCUS_AND_SELECT_FUNCTION = `function () {
|
|
|
19524
19524
|
}
|
|
19525
19525
|
}`;
|
|
19526
19526
|
const SET_VALUE_FUNCTION = `function (text) {
|
|
19527
|
-
const focusFn = this.focus;
|
|
19528
|
-
if (typeof focusFn === 'function') focusFn.call(this);
|
|
19529
19527
|
if (this.isContentEditable) {
|
|
19528
|
+
const focusFn = this.focus;
|
|
19529
|
+
if (typeof focusFn === 'function') focusFn.call(this);
|
|
19530
19530
|
this.textContent = text;
|
|
19531
19531
|
this.dispatchEvent(new Event('input', { bubbles: true }));
|
|
19532
19532
|
return this.textContent;
|
|
19533
19533
|
}
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19534
|
+
let setter = null;
|
|
19535
|
+
for (let proto = Object.getPrototypeOf(this); proto && !setter; proto = Object.getPrototypeOf(proto)) {
|
|
19536
|
+
const descriptor = Object.getOwnPropertyDescriptor(proto, 'value');
|
|
19537
|
+
if (descriptor && typeof descriptor.set === 'function') setter = descriptor.set;
|
|
19538
|
+
}
|
|
19539
|
+
if (!setter) return null;
|
|
19540
|
+
const focusFn = this.focus;
|
|
19541
|
+
if (typeof focusFn === 'function') focusFn.call(this);
|
|
19542
|
+
setter.call(this, text);
|
|
19537
19543
|
this.dispatchEvent(new Event('input', { bubbles: true }));
|
|
19538
19544
|
this.dispatchEvent(new Event('change', { bubbles: true }));
|
|
19539
19545
|
return this.value;
|
|
@@ -19652,9 +19658,16 @@ async function type(ctx, params) {
|
|
|
19652
19658
|
returnByValue: true
|
|
19653
19659
|
}
|
|
19654
19660
|
);
|
|
19661
|
+
const setValue = set2?.result?.value;
|
|
19662
|
+
if (setValue === null) {
|
|
19663
|
+
throw new BridgeCommandError(
|
|
19664
|
+
"element_not_found",
|
|
19665
|
+
`${targetOf(params)} is not an editable field (no value setter, not contenteditable), so nothing was typed; if the field lives inside an iframe, it cannot be targeted from the top document`
|
|
19666
|
+
);
|
|
19667
|
+
}
|
|
19655
19668
|
ctx.registry.touch(record);
|
|
19656
19669
|
return {
|
|
19657
|
-
value: String(
|
|
19670
|
+
value: String(setValue ?? readBack2),
|
|
19658
19671
|
via: "value_setter",
|
|
19659
19672
|
insert_text_readback: readBack2,
|
|
19660
19673
|
...pageOf(record.view)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.11",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|