mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Chore/read write tools update (#5275)
* add tools warning * Enhance file handling tools with security features - Introduced new input parameters: workspacePath, enforceWorkspaceBoundaries, maxFileSize, and allowedExtensions for better control over file operations. - Added validation for file paths and sizes to prevent unsafe operations. - Implemented workspace boundary checks to restrict file access based on user-defined settings.
This commit is contained in:
@@ -191,6 +191,8 @@ const AgentFlowNode = ({ data }) => {
|
||||
componentNode?.deprecateMessage ??
|
||||
'This node will be deprecated in the next release. Change to a new node tagged with NEW'
|
||||
)
|
||||
} else if (componentNode.warning) {
|
||||
setWarningMessage(componentNode.warning)
|
||||
} else {
|
||||
setWarningMessage('')
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ import PropTypes from 'prop-types'
|
||||
import { cloneDeep } from 'lodash'
|
||||
|
||||
// Material
|
||||
import { Accordion, AccordionSummary, AccordionDetails, Box, Typography } from '@mui/material'
|
||||
import { Accordion, AccordionSummary, AccordionDetails, Box, Typography, Tooltip, IconButton } from '@mui/material'
|
||||
import { useTheme } from '@mui/material/styles'
|
||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
||||
import { IconSettings } from '@tabler/icons-react'
|
||||
import { IconSettings, IconAlertTriangle } from '@tabler/icons-react'
|
||||
|
||||
// Project imports
|
||||
import NodeInputHandler from '../canvas/NodeInputHandler'
|
||||
@@ -292,8 +292,21 @@ export const ConfigInput = ({ data, inputParam, disabled = false, arrayIndex = n
|
||||
>
|
||||
<Accordion sx={{ background: 'transparent' }} expanded={expanded} onChange={handleAccordionChange}>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />} sx={{ background: 'transparent' }}>
|
||||
<IconSettings stroke={1.5} size='1.3rem' />
|
||||
<Typography sx={{ ml: 1 }}>{selectedComponentNodeData?.label} Parameters</Typography>
|
||||
<div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
|
||||
<IconSettings stroke={1.5} size='1.3rem' />
|
||||
<Typography sx={{ ml: 1 }}>{selectedComponentNodeData?.label} Parameters</Typography>
|
||||
<div style={{ flexGrow: 1 }}></div>
|
||||
{selectedComponentNodeData?.warning && (
|
||||
<Tooltip
|
||||
title={<span style={{ whiteSpace: 'pre-line' }}>{selectedComponentNodeData.warning}</span>}
|
||||
placement='top'
|
||||
>
|
||||
<IconButton sx={{ height: 35, width: 35 }}>
|
||||
<IconAlertTriangle size={20} color='orange' />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
{(selectedComponentNodeData.inputParams ?? [])
|
||||
|
||||
@@ -82,6 +82,8 @@ const CanvasNode = ({ data }) => {
|
||||
componentNode?.deprecateMessage ??
|
||||
'This node will be deprecated in the next release. Change to a new node tagged with NEW'
|
||||
)
|
||||
} else if (componentNode.warning) {
|
||||
setWarningMessage(componentNode.warning)
|
||||
} else {
|
||||
setWarningMessage('')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user