fix: clear mock llm node functions

This commit is contained in:
zhsama
2026-01-13 17:57:02 +08:00
parent ddbbddbd14
commit e80bc78780
2 changed files with 1 additions and 16 deletions

View File

@@ -65,17 +65,6 @@ export const useSubGraphPersistence = ({
})
}, [getSubGraphDataKey, inputs, setInputs])
const clearSubGraphData = useCallback(() => {
const dataKey = getSubGraphDataKey()
const newToolParameters = { ...inputs.tool_parameters }
delete newToolParameters[dataKey]
setInputs({
...inputs,
tool_parameters: newToolParameters,
})
}, [getSubGraphDataKey, inputs, setInputs])
const hasSubGraphData = useCallback(() => {
const dataKey = getSubGraphDataKey()
const toolParameters = inputs.tool_parameters || {}
@@ -120,7 +109,6 @@ export const useSubGraphPersistence = ({
return {
loadSubGraphData,
saveSubGraphData,
clearSubGraphData,
hasSubGraphData,
updateSubGraphConfig,
updateSubGraphNodes,

View File

@@ -69,7 +69,6 @@ const MixedVariableTextInput = ({
const {
loadSubGraphData,
updateSubGraphNodes,
clearSubGraphData,
} = useSubGraphPersistence({
toolNodeId: toolNodeId || '',
paramKey: paramKey || '',
@@ -126,10 +125,8 @@ const MixedVariableTextInput = ({
}).trim()
onChange(valueWithoutAgentVars, VarKindTypeEnum.mixed, null)
if (toolNodeId && paramKey)
clearSubGraphData()
setControlPromptEditorRerenderKey(Date.now())
}, [clearSubGraphData, detectedAgentFromValue?.nodeId, onChange, paramKey, setControlPromptEditorRerenderKey, toolNodeId, value])
}, [detectedAgentFromValue?.nodeId, onChange, paramKey, setControlPromptEditorRerenderKey, toolNodeId, value])
const handleAgentSelect = useCallback((agent: AgentNode) => {
if (!onChange)