@syntrologie/adapt-chatbot 2.8.0-canary.400 → 2.8.0-canary.401

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,7 +1,7 @@
1
1
  import {
2
2
  ChatAssistantLitMountable,
3
3
  renderFallbackHtml
4
- } from "./chunk-CXSEPORE.js";
4
+ } from "./chunk-DZSYVKYG.js";
5
5
  import "./chunk-EWPPVPJ4.js";
6
6
  import "./chunk-5PW6T3QF.js";
7
7
  import "./chunk-VLJ3WOEX.js";
@@ -7893,7 +7893,12 @@ var ElementInstanceStore = class {
7893
7893
  const content = inst.content;
7894
7894
  const productName = content?.product?.name;
7895
7895
  const contentTitle = content?.title;
7896
- const title = typeof productName === "string" && productName ? productName : typeof contentTitle === "string" && contentTitle ? contentTitle : inst.template_id;
7896
+ const contentHeading = content?.heading;
7897
+ const title = typeof productName === "string" && productName ? productName : typeof contentTitle === "string" && contentTitle ? contentTitle : typeof contentHeading === "string" && contentHeading ? contentHeading : (
7898
+ // Never show a raw template id (kebab-case machine name) in the
7899
+ // chat — prettify the last-resort fallback into Title Case.
7900
+ inst.template_id.replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase())
7901
+ );
7897
7902
  if (inst.placement.slot === "alert") {
7898
7903
  out.push({ kind: "alert", instanceId: inst.instance_id, title });
7899
7904
  } else {
@@ -8915,4 +8920,4 @@ fast-json-patch/module/duplex.mjs:
8915
8920
  * MIT license
8916
8921
  *)
8917
8922
  */
8918
- //# sourceMappingURL=chunk-CXSEPORE.js.map
8923
+ //# sourceMappingURL=chunk-DZSYVKYG.js.map