@xpert-ai/chatkit-ui5 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.
package/dist/index.js CHANGED
@@ -2405,6 +2405,38 @@ class ChatKitElementBase extends (_c = HTMLElement, _focusComposer_dec = [requir
2405
2405
  }
2406
2406
  return onClientTool({ name, params, id, tool_call_id });
2407
2407
  },
2408
+ onToolOutputAttachmentPreview: async (request) => {
2409
+ var _a2, _b2;
2410
+ const onRequestPreview = (_b2 = (_a2 = __privateGet(this, _opts)) == null ? void 0 : _a2.toolOutputAttachments) == null ? void 0 : _b2.onRequestPreview;
2411
+ if (!onRequestPreview) {
2412
+ __privateMethod(this, _ChatKitElementBase_instances, emitAndThrow_fn).call(this, new IntegrationError2(
2413
+ "No handler for tool-output attachment previews. Add toolOutputAttachments.onRequestPreview to your ChatKit options."
2414
+ ));
2415
+ }
2416
+ return onRequestPreview(request);
2417
+ },
2418
+ onWorkbenchClientCommand: async ({
2419
+ commandKey,
2420
+ payload,
2421
+ hostType,
2422
+ hostId,
2423
+ viewKey
2424
+ }) => {
2425
+ var _a2, _b2;
2426
+ const onClientCommand = (_b2 = (_a2 = __privateGet(this, _opts)) == null ? void 0 : _a2.workbench) == null ? void 0 : _b2.onClientCommand;
2427
+ if (!onClientCommand) {
2428
+ __privateMethod(this, _ChatKitElementBase_instances, emitAndThrow_fn).call(this, new IntegrationError2(
2429
+ `No handler for workbench client command "${commandKey}". Add workbench.onClientCommand to your ChatKit options.`
2430
+ ));
2431
+ }
2432
+ return onClientCommand({
2433
+ commandKey,
2434
+ payload,
2435
+ hostType,
2436
+ hostId,
2437
+ viewKey
2438
+ });
2439
+ },
2408
2440
  onWidgetAction: async ({
2409
2441
  action,
2410
2442
  widgetItem