MCPcopy Create free account
hub / github.com/Azure-Samples/rag-postgres-openai-python / clearChat

Function clearChat

src/frontend/src/pages/chat/Chat.tsx:138–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136 };
137
138 const clearChat = () => {
139 lastQuestionRef.current = "";
140 error && setError(undefined);
141 setActiveCitation(undefined);
142 setActiveAnalysisPanelTab(undefined);
143 setAnswers([]);
144 setStreamedAnswers([]);
145 setIsLoading(false);
146 setIsStreaming(false);
147 };
148
149 useEffect(() => { chatMessageStreamEnd.current?.scrollIntoView({ behavior: "smooth" }); }, [isLoading]);
150 useEffect(() => { chatMessageStreamEnd.current?.scrollIntoView({ behavior: "auto" }); }, [streamedAnswers]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected