@@ -2113,7 +2113,7 @@ public void GetNewThreadUsesAIContextProviderFactoryIfProvided()
21132113 public async Task RunAsyncPropagatesBackgroundResponsesPropertiesToChatClientAsync ( bool providePropsViaChatOptions )
21142114 {
21152115 // Arrange
2116- object continuationToken = new ( ) ;
2116+ var continuationToken = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
21172117 ChatOptions ? capturedChatOptions = null ;
21182118 Mock < IChatClient > mockChatClient = new ( ) ;
21192119 mockChatClient
@@ -2162,8 +2162,8 @@ public async Task RunAsyncPropagatesBackgroundResponsesPropertiesToChatClientAsy
21622162 public async Task RunAsyncPrioritizesBackgroundResponsesPropertiesFromAgentRunOptionsOverOnesFromChatOptionsAsync ( )
21632163 {
21642164 // Arrange
2165- object continuationToken1 = new ( ) ;
2166- object continuationToken2 = new ( ) ;
2165+ var continuationToken1 = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
2166+ var continuationToken2 = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
21672167 ChatOptions ? capturedChatOptions = null ;
21682168 Mock < IChatClient > mockChatClient = new ( ) ;
21692169 mockChatClient
@@ -2209,7 +2209,7 @@ public async Task RunStreamingAsyncPropagatesBackgroundResponsesPropertiesToChat
22092209 new ChatResponseUpdate ( role : ChatRole . Assistant , content : "at?" ) ,
22102210 ] ;
22112211
2212- object continuationToken = new ( ) ;
2212+ var continuationToken = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
22132213 ChatOptions ? capturedChatOptions = null ;
22142214 Mock < IChatClient > mockChatClient = new ( ) ;
22152215 mockChatClient
@@ -2266,8 +2266,8 @@ public async Task RunStreamingAsyncPrioritizesBackgroundResponsesPropertiesFromA
22662266 new ChatResponseUpdate ( role : ChatRole . Assistant , content : "wh" ) ,
22672267 ] ;
22682268
2269- object continuationToken1 = new ( ) ;
2270- object continuationToken2 = new ( ) ;
2269+ var continuationToken1 = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
2270+ var continuationToken2 = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
22712271 ChatOptions ? capturedChatOptions = null ;
22722272 Mock < IChatClient > mockChatClient = new ( ) ;
22732273 mockChatClient
@@ -2307,7 +2307,7 @@ public async Task RunStreamingAsyncPrioritizesBackgroundResponsesPropertiesFromA
23072307 public async Task RunAsyncPropagatesContinuationTokenFromChatResponseToAgentRunResponseAsync ( )
23082308 {
23092309 // Arrange
2310- object continuationToken = new ( ) ;
2310+ var continuationToken = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
23112311 Mock < IChatClient > mockChatClient = new ( ) ;
23122312 mockChatClient
23132313 . Setup ( c => c . GetResponseAsync (
@@ -2332,7 +2332,7 @@ public async Task RunAsyncPropagatesContinuationTokenFromChatResponseToAgentRunR
23322332 public async Task RunStreamingAsyncPropagatesContinuationTokensFromUpdatesAsync ( )
23332333 {
23342334 // Arrange
2335- object token1 = new ( ) ;
2335+ var token1 = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) ;
23362336 ChatResponseUpdate [ ] expectedUpdates =
23372337 [
23382338 new ChatResponseUpdate ( ChatRole . Assistant , "pa" ) { ContinuationToken = token1 } ,
@@ -2372,7 +2372,7 @@ public async Task RunAsyncThrowsWhenMessagesProvidedWithContinuationTokenAsync()
23722372
23732373 ChatClientAgent agent = new ( mockChatClient . Object ) ;
23742374
2375- AgentRunOptions runOptions = new ( ) { ContinuationToken = new ( ) } ;
2375+ AgentRunOptions runOptions = new ( ) { ContinuationToken = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) } ;
23762376
23772377 IEnumerable < ChatMessage > inputMessages = [ new ChatMessage ( ChatRole . User , "test message" ) ] ;
23782378
@@ -2396,7 +2396,7 @@ public async Task RunStreamingAsyncThrowsWhenMessagesProvidedWithContinuationTok
23962396
23972397 ChatClientAgent agent = new ( mockChatClient . Object ) ;
23982398
2399- AgentRunOptions runOptions = new ( ) { ContinuationToken = new ( ) } ;
2399+ AgentRunOptions runOptions = new ( ) { ContinuationToken = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) } ;
24002400
24012401 IEnumerable < ChatMessage > inputMessages = [ new ChatMessage ( ChatRole . User , "test message" ) ] ;
24022402
@@ -2459,7 +2459,7 @@ public async Task RunAsyncSkipsThreadMessagePopulationWithContinuationTokenAsync
24592459 AIContextProvider = mockContextProvider . Object
24602460 } ;
24612461
2462- AgentRunOptions runOptions = new ( ) { ContinuationToken = new ( ) } ;
2462+ AgentRunOptions runOptions = new ( ) { ContinuationToken = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) } ;
24632463
24642464 // Act
24652465 await agent . RunAsync ( [ ] , thread , options : runOptions ) ;
@@ -2521,7 +2521,7 @@ public async Task RunStreamingAsyncSkipsThreadMessagePopulationWithContinuationT
25212521 AIContextProvider = mockContextProvider . Object
25222522 } ;
25232523
2524- AgentRunOptions runOptions = new ( ) { ContinuationToken = new ( ) } ;
2524+ AgentRunOptions runOptions = new ( ) { ContinuationToken = ResponseContinuationToken . FromBytes ( new byte [ ] { 1 , 2 , 3 } ) } ;
25252525
25262526 // Act
25272527 await agent . RunStreamingAsync ( [ ] , thread , options : runOptions ) . ToListAsync ( ) ;
0 commit comments