@@ -14,6 +14,7 @@ test("step snapshots carry over to assistant messages", () => {
1414 id : SessionEvent . ID . create ( ) ,
1515 sessionID,
1616 timestamp : DateTime . makeUnsafe ( 1 ) ,
17+ agent : "build" ,
1718 model : { id : "model" , providerID : "provider" } ,
1819 snapshot : "before" ,
1920 } ,
@@ -24,7 +25,7 @@ test("step snapshots carry over to assistant messages", () => {
2425 data : {
2526 sessionID,
2627 timestamp : DateTime . makeUnsafe ( 2 ) ,
27- reason : "stop" ,
28+ finish : "stop" ,
2829 cost : 0 ,
2930 tokens : {
3031 input : 1 ,
@@ -39,6 +40,7 @@ test("step snapshots carry over to assistant messages", () => {
3940 expect ( state . messages [ 0 ] ?. type ) . toBe ( "assistant" )
4041 if ( state . messages [ 0 ] ?. type !== "assistant" ) return
4142 expect ( state . messages [ 0 ] . snapshot ) . toEqual ( { start : "before" , end : "after" } )
43+ expect ( state . messages [ 0 ] . finish ) . toBe ( "stop" )
4244} )
4345
4446test ( "text ended populates assistant text content" , ( ) => {
@@ -51,6 +53,7 @@ test("text ended populates assistant text content", () => {
5153 id : SessionEvent . ID . create ( ) ,
5254 sessionID,
5355 timestamp : DateTime . makeUnsafe ( 1 ) ,
56+ agent : "build" ,
5457 model : { id : "model" , providerID : "provider" } ,
5558 } ,
5659 } satisfies SessionEvent . Event )
0 commit comments