mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
add aiplugintools
This commit is contained in:
@@ -233,3 +233,20 @@ export const copyToClipboard = (e) => {
|
||||
navigator.clipboard.writeText(src)
|
||||
}
|
||||
}
|
||||
|
||||
export const rearrangeToolsOrdering = (newValues, sourceNodeId) => {
|
||||
// RequestsGet and RequestsPost have to be in order before other tools
|
||||
newValues.push(`{{${sourceNodeId}.data.instance}}`)
|
||||
|
||||
const sortKey = (item) => {
|
||||
if (item.includes('requestsGet')) {
|
||||
return 0
|
||||
} else if (item.includes('requestsPost')) {
|
||||
return 1
|
||||
} else {
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
newValues.sort((a, b) => sortKey(a) - sortKey(b))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user