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.cjs.js CHANGED
@@ -1173,8 +1173,8 @@ const preprocessMarkdown = (content) => {
1173
1173
  * Custom components for markdown rendering
1174
1174
  */
1175
1175
  const markdownComponents = {
1176
- // Custom link component with target="_blank"
1177
- a: ({ href, children, ...props }) => (jsxRuntime.jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", ...props, children: children })),
1176
+ // Custom link component that opens in the same tab
1177
+ a: ({ href, children, ...props }) => (jsxRuntime.jsx("a", { href: href, target: "_self", ...props, children: children })),
1178
1178
  // Custom code component
1179
1179
  code: ({ children, className, ...props }) => (jsxRuntime.jsx("code", { className: `markdown-code ${className || ''}`, ...props, children: children })),
1180
1180
  // Custom pre component for code blocks
@@ -10660,9 +10660,13 @@ const CombinedContent = ({ botData, props }) => {
10660
10660
  const isTabEnabled = botData?.utilityData?.isTabEnabled;
10661
10661
  // Get the array of content items from bodyText
10662
10662
  const contentItems = Array.isArray(botData.bodyText) ? botData.bodyText : [];
10663
- // Renders the optional block-level header title above a content item
10663
+ // Renders the optional block-level header title above a content item.
10664
+ // Text blocks are skipped because their heading is the echoed user query
10665
+ // (response_heading), which we don't want to duplicate in the response.
10664
10666
  const renderHeaderTitle = (parsedData) => {
10665
- const showHeaderTitle = !parsedData?.noShowHeaderTitle && Boolean(parsedData?.headerTitle?.length);
10667
+ const showHeaderTitle = parsedData?.bodyType !== "text" &&
10668
+ !parsedData?.noShowHeaderTitle &&
10669
+ Boolean(parsedData?.headerTitle?.length);
10666
10670
  if (!showHeaderTitle)
10667
10671
  return null;
10668
10672
  return (jsxRuntime.jsx("div", { className: `${classes.chatbotText} ${classes.boldText} ${classes.combinedBlockHeaderTitle}`, children: parsedData.headerTitle }));