@@ -154,12 +154,6 @@ await context.Response.WriteAsJsonAsync(new
154154 // 是文本消息,直接回复
155155 var userInput = JsonSerializer . Deserialize < FeishuUserInput > ( input . Event . message . content ) ;
156156 logger . LogInformation ( "解析私聊文本消息成功,内容: {Text}" , userInput ? . text ) ;
157-
158- // TODO: 需要注入chatAiService服务
159- // await chatAiService.TextMessageAsync(userInput, sessionId);
160- await SendMessages ( sessionId , $ "稍等图片生成中,生成:{ userInput ? . text } ") ;
161- logger . LogInformation ( "已发送私聊回复消息给用户: {SessionId}" , sessionId ) ;
162-
163157 await context . Response . WriteAsJsonAsync ( new
164158 {
165159 code = 0 ,
@@ -198,7 +192,6 @@ await context.Response.WriteAsJsonAsync(new
198192 return ;
199193 }
200194
201- await SendMessages ( chatId , $ "稍等图片生成中,稍后我们将为你提供更专业的图片生成。", "chat_id" ) ;
202195 logger . LogInformation ( "已发送群聊回复消息到群: {ChatId}" , chatId ) ;
203196
204197 await context . Response . WriteAsJsonAsync ( new
@@ -235,23 +228,14 @@ private async Task Handler(string messageId, string content, string sessionId,
235228 var userInput = JsonSerializer . Deserialize < UserInputs > ( content ) ;
236229 logger . LogInformation ( "消息解析成功,IsText: {IsText}" , userInput ? . IsText ) ;
237230
238- await SendMessages ( sessionId , "正在努力思考中,请稍等片刻..." , type ) ;
239-
240231 var history = new ChatHistory ( ) ;
241-
242-
232+
243233 // 解析仓库的目录结构
244234 var path = document . GitPath ;
245235
246- using var kernelCreateActivity = Activity . Current . Source . StartActivity ( "AI.KernelCreation" ) ;
247- kernelCreateActivity ? . SetTag ( "kernel.path" , path ) ;
248- kernelCreateActivity ? . SetTag ( "kernel.model" , OpenAIOptions . ChatModel ) ;
249-
250236 var kernel = KernelFactory . GetKernel ( OpenAIOptions . Endpoint ,
251237 OpenAIOptions . ChatApiKey , path , OpenAIOptions . ChatModel , false ) ;
252238
253- kernelCreateActivity ? . SetStatus ( ActivityStatusCode . Ok ) ;
254-
255239 if ( OpenAIOptions . EnableMem0 )
256240 {
257241 kernel . Plugins . AddFromObject ( new RagTool ( warehouse ! . Id ) ) ;
0 commit comments