File tree Expand file tree Collapse file tree
extensions/matrix/src/matrix/monitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2494,10 +2494,8 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam
24942494 } ,
24952495 replyOptions : {
24962496 skillFilter : roomConfig ?. skills ,
2497- // Keep block streaming enabled when explicitly requested, even
2498- // with draft previews on. The draft remains the live preview
2499- // for the current assistant block, while block deliveries
2500- // finalize completed blocks into their own preserved events.
2497+ // Preserve explicit block streaming with draft previews: drafts update the live
2498+ // block, while block deliveries finalize completed blocks as separate events.
25012499 disableBlockStreaming : ! blockStreamingEnabled ,
25022500 onPartialReply : draftStream
25032501 ? ( payload ) => {
Original file line number Diff line number Diff line change @@ -217,8 +217,11 @@ async function runPreparedChannelTurnCoreInTrace<
217217 } ) ;
218218 let dispatchResult : TDispatchResult ;
219219 try {
220+ if ( admission . kind === "observeOnly" && ! options . suppressObserveOnlyDispatch ) {
221+ await params . runDispatch ( ) ;
222+ }
220223 dispatchResult =
221- options . suppressObserveOnlyDispatch && admission . kind === "observeOnly"
224+ admission . kind === "observeOnly"
222225 ? resolveObserveOnlyDispatchResult ( params )
223226 : await params . runDispatch ( ) ;
224227 maybeWarnZeroCountVisibleDispatch ( {
Original file line number Diff line number Diff line change @@ -1392,6 +1392,15 @@ describe("channel turn kernel", () => {
13921392 expect ( result . dispatched ) . toBe ( true ) ;
13931393 expect ( events ) . toEqual ( [ "record" , "dispatch" ] ) ;
13941394 expect ( deliver ) . not . toHaveBeenCalled ( ) ;
1395+ if ( ! result . dispatched ) {
1396+ throw new Error ( "expected dispatch" ) ;
1397+ }
1398+ expect ( hasVisibleChannelTurnDispatch ( result . dispatchResult ) ) . toBe ( false ) ;
1399+ expect ( resolveChannelTurnDispatchCounts ( result . dispatchResult ) ) . toEqual ( {
1400+ tool : 0 ,
1401+ block : 0 ,
1402+ final : 0 ,
1403+ } ) ;
13951404 expect ( onFinalize ) . toHaveBeenCalledTimes ( 1 ) ;
13961405 const [ finalized ] = requireFirstMockCall ( onFinalize , "finalize" ) ;
13971406 const finalizedResult = finalizeResult ( finalized ) ;
You can’t perform that action at this time.
0 commit comments