mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 13:19:16 +00:00
Wait for iplcodata to load before first message
- Fix the console khoj ai ascii art - Remove some not so good suggested prompt
This commit is contained in:
@@ -184,8 +184,10 @@ export default function Chat() {
|
||||
useState<AbortController | null>(null);
|
||||
const [triggeredAbort, setTriggeredAbort] = useState(false);
|
||||
|
||||
const locationData = useIPLocationData() || {
|
||||
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
const { locationData, locationDataError, locationDataLoading } = useIPLocationData() || {
|
||||
locationData: {
|
||||
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
};
|
||||
const authenticatedData = useAuthenticatedData();
|
||||
const isMobileWidth = useIsMobileWidth();
|
||||
@@ -239,9 +241,13 @@ export default function Chat() {
|
||||
|
||||
useEffect(() => {
|
||||
if (processQuerySignal) {
|
||||
if (locationDataLoading) {
|
||||
return;
|
||||
}
|
||||
|
||||
chat();
|
||||
}
|
||||
}, [processQuerySignal]);
|
||||
}, [processQuerySignal, locationDataLoading]);
|
||||
|
||||
async function readChatStream(response: Response) {
|
||||
if (!response.ok) throw new Error(response.statusText);
|
||||
|
||||
Reference in New Issue
Block a user