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
fix: support echart function option (#19424)
Good Wood198fbb9b3de0
diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsxindex ca2ec727919..bc6fe0e43a2 100644--- a/web/app/components/base/markdown.tsx+++ b/web/app/components/base/markdown.tsx@@ -128,13 +128,19 @@ const CodeBlock: any = memo(({ inline, className, children = '', ...props }: anyconst language = match?.[1]const languageShowName = getCorrectCapitalizationLanguageName(language || '')const chartData = useMemo(() => {+ const str = String(children).replace(/\n$/, '')if (language === 'echarts') {try {- return JSON.parse(String(children).replace(/\n$/, ''))+ return JSON.parse(str)+ }+ catch { }+ try {+ // eslint-disable-next-line no-new-func, sonarjs/code-eval+ return new Function(`return ${str}`)()}catch { }}- return JSON.parse('{"title":{"text":"ECharts error - Wrong JSON format."}}')+ return JSON.parse('{"title":{"text":"ECharts error - Wrong option."}}')}, [language, children])const renderCodeContent = useMemo(() => {