Procházet zdrojové kódy

chore: remove debug logs and temporary user display from chatbot widget

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tony T před 5 dny
rodič
revize
e8b49f142d

+ 0 - 7
client/src/components/ChatbotWidgetLive.tsx

@@ -4,7 +4,6 @@
  */
 import { useState, useRef, useEffect } from "react";
 import { trpc } from "@/lib/trpc";
-import { useAuth } from "@/_core/hooks/useAuth";
 import { Bot, X, Send, Loader2, User, Headphones, Sparkles, ChevronDown, MoreVertical } from "lucide-react";
 import { Streamdown } from "streamdown";
 
@@ -16,7 +15,6 @@ const QUICK_REPLIES = [
 ];
 
 export default function ChatbotWidgetLive() {
-  const { user } = useAuth();
   const [isOpen, setIsOpen] = useState(false);
   const [inputText, setInputText] = useState("");
   const [sessionId, setSessionId] = useState<string | null>(null);
@@ -155,11 +153,6 @@ export default function ChatbotWidgetLive() {
               </div>
             </div>
             <div className="flex items-center gap-1">
-              {user && (
-                <span className="text-[10px] text-white/60 mr-1">
-                  {user.name || user.email}
-                </span>
-              )}
               <button className="p-1.5 rounded-lg hover:bg-white/10 transition-colors">
                 <MoreVertical className="w-4 h-4 text-white/70" />
               </button>

+ 0 - 1
server/routers.ts

@@ -258,7 +258,6 @@ export const appRouter = router({
         content: z.string().min(1).max(2000),
       }))
       .mutation(async ({ input, ctx }) => {
-        console.log(`[sendMessage] sessionId=${input.sessionId} userId=${ctx.user?.id ?? "anon"} content="${input.content.slice(0, 60)}"`);
         const conversation = await getConversationBySessionId(input.sessionId);
         if (!conversation) throw new Error("Conversation not found");