Skip to content

armgit / dify

Public Imported from GitHub
0

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.

fix: copy inspect variable value get extra quotes (#21680)

非法操作eb9edf4908d5
diff --git a/web/app/components/workflow/variable-inspect/right.tsx b/web/app/components/workflow/variable-inspect/right.tsx
index 851078d9725..6ddd0d47d3c 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 (
<div className={cn('flex h-full flex-col')}>
{/* header */}
@@ -124,7 +135,7 @@ const Right = ({
</Tooltip>
)}
{currentNodeVar.var.value_type !== 'secret' && (
- <CopyFeedback content={currentNodeVar.var.value ? JSON.stringify(currentNodeVar.var.value) : ''} />
+ <CopyFeedback content={getCopyContent()} />
)}
</>
)}