diff --git a/frontend/src/components/workspace/messages/message-list-item.tsx b/frontend/src/components/workspace/messages/message-list-item.tsx index 6336e0f..c69dc10 100644 --- a/frontend/src/components/workspace/messages/message-list-item.tsx +++ b/frontend/src/components/workspace/messages/message-list-item.tsx @@ -77,24 +77,40 @@ export function MessageListItem({ /** * Custom link component that handles citations and external links - * All external links (http/https) are rendered as CitationLink badges - * to ensure consistent styling during streaming + * For AI messages: external links (http/https) are rendered as CitationLink badges + * For human messages: links are rendered as plain text/links */ function MessageLink({ href, children, citationMap, + isHuman, }: React.AnchorHTMLAttributes & { citationMap: Map; + isHuman: boolean; }) { if (!href) return {children}; + // Human messages: render links as plain underlined text + if (isHuman) { + return ( + + {children} + + ); + } + const citation = citationMap.get(href); // Check if it's an external link (http/https) const isExternalLink = href.startsWith("http://") || href.startsWith("https://"); - // All external links use CitationLink for consistent styling during streaming + // AI messages: external links use CitationLink for consistent styling during streaming if (isExternalLink) { return ( @@ -198,7 +214,7 @@ function MessageContent_({ // Shared markdown components const markdownComponents = useMemo(() => ({ a: (props: React.AnchorHTMLAttributes) => ( - + ), img: (props: React.ImgHTMLAttributes) => (