@@ -1182,6 +1182,29 @@ describe('groupMessagesIntoSnapshot (cold path)', () => {
11821182 } ) ;
11831183 } ) ;
11841184
1185+ it ( 'consumes the steer count for marker-only activations so a later identical prompt opens its own turn' , ( ) => {
1186+ const shared = [ { type : 'text' , text : 'same text' } ] ;
1187+ const snapshot = groupMessagesIntoSnapshot (
1188+ [
1189+ { role : 'user' , content : [ { type : 'text' , text : 'active' } ] , toolCalls : [ ] , origin : { kind : 'user' } } ,
1190+ { role : 'assistant' , content : [ { type : 'text' , text : 'working' } ] , toolCalls : [ ] } ,
1191+ {
1192+ role : 'user' ,
1193+ content : shared ,
1194+ toolCalls : [ ] ,
1195+ origin : { kind : 'skill_activation' , trigger : 'model-tool' , skillName : 'x' } as {
1196+ kind : string ;
1197+ } ,
1198+ } ,
1199+ { role : 'user' , content : shared , toolCalls : [ ] , origin : { kind : 'user' } } ,
1200+ { role : 'assistant' , content : [ { type : 'text' , text : 'noted' } ] , toolCalls : [ ] } ,
1201+ ] ,
1202+ { steeredContents : new Map ( [ [ JSON . stringify ( shared ) , 1 ] ] ) } ,
1203+ ) ;
1204+
1205+ expect ( snapshot . items . map ( ( item ) => item . kind ) ) . toEqual ( [ 'turn' , 'marker' , 'turn' ] ) ;
1206+ } ) ;
1207+
11851208 it ( 'starts a promptless turn for turn-opening system triggers (goal continuation)' , ( ) => {
11861209 const snapshot = groupMessagesIntoSnapshot ( [
11871210 { role : 'user' , content : [ { type : 'text' , text : 'hi' } ] , toolCalls : [ ] , origin : { kind : 'user' } } ,
0 commit comments