impact-chatbot 2.3.81 → 2.3.82

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.esm.js CHANGED
@@ -1151,8 +1151,8 @@ const preprocessMarkdown = (content) => {
1151
1151
  * Custom components for markdown rendering
1152
1152
  */
1153
1153
  const markdownComponents = {
1154
- // Custom link component with target="_blank"
1155
- a: ({ href, children, ...props }) => (jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", ...props, children: children })),
1154
+ // Custom link component that opens in the same tab
1155
+ a: ({ href, children, ...props }) => (jsx("a", { href: href, target: "_self", ...props, children: children })),
1156
1156
  // Custom code component
1157
1157
  code: ({ children, className, ...props }) => (jsx("code", { className: `markdown-code ${className || ''}`, ...props, children: children })),
1158
1158
  // Custom pre component for code blocks
@@ -10638,9 +10638,13 @@ const CombinedContent = ({ botData, props }) => {
10638
10638
  const isTabEnabled = botData?.utilityData?.isTabEnabled;
10639
10639
  // Get the array of content items from bodyText
10640
10640
  const contentItems = Array.isArray(botData.bodyText) ? botData.bodyText : [];
10641
- // Renders the optional block-level header title above a content item
10641
+ // Renders the optional block-level header title above a content item.
10642
+ // Text blocks are skipped because their heading is the echoed user query
10643
+ // (response_heading), which we don't want to duplicate in the response.
10642
10644
  const renderHeaderTitle = (parsedData) => {
10643
- const showHeaderTitle = !parsedData?.noShowHeaderTitle && Boolean(parsedData?.headerTitle?.length);
10645
+ const showHeaderTitle = parsedData?.bodyType !== "text" &&
10646
+ !parsedData?.noShowHeaderTitle &&
10647
+ Boolean(parsedData?.headerTitle?.length);
10644
10648
  if (!showHeaderTitle)
10645
10649
  return null;
10646
10650
  return (jsx("div", { className: `${classes.chatbotText} ${classes.boldText} ${classes.combinedBlockHeaderTitle}`, children: parsedData.headerTitle }));