chromeflow 0.1.4 → 0.1.5
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/dist/index.js +1 -1
- package/dist/tools/highlight.js +13 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
package/dist/tools/highlight.js
CHANGED
|
@@ -8,14 +8,18 @@ function registerHighlightTools(server, bridge) {
|
|
|
8
8
|
"Visible text of the element or text near it (e.g. 'API Keys', 'Create account')"
|
|
9
9
|
),
|
|
10
10
|
message: z.string().describe(
|
|
11
|
-
"Instruction to show the user in the callout (e.g. 'Click here to create your API key')"
|
|
11
|
+
"Instruction to show the user in the callout (e.g. 'Click here to create your API key'). When the user needs to type something, use a short instruction like 'Type this in the field:' and pass the text as valueToType."
|
|
12
|
+
),
|
|
13
|
+
valueToType: z.string().optional().describe(
|
|
14
|
+
"When the user needs to type something, pass the exact text here. It will be shown prominently in the callout so the user knows exactly what to enter."
|
|
12
15
|
)
|
|
13
16
|
},
|
|
14
|
-
async ({ text, message }) => {
|
|
17
|
+
async ({ text, message, valueToType }) => {
|
|
15
18
|
const response = await bridge.request({
|
|
16
19
|
type: "find_highlight",
|
|
17
20
|
text,
|
|
18
|
-
message
|
|
21
|
+
message,
|
|
22
|
+
valueToType
|
|
19
23
|
});
|
|
20
24
|
if (response.type !== "find_highlight_response") {
|
|
21
25
|
throw new Error("Unexpected response from extension");
|
|
@@ -39,11 +43,14 @@ function registerHighlightTools(server, bridge) {
|
|
|
39
43
|
width: z.number().describe("Width of the region in CSS pixels"),
|
|
40
44
|
height: z.number().describe("Height of the region in CSS pixels"),
|
|
41
45
|
message: z.string().describe(
|
|
42
|
-
"Instruction to show the user in the callout
|
|
46
|
+
"Instruction to show the user in the callout. When the user needs to type something, use a short instruction like 'Type this in the field:' and pass the text as valueToType."
|
|
47
|
+
),
|
|
48
|
+
valueToType: z.string().optional().describe(
|
|
49
|
+
"When the user needs to type something, pass the exact text here. It will be shown prominently in the callout so the user knows exactly what to enter."
|
|
43
50
|
)
|
|
44
51
|
},
|
|
45
|
-
async ({ x, y, width, height, message }) => {
|
|
46
|
-
await bridge.request({ type: "highlight_region", x, y, width, height, message });
|
|
52
|
+
async ({ x, y, width, height, message, valueToType }) => {
|
|
53
|
+
await bridge.request({ type: "highlight_region", x, y, width, height, message, valueToType });
|
|
47
54
|
return {
|
|
48
55
|
content: [
|
|
49
56
|
{
|
package/package.json
CHANGED