@copilotkit/runtime 1.51.0-next.4 → 1.51.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.mjs CHANGED
@@ -65,7 +65,7 @@ var require_package = __commonJS({
65
65
  publishConfig: {
66
66
  access: "public"
67
67
  },
68
- version: "1.51.0-next.4",
68
+ version: "1.51.1",
69
69
  sideEffects: false,
70
70
  main: "./dist/index.js",
71
71
  module: "./dist/index.mjs",
@@ -3584,7 +3584,7 @@ var CopilotRuntime = class {
3584
3584
  } : {},
3585
3585
  "cloud.base_url": cloudBaseUrl
3586
3586
  });
3587
- (_c = params == null ? void 0 : params.beforeRequestMiddleware) == null ? void 0 : _c.call(params, hookParams);
3587
+ const middlewareResult = await ((_c = params == null ? void 0 : params.beforeRequestMiddleware) == null ? void 0 : _c.call(params, hookParams));
3588
3588
  if ((_d = params == null ? void 0 : params.middleware) == null ? void 0 : _d.onBeforeRequest) {
3589
3589
  const { request: request2, runtime, path } = hookParams;
3590
3590
  const gqlMessages = aguiToGQL(body.messages).reduce((acc, msg) => {
@@ -3607,6 +3607,7 @@ var CopilotRuntime = class {
3607
3607
  url: request2.url
3608
3608
  });
3609
3609
  }
3610
+ return middlewareResult;
3610
3611
  };
3611
3612
  }
3612
3613
  createOnAfterRequestHandler(params) {