aboutsummaryrefslogtreecommitdiff
path: root/apps/web/src/components/QueryAI.tsx
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-04-03 00:14:07 -0700
committerDhravya <[email protected]>2024-04-03 00:14:07 -0700
commit4ff97a09049bdf755146db1699eb534270e01ff4 (patch)
tree47744225a3c8a5ef2366a75197805e2f6092ff48 /apps/web/src/components/QueryAI.tsx
parentMerge branch 'new-ui' of https://github.com/Dhravya/supermemory into new-ui (diff)
parentchange 'categories' to 'spaces' (diff)
downloadsupermemory-4ff97a09049bdf755146db1699eb534270e01ff4.tar.xz
supermemory-4ff97a09049bdf755146db1699eb534270e01ff4.zip
update: catch up with main
Diffstat (limited to 'apps/web/src/components/QueryAI.tsx')
-rw-r--r--apps/web/src/components/QueryAI.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/web/src/components/QueryAI.tsx b/apps/web/src/components/QueryAI.tsx
index 811dd899..3cb14178 100644
--- a/apps/web/src/components/QueryAI.tsx
+++ b/apps/web/src/components/QueryAI.tsx
@@ -82,6 +82,11 @@ function QueryAI() {
const response = await fetch(`/api/query?q=${input}`);
+ if (response.status !== 200) {
+ setIsAiLoading(false);
+ return;
+ }
+
if (response.body) {
let reader = response.body.getReader();
let decoder = new TextDecoder('utf-8');