(Tool)
| 2 | import { generateExportFlowData } from './genericHelper' |
| 3 | |
| 4 | const sanitizeTool = (Tool) => { |
| 5 | try { |
| 6 | return Tool.map((tool) => { |
| 7 | return { |
| 8 | id: tool.id, |
| 9 | name: tool.name, |
| 10 | description: tool.description, |
| 11 | color: tool.color, |
| 12 | iconSrc: tool.iconSrc, |
| 13 | schema: tool.schema, |
| 14 | func: tool.func |
| 15 | } |
| 16 | }) |
| 17 | } catch (error) { |
| 18 | throw new Error(`exportImport.sanitizeTool ${getErrorMessage(error)}`) |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | const sanitizeChatflow = (ChatFlow) => { |
| 23 | try { |
no test coverage detected