@copilotkit/core 1.59.4 → 1.59.5-canary.1781104893

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.umd.js CHANGED
@@ -956,9 +956,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
956
956
  if (this.transport === "single") {
957
957
  if (!this.singleEndpointUrl) throw new Error("Single endpoint transport requires a runtimeUrl");
958
958
  const requestInit = this.createSingleRouteRequestInit(input, "agent/connect", { agentId: routedId });
959
- return withAbortErrorHandling((0, _ag_ui_client.transformHttpEventStream)((0, _ag_ui_client.runHttpRequest)(this.singleEndpointUrl, requestInit)));
959
+ return withAbortErrorHandling((0, _ag_ui_client.transformHttpEventStream)((0, _ag_ui_client.runHttpRequest)(() => this.fetch(this.singleEndpointUrl, requestInit))));
960
960
  }
961
- return withAbortErrorHandling((0, _ag_ui_client.transformHttpEventStream)((0, _ag_ui_client.runHttpRequest)(`${this.runtimeUrl}/agent/${routedId}/connect`, this.requestInit(input))));
961
+ const connectUrl = `${this.runtimeUrl}/agent/${routedId}/connect`;
962
+ const connectRequestInit = this.requestInit(input);
963
+ return withAbortErrorHandling((0, _ag_ui_client.transformHttpEventStream)((0, _ag_ui_client.runHttpRequest)(() => this.fetch(connectUrl, connectRequestInit))));
962
964
  }
963
965
  function _runViaDelegate(input) {
964
966
  return (0, rxjs.defer)(() => (0, rxjs.from)(this.resolveDelegate())).pipe((0, rxjs_operators.switchMap)((delegate) => withAbortErrorHandling(delegate.run(input))));
@@ -967,7 +969,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
967
969
  if (this.transport === "single") {
968
970
  if (!this.singleEndpointUrl) throw new Error("Single endpoint transport requires a runtimeUrl");
969
971
  const requestInit = this.createSingleRouteRequestInit(input, "agent/run", { agentId: this.routedAgentId() });
970
- return withAbortErrorHandling((0, _ag_ui_client.transformHttpEventStream)((0, _ag_ui_client.runHttpRequest)(this.singleEndpointUrl, requestInit)));
972
+ return withAbortErrorHandling((0, _ag_ui_client.transformHttpEventStream)((0, _ag_ui_client.runHttpRequest)(() => this.fetch(this.singleEndpointUrl, requestInit))));
971
973
  }
972
974
  return withAbortErrorHandling(_superPropGet(_ProxiedCopilotRuntimeAgent.prototype, "run", this, 2)([input]));
973
975
  }