@syntrologie/adapt-chatbot 2.8.0-canary.263 → 2.8.0-canary.264

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatAssistantLit.d.ts","sourceRoot":"","sources":["../src/ChatAssistantLit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAAE,aAAa,EAAmB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvF,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAuGD,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IACvD;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,kBAAkB,CAAC;IACvD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,GAAE,uBAA4B,GACjC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgHxB;AAqGD,eAAO,MAAM,yBAAyB;qBACnB,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAqXpE,CAAC"}
1
+ {"version":3,"file":"ChatAssistantLit.d.ts","sourceRoot":"","sources":["../src/ChatAssistantLit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAAE,aAAa,EAAmB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvF,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAuGD,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IACvD;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,kBAAkB,CAAC;IACvD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,GAAE,uBAA4B,GACjC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgHxB;AAqGD,eAAO,MAAM,yBAAyB;qBACnB,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAyYpE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ChatAssistantLitMountable,
3
3
  acquireTurnstileToken
4
- } from "./chunk-VA222HQK.js";
4
+ } from "./chunk-SSVUE6E6.js";
5
5
  import "./chunk-UVKRO5ER.js";
6
6
  export {
7
7
  ChatAssistantLitMountable,
@@ -10968,10 +10968,18 @@ var ChatAssistantLitMountable = {
10968
10968
  errorStatus: lastErrorPayload?.status ?? null,
10969
10969
  errorBody: lastErrorPayload?.body ?? null,
10970
10970
  errorMessage: lastErrorPayload?.message ?? null,
10971
- errorName: lastErrorPayload?.errorName ?? null
10971
+ errorName: lastErrorPayload?.errorName ?? null,
10972
+ // Snapshot of the agent backend URL so PostHog queries can group
10973
+ // fallback events by customer environment (demo-api vs
10974
+ // dev-api). Cheap to attach; the SDK already has it in scope.
10975
+ backendUrl: streamUrl
10972
10976
  };
10973
10977
  runtime.events.publish("chatbot.fallback_rendered", payload);
10974
- console.warn("[adaptive-chatbot] fallback rendered", payload);
10978
+ const statusLabel = lastErrorPayload?.status ?? "no-status";
10979
+ console.warn(
10980
+ `[adaptive-chatbot] fallback rendered mountId=${mountId} reason=${reason} botCheck=${botCheckOutcome} errorStatus=${statusLabel} messagesSent=${messagesSent}`,
10981
+ payload
10982
+ );
10975
10983
  transport?.disconnect();
10976
10984
  el.remove();
10977
10985
  container.innerHTML = renderFallbackHtml(chatbotConfig.fallback);
@@ -11016,12 +11024,21 @@ var ChatAssistantLitMountable = {
11016
11024
  errorBody: errEvent.body ?? null,
11017
11025
  errorName: errEvent.errorName ?? null
11018
11026
  });
11019
- console.warn("[adaptive-chatbot] transport error", {
11020
- mountId,
11021
- status: errEvent.status,
11022
- body: errEvent.body,
11023
- hasSucceeded
11024
- });
11027
+ const statusLabel = errEvent.status ?? "no-status";
11028
+ const bodySnippet = errEvent.body ? errEvent.body.slice(0, 120) : "<no-body>";
11029
+ console.warn(
11030
+ `[adaptive-chatbot] transport error mountId=${mountId} status=${statusLabel} hasSucceeded=${hasSucceeded} body=${JSON.stringify(bodySnippet)}`,
11031
+ {
11032
+ mountId,
11033
+ status: errEvent.status,
11034
+ body: errEvent.body,
11035
+ errorName: errEvent.errorName,
11036
+ errorMessage: errEvent.message,
11037
+ hasSucceeded,
11038
+ messagesSent,
11039
+ mountAgeMs: mountAgeMs()
11040
+ }
11041
+ );
11025
11042
  if (hasSucceeded || errorDebounceTimer) return;
11026
11043
  errorDebounceTimer = setTimeout(() => {
11027
11044
  errorDebounceTimer = null;
@@ -11174,4 +11191,4 @@ fast-json-patch/module/duplex.mjs:
11174
11191
  * MIT license
11175
11192
  *)
11176
11193
  */
11177
- //# sourceMappingURL=chunk-VA222HQK.js.map
11194
+ //# sourceMappingURL=chunk-SSVUE6E6.js.map