diff --git a/components/script/useChatSocket.tsx b/components/script/useChatSocket.tsx index 3953bb61..8b845abf 100644 --- a/components/script/useChatSocket.tsx +++ b/components/script/useChatSocket.tsx @@ -59,15 +59,15 @@ const useChatSocket = (isEmpty?: boolean) => { // handles progress being recieved from the server (callProgress style frames). const handleProgress = useCallback(({frame, state}: { frame: CallFrame, state: Record }) => { + if (!frame.error && frame.toolCategory === "provider") { + return; + } + const isMainContent = frame?.output && frame.output.length > 0 && (!frame.parentID || frame.tool?.chat) && !frame.output[frame.output.length - 1].subCalls - if (frame.tool?.source?.repo?.Root?.includes('github.com/gptscript-ai/gateway-provider')) { - return; - } - let content = isMainContent ? frame.output[frame.output.length - 1].content || "" : "" if (!content) return; setGenerating(true);