File tree Expand file tree Collapse file tree 4 files changed +3
-32
lines changed
KoalaWarehouse/DocumentPending Expand file tree Collapse file tree 4 files changed +3
-32
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ EXPOSE 8081
77FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
88ARG BUILD_CONFIGURATION=Release
99WORKDIR /src
10- COPY ["NuGet.Config" , "." ]
1110COPY ["Directory.Packages.props" , "." ]
1211COPY ["Directory.Build.props" , "." ]
1312COPY ["src/KoalaWiki/KoalaWiki.csproj" , "src/KoalaWiki/" ]
Original file line number Diff line number Diff line change @@ -228,16 +228,10 @@ 3. Validation → Use Docs.Read after each MultiEdit to verify success before ne
228228 int inputTokenCount = 0 ;
229229 int outputTokenCount = 0 ;
230230 int maxRetries = 3 ;
231- CancellationTokenSource token = null ;
232-
233231 reset :
234232
235233 try
236234 {
237- // 创建新的取消令牌(每次重试都重新创建)
238- token ? . Dispose ( ) ;
239- token = new CancellationTokenSource ( TimeSpan . FromMinutes ( 30 ) ) ; // 20分钟超时
240-
241235 Console . WriteLine ( $ "开始处理文档 (尝试 { count } /{ maxRetries + 1 } ),超时设置: 30分钟") ;
242236
243237 try
@@ -248,14 +242,8 @@ 3. Validation → Use Docs.Read after each MultiEdit to verify success before ne
248242 await foreach ( var item in chat . GetStreamingChatMessageContentsAsync (
249243 history ,
250244 settings ,
251- documentKernel ,
252- token . Token ) . ConfigureAwait ( false ) )
245+ documentKernel ) . ConfigureAwait ( false ) )
253246 {
254- // 检查是否被取消
255- token . Token . ThrowIfCancellationRequested ( ) ;
256-
257- // 更新最后活动时间
258- lastActivityTime = DateTime . UtcNow ;
259247 hasReceivedContent = true ;
260248
261249 switch ( item . InnerContent )
@@ -294,7 +282,7 @@ 3. Validation → Use Docs.Read after each MultiEdit to verify success before ne
294282 Console . WriteLine ( "警告: 没有接收到任何流式内容" ) ;
295283 }
296284 }
297- catch ( OperationCanceledException ) when ( token . Token . IsCancellationRequested )
285+ catch ( OperationCanceledException )
298286 {
299287 Console . WriteLine ( "操作被取消 (超时或手动取消)" ) ;
300288
@@ -352,8 +340,6 @@ 3. Validation → Use Docs.Read after each MultiEdit to verify success before ne
352340 }
353341 finally
354342 {
355- // 确保资源被正确释放
356- token ? . Dispose ( ) ;
357343 Console . WriteLine ( "资源清理完成" ) ;
358344 }
359345
Original file line number Diff line number Diff line change 11using System . Text ;
2+ using ILogger = Microsoft . Extensions . Logging . ILogger ;
23
34namespace KoalaWiki . MCP ;
45
You can’t perform that action at this time.
0 commit comments