From d307534781dad43f8e29af54c99931057dd90075 Mon Sep 17 00:00:00 2001 From: pablonyx Date: Thu, 27 Mar 2025 11:49:32 -0700 Subject: [PATCH] add some debug logging (#4328) --- web/src/app/chat/ChatPage.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/app/chat/ChatPage.tsx b/web/src/app/chat/ChatPage.tsx index 884d612d5a..f899c0f34d 100644 --- a/web/src/app/chat/ChatPage.tsx +++ b/web/src/app/chat/ChatPage.tsx @@ -1384,6 +1384,7 @@ export function ChatPage({ if (!packet) { continue; } + console.log("Packet:", JSON.stringify(packet)); if (!initialFetchDetails) { if (!Object.hasOwn(packet, "user_message_id")) { @@ -1729,6 +1730,7 @@ export function ChatPage({ } } } catch (e: any) { + console.log("Error:", e); const errorMsg = e.message; upsertToCompleteMessageMap({ messages: [ @@ -1756,11 +1758,13 @@ export function ChatPage({ completeMessageMapOverride: currentMessageMap(completeMessageDetail), }); } + console.log("Finished streaming"); setAgenticGenerating(false); resetRegenerationState(currentSessionId()); updateChatState("input"); if (isNewSession) { + console.log("Setting up new session"); if (finalMessage) { setSelectedMessageForDocDisplay(finalMessage.message_id); }