@botdojo/chat-sdk 0.0.14 → 0.0.15

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/lib/index.js CHANGED
@@ -9140,28 +9140,22 @@ var BotDojoChat = ({
9140
9140
  return { error: (e == null ? void 0 : e.message) || "modelContext getContent error" };
9141
9141
  }
9142
9142
  };
9143
- console.log("[BotDojoChat] sandbox-resource: Trying connector first...");
9144
- const connectorResult = await tryConnector();
9145
- console.log("[BotDojoChat] sandbox-resource: tryConnector result:", connectorResult.html ? `got HTML (${connectorResult.html.length} chars)` : connectorResult.error);
9146
- if (connectorResult.html) {
9147
- console.log("[BotDojoChat] sandbox-resource: Using connector result");
9148
- return {
9149
- html: connectorResult.html,
9150
- sandbox: connectorResult.sandbox || canvasEvent.sandbox,
9151
- csp: connectorResult.csp
9152
- };
9153
- }
9154
- console.log("[BotDojoChat] sandbox-resource: Connector failed, trying modelContext...");
9155
9143
  const mcResult = await tryModelContext();
9156
- console.log("[BotDojoChat] sandbox-resource: tryModelContext result:", mcResult.html ? `got HTML (${mcResult.html.length} chars)` : mcResult.error);
9157
9144
  if (mcResult.html) {
9158
- console.log("[BotDojoChat] sandbox-resource: Using modelContext result");
9159
9145
  return {
9160
9146
  html: mcResult.html,
9161
9147
  sandbox: mcResult.sandbox || canvasEvent.sandbox,
9162
9148
  csp: mcResult.csp
9163
9149
  };
9164
9150
  }
9151
+ const connectorResult = await tryConnector();
9152
+ if (connectorResult.html) {
9153
+ return {
9154
+ html: connectorResult.html,
9155
+ sandbox: connectorResult.sandbox || canvasEvent.sandbox,
9156
+ csp: connectorResult.csp
9157
+ };
9158
+ }
9165
9159
  return { ok: false, error: connectorResult.error || mcResult.error || "sandbox-resource failed" };
9166
9160
  }
9167
9161
  const handlerPromises = [];