@copilotkit/runtime 1.51.3-next.5 → 1.51.3-next.6
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/CHANGELOG.md +9 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/lib/runtime/copilot-runtime.ts +6 -2
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.3-next.
|
|
68
|
+
version: "1.51.3-next.6",
|
|
69
69
|
sideEffects: false,
|
|
70
70
|
main: "./dist/index.js",
|
|
71
71
|
module: "./dist/index.mjs",
|
|
@@ -3573,7 +3573,7 @@ var CopilotRuntime = class {
|
|
|
3573
3573
|
const { request } = hookParams;
|
|
3574
3574
|
const publicApiKey = request.headers.get("x-copilotcloud-public-api-key");
|
|
3575
3575
|
const body = await readBody(request);
|
|
3576
|
-
const forwardedProps = body.forwardedProps;
|
|
3576
|
+
const forwardedProps = body == null ? void 0 : body.forwardedProps;
|
|
3577
3577
|
const cloudBaseUrl = process.env.COPILOT_CLOUD_BASE_URL || "https://api.cloud.copilotkit.ai";
|
|
3578
3578
|
telemetry_client_default.capture("oss.runtime.copilot_request_created", {
|
|
3579
3579
|
"cloud.guardrails.enabled": ((_a = forwardedProps == null ? void 0 : forwardedProps.cloud) == null ? void 0 : _a.guardrails) !== void 0,
|
|
@@ -3584,6 +3584,8 @@ var CopilotRuntime = class {
|
|
|
3584
3584
|
} : {},
|
|
3585
3585
|
"cloud.base_url": cloudBaseUrl
|
|
3586
3586
|
});
|
|
3587
|
+
if (request.method === "GET" || !body)
|
|
3588
|
+
return;
|
|
3587
3589
|
const middlewareResult = await ((_c = params == null ? void 0 : params.beforeRequestMiddleware) == null ? void 0 : _c.call(params, hookParams));
|
|
3588
3590
|
if ((_d = params == null ? void 0 : params.middleware) == null ? void 0 : _d.onBeforeRequest) {
|
|
3589
3591
|
const { request: request2, runtime, path } = hookParams;
|