mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 00:48:04 +08:00
data formatting of tool data
This commit is contained in:
@ -286,7 +286,9 @@ export const initialNodes = (originNodes: Node[], originEdges: Edge[]) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (node.data.type === BlockEnum.Tool) {
|
||||
if (node.data.type === BlockEnum.Tool && !(node as Node<ToolNodeType>).data.version) {
|
||||
(node as Node<ToolNodeType>).data.version = '2'
|
||||
|
||||
const toolConfigurations = (node as Node<ToolNodeType>).data.tool_configurations
|
||||
if (toolConfigurations && Object.keys(toolConfigurations).length > 0) {
|
||||
const newValues = { ...toolConfigurations }
|
||||
|
||||
Reference in New Issue
Block a user