mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 05:39:06 +00:00
Fix logic for setting and sending the initial chat message from the home page
- Load agents only once when the page loads, rather than triggering constant re-renders
This commit is contained in:
@@ -40,7 +40,8 @@ function ChatBodyData(props: ChatBodyDataProps) {
|
||||
useEffect(() => {
|
||||
const storedMessage = localStorage.getItem("message");
|
||||
if (storedMessage) {
|
||||
setMessage(storedMessage);
|
||||
setProcessingMessage(true);
|
||||
props.setQueryToProcess(storedMessage);
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user