feat: add optional query parameter to PostWorkflowDebugProps and remove realmode from ModuleDispatchProps

This commit is contained in:
sd0ric4
2025-03-26 00:12:28 +08:00
parent 369c4b247b
commit 5ec7bbf3d3
9 changed files with 572 additions and 17 deletions

View File

@@ -581,8 +581,7 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
runtimeNodes,
runtimeEdges,
params,
mode: props.mode === 'debug' ? 'test' : props.mode,
realmode: props.mode
mode: props.mode === 'debug' ? 'test' : props.mode
};
// run module

View File

@@ -32,11 +32,10 @@ export const dispatchFormInput = async (props: Props): Promise<FormInputResponse
query
} = props;
const { isEntry } = node;
const mode = props.realmode;
const interactive = getLastInteractiveValue(histories);
// Interactive node is not the entry node, return interactive result
if ((!isEntry || interactive?.type !== 'userInput') && mode !== 'debug') {
if (!isEntry || interactive?.type !== 'userInput') {
return {
[DispatchNodeResponseKeyEnum.interactive]: {
type: 'userInput',

View File

@@ -30,11 +30,10 @@ export const dispatchUserSelect = async (props: Props): Promise<UserSelectRespon
query
} = props;
const { nodeId, isEntry } = node;
const mode = props.realmode;
const interactive = getLastInteractiveValue(histories);
// Interactive node is not the entry node, return interactive result
if ((!isEntry || interactive?.type !== 'userSelect') && mode !== 'debug') {
if (!isEntry || interactive?.type !== 'userSelect') {
return {
[DispatchNodeResponseKeyEnum.interactive]: {
type: 'userSelect',