From eb9edf4908d59b410357212e00f93bb2ee6a349e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Mon, 30 Jun 2025 22:14:29 +0800 Subject: [PATCH] fix: copy inspect variable value get extra quotes (#21680) --- .../components/workflow/variable-inspect/right.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/variable-inspect/right.tsx b/web/app/components/workflow/variable-inspect/right.tsx index 851078d972..6ddd0d47d3 100644 --- a/web/app/components/workflow/variable-inspect/right.tsx +++ b/web/app/components/workflow/variable-inspect/right.tsx @@ -63,6 +63,17 @@ const Right = ({ resetConversationVar(currentNodeVar.var.id) } + const getCopyContent = () => { + const value = currentNodeVar?.var.value + if (value === null || value === undefined) + return '' + + if (typeof value === 'object') + return JSON.stringify(value) + + return String(value) + } + return (
{/* header */} @@ -124,7 +135,7 @@ const Right = ({ )} {currentNodeVar.var.value_type !== 'secret' && ( - + )} )}