|
|
|
@ -21,10 +21,10 @@ const useInspectVarsCrud = () => {
|
|
|
|
setInspectVarValue,
|
|
|
|
setInspectVarValue,
|
|
|
|
renameInspectVarName: renameInspectVarNameInStore,
|
|
|
|
renameInspectVarName: renameInspectVarNameInStore,
|
|
|
|
deleteAllInspectVars: deleteAllInspectVarsInStore,
|
|
|
|
deleteAllInspectVars: deleteAllInspectVarsInStore,
|
|
|
|
|
|
|
|
hasNodeInspectVars,
|
|
|
|
deleteNodeInspectVars: deleteNodeInspectVarsInStore,
|
|
|
|
deleteNodeInspectVars: deleteNodeInspectVarsInStore,
|
|
|
|
deleteInspectVar: deleteInspectVarInStore,
|
|
|
|
deleteInspectVar: deleteInspectVarInStore,
|
|
|
|
isInspectVarEdited,
|
|
|
|
isInspectVarEdited,
|
|
|
|
getLastRunVar,
|
|
|
|
|
|
|
|
} = workflowStore.getState()
|
|
|
|
} = workflowStore.getState()
|
|
|
|
|
|
|
|
|
|
|
|
const { data: conversationVars } = useConversationVarValues(appId)
|
|
|
|
const { data: conversationVars } = useConversationVarValues(appId)
|
|
|
|
@ -61,7 +61,9 @@ const useInspectVarsCrud = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const deleteNodeInspectorVars = async (nodeId: string) => {
|
|
|
|
const deleteNodeInspectorVars = async (nodeId: string) => {
|
|
|
|
await doDeleteNodeInspectorVars(nodeId)
|
|
|
|
if (hasNodeInspectVars(nodeId))
|
|
|
|
|
|
|
|
await doDeleteNodeInspectorVars(nodeId)
|
|
|
|
|
|
|
|
|
|
|
|
deleteNodeInspectVarsInStore(nodeId)
|
|
|
|
deleteNodeInspectVarsInStore(nodeId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -95,9 +97,10 @@ const useInspectVarsCrud = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const resetToLastRunVar = (nodeId: string, key: string) => {
|
|
|
|
const resetToLastRunVar = (nodeId: string, key: string) => {
|
|
|
|
const lastRunVar = getLastRunVar(nodeId, key)
|
|
|
|
// const lastRunVar = getLastRunVar(nodeId, key)
|
|
|
|
if (lastRunVar)
|
|
|
|
// if (lastRunVar)
|
|
|
|
editInspectVarValue(nodeId, key, lastRunVar)
|
|
|
|
// editInspectVarValue(nodeId, key, lastRunVar)
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(conversationVars, systemVars)
|
|
|
|
// console.log(conversationVars, systemVars)
|
|
|
|
|