@sinequa/assistant 3.8.0 → 3.8.2

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.
@@ -723,6 +723,7 @@ const connectionSettingsSchema = z.object({
723
723
  connectionErrorMessage: z.string(),
724
724
  restEndpoint: z.string().optional(),
725
725
  websocketEndpoint: z.string().optional(),
726
+ signalRSkipNegotiation: z.boolean().optional(),
726
727
  signalRTransport: z.enum(["WebSockets", "ServerSentEvents", "LongPolling", "None"]),
727
728
  signalRLogLevel: z.enum(["Critical", "Debug", "Error", "Information", "None", "Trace", "Warning"]),
728
729
  signalRServerTimeoutInMilliseconds: z.number().optional()
@@ -2018,6 +2019,8 @@ class WebSocketChatService extends ChatService {
2018
2019
  return;
2019
2020
  }
2020
2021
  const logLevel = this._getLogLevel();
2022
+ if (this.assistantConfig$.value?.connectionSettings.signalRSkipNegotiation === true)
2023
+ options = { ...options, skipNegotiation: true };
2021
2024
  this.connection = this.signalRService.buildConnection(this.REQUEST_URL, { ...this.defaultOptions, ...options }, logLevel, true);
2022
2025
  const signalRServerTimeoutInMilliseconds = this.assistantConfig$.value?.connectionSettings.signalRServerTimeoutInMilliseconds;
2023
2026
  if (signalRServerTimeoutInMilliseconds) {
@@ -2089,6 +2092,7 @@ class WebSocketChatService extends ChatService {
2089
2092
  transport: this._getTransports(),
2090
2093
  withCredentials: true,
2091
2094
  headers,
2095
+ skipNegotiation: false,
2092
2096
  accessTokenFactory: () => this.authenticationService.processedCredentials?.data?.csrfToken || ""
2093
2097
  };
2094
2098
  }