@@ -2639,17 +2639,20 @@ describe("processDiscordMessage draft streaming", () => {
26392639 expect ( deliverDiscordReply ) . not . toHaveBeenCalled ( ) ;
26402640 } ) ;
26412641
2642- it ( "suppresses reasoning payload delivery to Discord" , async ( ) => {
2642+ it ( "delivers reasoning block payloads to Discord" , async ( ) => {
26432643 mockDispatchSingleBlockReply ( { text : "thinking..." , isReasoning : true } ) ;
26442644 await processStreamOffDiscordMessage ( ) ;
26452645
2646- expect ( deliverDiscordReply ) . not . toHaveBeenCalled ( ) ;
2646+ expect ( deliverDiscordReply ) . toHaveBeenCalledTimes ( 1 ) ;
2647+ expect ( firstMockArg ( deliverDiscordReply , "deliverDiscordReply" ) ) . toMatchObject ( {
2648+ replies : [ { text : "thinking..." , isReasoning : true } ] ,
2649+ } ) ;
26472650 } ) ;
26482651
2649- it ( "suppresses reasoning-tagged final payload delivery to Discord" , async ( ) => {
2652+ it ( "delivers reasoning-tagged final payload to Discord" , async ( ) => {
26502653 dispatchInboundMessage . mockImplementationOnce ( async ( params ?: DispatchInboundParams ) => {
26512654 await params ?. dispatcher . sendFinalReply ( {
2652- text : "Reasoning:\nthis should stay internal " ,
2655+ text : "Reasoning:\nthis should be visible " ,
26532656 isReasoning : true ,
26542657 } ) ;
26552658 return { queuedFinal : true , counts : { final : 1 , tool : 0 , block : 0 } } ;
@@ -2661,8 +2664,10 @@ describe("processDiscordMessage draft streaming", () => {
26612664
26622665 await runProcessDiscordMessage ( ctx ) ;
26632666
2664- expect ( deliverDiscordReply ) . not . toHaveBeenCalled ( ) ;
2665- expect ( editMessageDiscord ) . not . toHaveBeenCalled ( ) ;
2667+ expect ( deliverDiscordReply ) . toHaveBeenCalledTimes ( 1 ) ;
2668+ expect ( firstMockArg ( deliverDiscordReply , "deliverDiscordReply" ) ) . toMatchObject ( {
2669+ replies : [ { text : "this should be visible" , isReasoning : true } ] ,
2670+ } ) ;
26662671 } ) ;
26672672
26682673 it ( "delivers non-reasoning block payloads to Discord" , async ( ) => {
0 commit comments