@xpert-ai/chatkit-web-component 0.4.0 → 0.4.1
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.
|
@@ -2654,6 +2654,28 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
2654
2654
|
}
|
|
2655
2655
|
return onClientTool({ name, params, id, tool_call_id });
|
|
2656
2656
|
},
|
|
2657
|
+
onWorkbenchClientCommand: async ({
|
|
2658
|
+
commandKey,
|
|
2659
|
+
payload,
|
|
2660
|
+
hostType,
|
|
2661
|
+
hostId,
|
|
2662
|
+
viewKey
|
|
2663
|
+
}) => {
|
|
2664
|
+
var _a2, _b2;
|
|
2665
|
+
const onClientCommand = (_b2 = (_a2 = __privateGet(this, _opts)) == null ? void 0 : _a2.workbench) == null ? void 0 : _b2.onClientCommand;
|
|
2666
|
+
if (!onClientCommand) {
|
|
2667
|
+
__privateMethod(this, _ChatKitElementBase_instances, emitAndThrow_fn).call(this, new IntegrationError(
|
|
2668
|
+
`No handler for workbench client command "${commandKey}". Add workbench.onClientCommand to your ChatKit options.`
|
|
2669
|
+
));
|
|
2670
|
+
}
|
|
2671
|
+
return onClientCommand({
|
|
2672
|
+
commandKey,
|
|
2673
|
+
payload,
|
|
2674
|
+
hostType,
|
|
2675
|
+
hostId,
|
|
2676
|
+
viewKey
|
|
2677
|
+
});
|
|
2678
|
+
},
|
|
2657
2679
|
onWidgetAction: async ({
|
|
2658
2680
|
action,
|
|
2659
2681
|
widgetItem
|