@@ -230,25 +230,31 @@ export function useWorkflowExecution() {
230230 durationMs ?: number
231231 blockLogs : BlockLog [ ]
232232 isPreExecutionError ?: boolean
233+ finalBlockLogs ?: BlockLog [ ]
233234 } ) => {
234235 if ( ! params . workflowId ) return
235236 sharedHandleExecutionErrorConsole (
236- { addConsole, updateConsole } ,
237+ { addConsole, updateConsole, cancelRunningEntries } ,
237238 { ...params , workflowId : params . workflowId }
238239 )
239240 } ,
240- [ addConsole , updateConsole ]
241+ [ addConsole , cancelRunningEntries , updateConsole ]
241242 )
242243
243244 const handleExecutionCancelledConsole = useCallback (
244- ( params : { workflowId ?: string ; executionId ?: string ; durationMs ?: number } ) => {
245+ ( params : {
246+ workflowId ?: string
247+ executionId ?: string
248+ durationMs ?: number
249+ finalBlockLogs ?: BlockLog [ ]
250+ } ) => {
245251 if ( ! params . workflowId ) return
246252 sharedHandleExecutionCancelledConsole (
247- { addConsole, updateConsole } ,
253+ { addConsole, updateConsole, cancelRunningEntries } ,
248254 { ...params , workflowId : params . workflowId }
249255 )
250256 } ,
251- [ addConsole , updateConsole ]
257+ [ addConsole , cancelRunningEntries , updateConsole ]
252258 )
253259
254260 const buildBlockEventHandlers = useCallback (
@@ -1030,6 +1036,8 @@ export function useWorkflowExecution() {
10301036 accumulatedBlockLogs,
10311037 accumulatedBlockStates,
10321038 executedBlockIds,
1039+ consoleMode : 'update' ,
1040+ includeStartConsoleEntry : true ,
10331041 onBlockCompleteCallback : onBlockComplete ,
10341042 } )
10351043
@@ -1232,6 +1240,7 @@ export function useWorkflowExecution() {
12321240 durationMs : data . duration ,
12331241 blockLogs : accumulatedBlockLogs ,
12341242 isPreExecutionError,
1243+ finalBlockLogs : data . finalBlockLogs ,
12351244 } )
12361245
12371246 if ( activeWorkflowId && ! isExecutingFromChat ) {
@@ -1258,6 +1267,7 @@ export function useWorkflowExecution() {
12581267 workflowId : activeWorkflowId ,
12591268 executionId : executionIdRef . current ,
12601269 durationMs : data ?. duration ,
1270+ finalBlockLogs : data ?. finalBlockLogs ,
12611271 } )
12621272
12631273 if ( activeWorkflowId && ! isExecutingFromChat ) {
@@ -1674,6 +1684,8 @@ export function useWorkflowExecution() {
16741684 accumulatedBlockLogs,
16751685 accumulatedBlockStates,
16761686 executedBlockIds,
1687+ consoleMode : 'update' ,
1688+ includeStartConsoleEntry : true ,
16771689 } )
16781690
16791691 await executionStream . executeFromBlock ( {
@@ -1743,6 +1755,7 @@ export function useWorkflowExecution() {
17431755 error : data . error ,
17441756 durationMs : data . duration ,
17451757 blockLogs : accumulatedBlockLogs ,
1758+ finalBlockLogs : data . finalBlockLogs ,
17461759 } )
17471760
17481761 setCurrentExecutionId ( workflowId , null )
@@ -1755,6 +1768,7 @@ export function useWorkflowExecution() {
17551768 workflowId,
17561769 executionId : executionIdRef . current ,
17571770 durationMs : data ?. duration ,
1771+ finalBlockLogs : data ?. finalBlockLogs ,
17581772 } )
17591773
17601774 setCurrentExecutionId ( workflowId , null )
@@ -1901,6 +1915,8 @@ export function useWorkflowExecution() {
19011915 accumulatedBlockLogs,
19021916 accumulatedBlockStates,
19031917 executedBlockIds,
1918+ consoleMode : 'update' ,
1919+ includeStartConsoleEntry : true ,
19041920 } )
19051921
19061922 const capturedExecutionId = executionId
@@ -2001,6 +2017,7 @@ export function useWorkflowExecution() {
20012017 executionId : capturedExecutionId ,
20022018 error : data . error ,
20032019 blockLogs : accumulatedBlockLogs ,
2020+ finalBlockLogs : data . finalBlockLogs ,
20042021 } )
20052022 } ,
20062023 onExecutionCancelled : ( data ) => {
@@ -2021,6 +2038,7 @@ export function useWorkflowExecution() {
20212038 workflowId : reconnectWorkflowId ,
20222039 executionId : capturedExecutionId ,
20232040 durationMs : data ?. duration ,
2041+ finalBlockLogs : data ?. finalBlockLogs ,
20242042 } )
20252043 } ,
20262044 } ,
0 commit comments