Browse Source

refactor(workflow): update fetchInspectVars calls to accept empty parameters

tags/2.0.0-beta.1
twwu 2 months ago
parent
commit
c4f0691454

+ 1
- 1
web/app/components/rag-pipeline/hooks/use-pipeline-run.ts View File

@@ -165,7 +165,7 @@ export const usePipelineRun = () => {
},
onWorkflowFinished: (params) => {
handleWorkflowFinished(params)
fetchInspectVars()
fetchInspectVars({})
invalidAllLastRun()

if (onWorkflowFinished)

+ 1
- 1
web/app/components/workflow-app/hooks/use-workflow-run.ts View File

@@ -202,7 +202,7 @@ export const useWorkflowRun = () => {
if (onWorkflowFinished)
onWorkflowFinished(params)
if (isInWorkflowDebug) {
fetchInspectVars()
fetchInspectVars({})
invalidAllLastRun()
}
},

+ 5
- 5
web/app/components/workflow/hooks/use-fetch-workflow-inspect-vars.ts View File

@@ -93,11 +93,11 @@ export const useSetWorkflowVarsWithValue = ({
}

const fetchInspectVars = useCallback(async (params: {
passInVars?: boolean,
vars?: VarInInspect[],
passedInAllPluginInfoList?: Record<string, ToolWithProvider[]>,
passedInSchemaTypeDefinitions?: SchemaTypeDefinition[]
}) => {
passInVars?: boolean,
vars?: VarInInspect[],
passedInAllPluginInfoList?: Record<string, ToolWithProvider[]>,
passedInSchemaTypeDefinitions?: SchemaTypeDefinition[]
}) => {
const { passInVars, vars, passedInAllPluginInfoList, passedInSchemaTypeDefinitions } = params
invalidateConversationVarValues()
invalidateSysVarValues()

+ 1
- 1
web/app/components/workflow/panel/debug-and-preview/hooks.ts View File

@@ -296,7 +296,7 @@ export const useChat = (
},
async onCompleted(hasError?: boolean, errorMessage?: string) {
handleResponding(false)
fetchInspectVars()
fetchInspectVars({})
invalidAllLastRun()

if (hasError) {

Loading…
Cancel
Save