@nexface/chat 0.1.15-alpha.10 → 0.1.15-alpha.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/dist/client.js +13 -1
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -842,7 +842,19 @@ class ChatClientImplementation {
|
|
|
842
842
|
try {
|
|
843
843
|
if (!action || typeof action.toolCallId !== "string" || !action.definition)
|
|
844
844
|
throw new Error("Invalid browser action.");
|
|
845
|
-
const tool = catalog.find((item) =>
|
|
845
|
+
const tool = catalog.find((item) => {
|
|
846
|
+
const definition = action.definition;
|
|
847
|
+
if (["nxf_getSnapshot", "nxf_executeAction", "nxf_applyAction"].includes(item.definition.name)) {
|
|
848
|
+
if (typeof definition.description !== "string" || !definition.description.trim())
|
|
849
|
+
return false;
|
|
850
|
+
return (JSON.stringify(item.definition) ===
|
|
851
|
+
JSON.stringify({
|
|
852
|
+
...definition,
|
|
853
|
+
description: item.definition.description,
|
|
854
|
+
}));
|
|
855
|
+
}
|
|
856
|
+
return JSON.stringify(item.definition) === JSON.stringify(definition);
|
|
857
|
+
});
|
|
846
858
|
if (!tool || !this.runtime.getTools().includes(tool))
|
|
847
859
|
throw new ClientError("TOOL_CONFIRMATION_INVALIDATED", "The original Tool Binding is no longer available.");
|
|
848
860
|
const errors = validateAgentToolInput(tool.definition.inputSchema, action.input);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexface/chat",
|
|
3
|
-
"version": "0.1.15-alpha.
|
|
3
|
+
"version": "0.1.15-alpha.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"./dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@ag-ui/core": "0.0.59",
|
|
21
|
-
"@nexface/agent": "0.1.15-alpha.
|
|
21
|
+
"@nexface/agent": "0.1.15-alpha.11",
|
|
22
22
|
"class-variance-authority": "0.7.1",
|
|
23
23
|
"clsx": "2.1.1",
|
|
24
24
|
"fast-json-patch": "3.1.1",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"use-sync-external-store": "1.7.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@nexface/tools": "0.1.15-alpha.
|
|
30
|
+
"@nexface/tools": "0.1.15-alpha.11",
|
|
31
31
|
"react": ">=17",
|
|
32
32
|
"react-dom": ">=17"
|
|
33
33
|
},
|