mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-05 12:14:59 -05:00
fix(client-exec): send correct client workflow state override (#3143)
This commit is contained in:
committed by
GitHub
parent
ea3bab1f76
commit
2d7e6c9796
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user