diff --git a/source/ui-chat/src/components/markdown/MarkdownContent.tsx b/source/ui-chat/src/components/markdown/MarkdownContent.tsx index 8139fd64..ea5d1502 100644 --- a/source/ui-chat/src/components/markdown/MarkdownContent.tsx +++ b/source/ui-chat/src/components/markdown/MarkdownContent.tsx @@ -96,6 +96,23 @@ const MARKDOWN_COMPONENTS: Components = { */ td({ children }) { return {children}; + }, + /** + * Renders links with external links opening in new tabs + */ + a({ href, children, ...props }) { + const isExternal = href && (href.startsWith('http://') || href.startsWith('https://')); + + return ( + + {children} + + ); } };