From 290fa6a8d346266040ddd8c2628e4dc5a74bed17 Mon Sep 17 00:00:00 2001 From: LE Quoc Dat Date: Thu, 24 Apr 2025 22:08:14 +0100 Subject: [PATCH] fix vercel --- frontend/src/app/share/[threadId]/page.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/share/[threadId]/page.tsx b/frontend/src/app/share/[threadId]/page.tsx index 22baa612..47274cb5 100644 --- a/frontend/src/app/share/[threadId]/page.tsx +++ b/frontend/src/app/share/[threadId]/page.tsx @@ -221,6 +221,8 @@ export default function ThreadPage({ params }: { params: Promise } const messagesLoadedRef = useRef(false); const agentRunsCheckedRef = useRef(false); + const [streamingTextContent, setStreamingTextContent] = useState(""); + const handleProjectRenamed = useCallback((newName: string) => { setProjectName(newName); }, []); @@ -569,7 +571,6 @@ export default function ThreadPage({ params }: { params: Promise } const { status: streamHookStatus, - textContent: streamingTextContent, toolCall: streamingToolCall, error: streamError, agentRunId: currentHookRunId, @@ -577,6 +578,10 @@ export default function ThreadPage({ params }: { params: Promise } stopStreaming, } = useAgentStream({ onMessage: handleNewMessageFromStream, + onAssistantStart: () => {}, + onAssistantChunk: ({ content }) => { + setStreamingTextContent(prev => prev + content); + }, onStatusChange: handleStreamStatusChange, onError: handleStreamError, onClose: handleStreamClose,