MCPcopy
hub / github.com/FlowiseAI/Flowise / sanitizeTool

Function sanitizeTool

packages/ui/src/utils/exportImport.js:4–20  ·  view source on GitHub ↗
(Tool)

Source from the content-addressed store, hash-verified

2import { generateExportFlowData } from './genericHelper'
3
4const 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
22const sanitizeChatflow = (ChatFlow) => {
23 try {

Callers 1

exportDataFunction · 0.85

Calls 1

getErrorMessageFunction · 0.90

Tested by

no test coverage detected