@@ -321,6 +321,54 @@ describe("resolveFollowupDeliveryPayloads", () => {
321321 ) . toEqual ( [ { text : "hello world!" } ] ) ;
322322 } ) ;
323323
324+ it ( "drops short trailing meta acknowledgements after a same-route message tool send" , ( ) => {
325+ expect (
326+ resolveFollowupDeliveryPayloads ( {
327+ cfg : baseConfig ,
328+ payloads : [
329+ { text : "已发 #22141" } ,
330+ { text : "Sent above" } ,
331+ { text : "核心回答如下" } ,
332+ { text : "OK" } ,
333+ ] ,
334+ messageProvider : "telegram" ,
335+ originatingTo : "telegram:123" ,
336+ sentTargets : [
337+ {
338+ tool : "message" ,
339+ provider : "telegram" ,
340+ to : "telegram:123" ,
341+ text : "完整主回复内容已经通过 message tool 发出" ,
342+ } ,
343+ ] ,
344+ } ) ,
345+ ) . toStrictEqual ( [ ] ) ;
346+ } ) ;
347+
348+ it ( "drops compound meta acknowledgements without dropping substantive short replies" , ( ) => {
349+ expect (
350+ resolveFollowupDeliveryPayloads ( {
351+ cfg : baseConfig ,
352+ payloads : [
353+ { text : "已发, 不再追加总结" } ,
354+ { text : "Sent. Replied in thread." } ,
355+ { text : "OK, that's the fix." } ,
356+ { text : "OK, here is the actual answer." } ,
357+ ] ,
358+ messageProvider : "telegram" ,
359+ originatingTo : "telegram:123" ,
360+ sentTargets : [
361+ {
362+ tool : "message" ,
363+ provider : "telegram" ,
364+ to : "telegram:123" ,
365+ text : "完整主回复内容已经通过 message tool 发出" ,
366+ } ,
367+ ] ,
368+ } ) ,
369+ ) . toEqual ( [ { text : "OK, here is the actual answer." } ] ) ;
370+ } ) ;
371+
324372 it ( "dedupes duplicate replies when a messaging tool already sent to the same provider and target" , ( ) => {
325373 expect (
326374 resolveFollowupDeliveryPayloads ( {
0 commit comments