diff --git a/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx b/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx index 35c7842c0e..13a48dbabe 100644 --- a/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx +++ b/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx @@ -23,7 +23,6 @@ type Props = { supportCollapse?: boolean scope?: string onChange: (value: ToolValue[]) => void - supportVariables?: boolean nodeOutputVars: NodeOutPutVar[], availableNodes: Node[], nodeId?: string @@ -38,7 +37,6 @@ const MultipleToolSelector = ({ supportCollapse, scope, onChange, - supportVariables, nodeOutputVars, availableNodes, nodeId, @@ -131,7 +129,6 @@ const MultipleToolSelector = ({ {!collapse && ( <> 0 && value.map((item, index) => (
void panelShowState?: boolean onPanelShowStateChange?: (state: boolean) => void - supportVariables?: boolean nodeOutputVars: NodeOutPutVar[], availableNodes: Node[], nodeId?: string, @@ -346,7 +345,7 @@ const ToolSelector: FC = ({ <> {/* tabs */} - {showTabSlider && ( + {nodeId && showTabSlider && ( = ({ ]} /> )} - {showTabSlider && currType === 'params' && ( + {nodeId && showTabSlider && currType === 'params' && (
{t('plugin.detailPanel.toolSelector.paramsTip1')}
{t('plugin.detailPanel.toolSelector.paramsTip2')}
@@ -375,7 +374,7 @@ const ToolSelector: FC = ({
)} {/* reasoning config only */} - {reasoningConfigOnly && ( + {nodeId && reasoningConfigOnly && (
{t('plugin.detailPanel.toolSelector.params')}
@@ -409,7 +408,7 @@ const ToolSelector: FC = ({
)} {/* reasoning config form */} - {(currType === 'params' || reasoningConfigOnly) && ( + {nodeId && (currType === 'params' || reasoningConfigOnly) && ( = ({ // }) // } // }, []) - const handleNotMixedTypeChange = useCallback((variable: string, toString = false) => { + const handleNotMixedTypeChange = useCallback((variable: string) => { return (varValue: ValueSelector | string, varKindType: VarKindType) => { const newValue = produce(value, (draft: ToolVarInputs) => { const target = draft[variable].value if (target) { target.type = varKindType - target.value = toString ? `${varValue}` : varValue + target.value = varValue } else { draft[variable].value = { type: varKindType, - value: toString ? `${varValue}` : varValue, + value: varValue, } } }) @@ -170,7 +170,7 @@ const ReasoningConfigForm: React.FC = ({ {tooltipContent}
handleAutomatic(variable, !auto)}> - automatic + {t('plugin.detailPanel.toolSelector.auto')} = ({ readonly={false} isShowNodeName nodeId={nodeId} - value={varInput?.value || []} - onChange={handleNotMixedTypeChange(variable, true)} + value={varInput?.value || ''} + onChange={handleNotMixedTypeChange(variable)} defaultVarKindType={VarKindType.variable} filterVar={(varPayload: Var) => varPayload.type === VarType.number || varPayload.type === VarType.secret || varPayload.type === VarType.string} /> diff --git a/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx b/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx index 70f40995f9..b7553d8450 100644 --- a/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx +++ b/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx @@ -155,7 +155,6 @@ export const AgentStrategy = memo((props: AgentStrategyProps) => { tooltip={schema.tooltip && renderI18nObject(schema.tooltip)} > { } return (