feat: add realmode parameter to workflow dispatch and update interactive handling

This commit is contained in:
sd0ric4
2025-03-25 18:42:23 +08:00
parent ccc9260ed5
commit 369c4b247b
5 changed files with 20 additions and 246 deletions

View File

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

View File

@@ -32,11 +32,11 @@ 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') {
if ((!isEntry || interactive?.type !== 'userInput') && mode !== 'debug') {
return {
[DispatchNodeResponseKeyEnum.interactive]: {
type: 'userInput',

View File

@@ -30,11 +30,11 @@ 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') {
if ((!isEntry || interactive?.type !== 'userSelect') && mode !== 'debug') {
return {
[DispatchNodeResponseKeyEnum.interactive]: {
type: 'userSelect',