aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app
diff options
context:
space:
mode:
authorDhravya <[email protected]>2024-06-29 01:02:04 -0500
committerDhravya <[email protected]>2024-06-29 01:02:04 -0500
commit3754b2c2c8453344b14b1c8f4cc718a649f85950 (patch)
treef19e11c9e75c7219d8c35913ce6a306acf382996 /apps/web/app
parentdynamic island no longer needed (diff)
downloadarchived-supermemory-3754b2c2c8453344b14b1c8f4cc718a649f85950.tar.xz
archived-supermemory-3754b2c2c8453344b14b1c8f4cc718a649f85950.zip
fix: Spaces filter not working
Diffstat (limited to 'apps/web/app')
-rw-r--r--apps/web/app/(dash)/chat/[chatid]/page.tsx2
-rw-r--r--apps/web/app/(dash)/chat/chatWindow.tsx4
-rw-r--r--apps/web/app/actions/doers.ts1
3 files changed, 4 insertions, 3 deletions
diff --git a/apps/web/app/(dash)/chat/[chatid]/page.tsx b/apps/web/app/(dash)/chat/[chatid]/page.tsx
index e37ae07e..96e96020 100644
--- a/apps/web/app/(dash)/chat/[chatid]/page.tsx
+++ b/apps/web/app/(dash)/chat/[chatid]/page.tsx
@@ -28,7 +28,7 @@ async function Page({
return (
<ChatWindow
q={q}
- spaces={spaces}
+ spaces={spaces ?? []}
initialChat={chat.data.length > 0 ? chat.data : undefined}
threadId={params.chatid}
/>
diff --git a/apps/web/app/(dash)/chat/chatWindow.tsx b/apps/web/app/(dash)/chat/chatWindow.tsx
index 9a18cfe7..99c997e4 100644
--- a/apps/web/app/(dash)/chat/chatWindow.tsx
+++ b/apps/web/app/(dash)/chat/chatWindow.tsx
@@ -41,7 +41,7 @@ function ChatWindow({
threadId,
}: {
q: string;
- spaces: { id: string; name: string }[];
+ spaces: { id: number; name: string }[];
initialChat?: ChatHistory[];
threadId: string;
}) {
@@ -179,7 +179,7 @@ function ChatWindow({
if (startGenerating) {
getAnswer(
q,
- spaces.map((s) => `${s}`),
+ spaces.map((s) => `${s.id}`),
);
}
} else {
diff --git a/apps/web/app/actions/doers.ts b/apps/web/app/actions/doers.ts
index a1de7b54..95b31392 100644
--- a/apps/web/app/actions/doers.ts
+++ b/apps/web/app/actions/doers.ts
@@ -181,6 +181,7 @@ export const createMemory = async (input: {
storeToSpaces = [];
}
+ console.log(storeToSpaces);
const vectorSaveResponse = await fetch(
`${process.env.BACKEND_BASE_URL}/api/add`,
{