Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
feat: support opening new tab in markdown button (#12213)
Bowen Liangab469aa07d63
diff --git a/web/app/components/base/markdown-blocks/button.tsx b/web/app/components/base/markdown-blocks/button.tsxindex 56647b3bbee..77e3cc15954 100644--- a/web/app/components/base/markdown-blocks/button.tsx+++ b/web/app/components/base/markdown-blocks/button.tsx@@ -6,13 +6,30 @@ const MarkdownButton = ({ node }: any) => {const { onSend } = useChatContext()const variant = node.properties.dataVariantconst message = node.properties.dataMessage+ const link = node.properties.dataLinkconst size = node.properties.dataSize+ function is_valid_url(url: string): boolean {+ try {+ const parsed_url = new URL(url)+ return ['http:', 'https:'].includes(parsed_url.protocol)+ }+ catch {+ return false+ }+ }+return <Buttonvariant={variant}size={size}className={cn('!h-8 !px-3 select-none')}- onClick={() => onSend?.(message)}+ onClick={() => {+ if (is_valid_url(link)) {+ window.open(link, '_blank')+ return+ }+ onSend?.(message)+ }}><span className='text-[13px]'>{node.children[0]?.value || ''}</span></Button>