mitra-interactions-sdk 1.0.60-beta.38 → 1.0.60-beta.39

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
@@ -1011,11 +1011,11 @@ function getGatewayOrigin() {
1011
1011
  return new URL(config.baseURL).origin;
1012
1012
  }
1013
1013
  function getTaskHttpBase() {
1014
- const token = getRawToken();
1015
- if (!hasAppScope(token)) {
1016
- throw new Error("Agent Chat: o token configurado \xE9 uma sess\xE3o do console (sem app_id) \u2014 o canal HTTP do copilot exige token de app. Fa\xE7a loginMitra({ projectId }).");
1014
+ const config = getConfig();
1015
+ if (!config.baseURL) {
1016
+ throw new Error("Agent Chat: baseURL n\xE3o configurada. Configure via configureSdkMitra({ baseURL }).");
1017
1017
  }
1018
- return `${getGatewayOrigin()}/copilot/api/v1/tasks`;
1018
+ return `${config.baseURL.replace(/\/+$/, "")}/agentAiShortcut/tasks`;
1019
1019
  }
1020
1020
  function getTaskWsUrl(taskId) {
1021
1021
  const token = getRawToken();