fix(client-exec): send correct client workflow state override (#3143)

This commit is contained in:
Vikhyath Mondreti
2026-02-04 23:53:09 -08:00
committed by GitHub
parent ea3bab1f76
commit 2d7e6c9796

View File

@@ -1288,6 +1288,13 @@ export function useWorkflowExecution() {
onBlockCompleteCallback: onBlockComplete,
})
const clientWorkflowState = executionWorkflowState || {
blocks: filteredStates,
edges: workflowEdges,
loops: latestWorkflowState.loops,
parallels: latestWorkflowState.parallels,
}
await executionStream.execute({
workflowId: activeWorkflowId,
input: finalWorkflowInput,
@@ -1297,14 +1304,12 @@ export function useWorkflowExecution() {
useDraftState: true,
isClientSession: true,
stopAfterBlockId,
workflowStateOverride: executionWorkflowState
? {
blocks: executionWorkflowState.blocks,
edges: executionWorkflowState.edges,
loops: executionWorkflowState.loops,
parallels: executionWorkflowState.parallels,
}
: undefined,
workflowStateOverride: {
blocks: clientWorkflowState.blocks,
edges: clientWorkflowState.edges,
loops: clientWorkflowState.loops,
parallels: clientWorkflowState.parallels,
},
callbacks: {
onExecutionStarted: (data) => {
logger.info('Server execution started:', data)