From 532dc20a2de235a291c90198c15a0653ad0a4b1c Mon Sep 17 00:00:00 2001 From: lkddi Date: Thu, 26 Mar 2026 11:25:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(ai):=20=E5=8E=BB=E9=99=A4=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AB=AF=E6=94=B6=E5=88=B0=E5=A4=A7=E6=A8=A1=E5=9E=8B=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E8=AF=B7=E6=B1=82=E6=97=B6=E5=AF=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=8F=90=E9=97=AE=E7=9A=84=E4=BA=8C=E6=AC=A1=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/ChatBotController.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/Http/Controllers/ChatBotController.php b/app/Http/Controllers/ChatBotController.php index 1e5c3c4..4de71a5 100644 --- a/app/Http/Controllers/ChatBotController.php +++ b/app/Http/Controllers/ChatBotController.php @@ -72,22 +72,6 @@ class ChatBotController extends Controller $roomId = $request->input('room_id'); try { - // 先广播用户的提问消息 - $userMsg = [ - 'id' => $this->chatState->nextMessageId($roomId), - 'room_id' => $roomId, - 'from_user' => $user->username, - 'to_user' => 'AI小班长', - 'content' => $message, - 'is_secret' => false, - 'font_color' => '#000000', - 'action' => '', - 'sent_at' => now()->toDateTimeString(), - ]; - $this->chatState->pushMessage($roomId, $userMsg); - broadcast(new MessageSent($roomId, $userMsg)); - SaveMessageJob::dispatch($userMsg); - $result = $this->aiChat->chat($user->id, $message, $roomId); $reply = $result['reply'];