diff --git a/web/src/app/assistants/mine/AssistantModal.tsx b/web/src/app/assistants/mine/AssistantModal.tsx index f3531df97bf..b9acc741cf9 100644 --- a/web/src/app/assistants/mine/AssistantModal.tsx +++ b/web/src/app/assistants/mine/AssistantModal.tsx @@ -124,7 +124,7 @@ export default function AssistantModal({ heightOverride={`${height}px`} onOutsideClick={hideModal} removeBottomPadding - className={`max-w-4xl max-h-[90vh] ${height} w-[95%] overflow-hidden`} + className={`max-w-4xl pb-4 max-h-[90vh] ${height} w-[95%] overflow-hidden`} >
diff --git a/web/src/app/chat/message/MemoizedTextComponents.tsx b/web/src/app/chat/message/MemoizedTextComponents.tsx index 1bbf7acfd88..66ba3f6dff7 100644 --- a/web/src/app/chat/message/MemoizedTextComponents.tsx +++ b/web/src/app/chat/message/MemoizedTextComponents.tsx @@ -77,9 +77,24 @@ export const MemoizedLink = memo((props: any) => { ); } + const handleMouseDown = () => { + let url = rest.href || rest.children?.toString(); + if (url && !url.startsWith("http://") && !url.startsWith("https://")) { + // Try to construct a valid URL + const httpsUrl = `https://${url}`; + try { + new URL(httpsUrl); + url = httpsUrl; + } catch { + // If not a valid URL, don't modify original url + } + } + window.open(url, "_blank"); + }; + return ( rest.href && window.open(rest.href, "_blank")} + onMouseDown={handleMouseDown} className="cursor-pointer text-link hover:text-link-hover" > {rest.children}