aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2024-08-05 18:36:26 -0700
committerDhravya Shah <[email protected]>2024-08-05 18:36:26 -0700
commit4a9565f91d67cbc57be5bb4370c3e640daf643fb (patch)
tree67c38bc9e55a75802207a350ba62d17e23e72437 /apps
parentMerge branch 'kush/be-queue' of https://github.com/Dhravya/supermemory into k... (diff)
downloadsupermemory-4a9565f91d67cbc57be5bb4370c3e640daf643fb.tar.xz
supermemory-4a9565f91d67cbc57be5bb4370c3e640daf643fb.zip
changes for staging
Diffstat (limited to 'apps')
-rwxr-xr-xapps/cf-ai-backend/bun.lockbbin0 -> 2390 bytes
-rw-r--r--apps/cf-ai-backend/src/helper.ts1
-rw-r--r--apps/cf-ai-backend/wrangler.toml10
-rw-r--r--apps/web/app/(auth)/onboarding/page.tsx14
-rw-r--r--apps/web/app/(dash)/dialogContentContainer.tsx2
-rw-r--r--apps/web/app/(dash)/menu.tsx2
-rw-r--r--apps/web/migrations/0001_Adding_jobs_table.sql19
-rw-r--r--apps/web/wrangler.toml6
8 files changed, 37 insertions, 17 deletions
diff --git a/apps/cf-ai-backend/bun.lockb b/apps/cf-ai-backend/bun.lockb
new file mode 100755
index 00000000..601774bc
--- /dev/null
+++ b/apps/cf-ai-backend/bun.lockb
Binary files differ
diff --git a/apps/cf-ai-backend/src/helper.ts b/apps/cf-ai-backend/src/helper.ts
index eadd9c21..af9e6442 100644
--- a/apps/cf-ai-backend/src/helper.ts
+++ b/apps/cf-ai-backend/src/helper.ts
@@ -184,7 +184,6 @@ export async function batchCreateChunksAndEmbeddings({
const results = [];
for (let i = 0; i < newVectors.length; i += 20) {
results.push(newVectors.slice(i, i + 20));
- console.log(JSON.stringify(newVectors[1].id));
}
await Promise.all(
diff --git a/apps/cf-ai-backend/wrangler.toml b/apps/cf-ai-backend/wrangler.toml
index 665ca593..ce1f1948 100644
--- a/apps/cf-ai-backend/wrangler.toml
+++ b/apps/cf-ai-backend/wrangler.toml
@@ -1,4 +1,4 @@
-name = "new-cf-ai-backend"
+name = "dev-cf-ai-backend"
main = "src/index.ts"
compatibility_date = "2024-02-23"
node_compat = true
@@ -31,8 +31,8 @@ binding = "AI"
[[kv_namespaces]]
binding = "KV"
-id = "569c3f2a510943729019f5d1f798e7d9"
-preview_id = "569c3f2a510943729019f5d1f798e7d9"
+id = "a68a8182f08e46a1b5d11588fdda68dc"
+preview_id = "a68a8182f08e46a1b5d11588fdda68dc"
[placement]
mode = "smart"
@@ -50,5 +50,5 @@ mode = "smart"
[[d1_databases]]
binding = "DATABASE"
-database_name = "supermemlocal"
-database_id = "0f93c990-72fb-489c-8563-57a7bb18dc43"
+database_name = "staging-d1-supermemory"
+database_id = "40a3bb06-82bd-42f1-aef4-fde04f3635c5" \ No newline at end of file
diff --git a/apps/web/app/(auth)/onboarding/page.tsx b/apps/web/app/(auth)/onboarding/page.tsx
index 5b728928..c311ea13 100644
--- a/apps/web/app/(auth)/onboarding/page.tsx
+++ b/apps/web/app/(auth)/onboarding/page.tsx
@@ -26,11 +26,13 @@ export default function Home() {
await completeOnboarding();
};
if (currStep > 3) {
- updateDb().then(() => {
- push("/home?q=what%20is%20supermemory");
- }).catch((e) => {
- console.error(e);
- });
+ updateDb()
+ .then(() => {
+ push("/home?q=what%20is%20supermemory");
+ })
+ .catch((e) => {
+ console.error(e);
+ });
}
}, [currStep]);
@@ -292,7 +294,7 @@ function StepThree({ currStep }: { currStep: number }) {
});
if (cont.success) {
- toast.success("Memory created", {
+ toast.success("Memory queued", {
richColors: true,
});
} else {
diff --git a/apps/web/app/(dash)/dialogContentContainer.tsx b/apps/web/app/(dash)/dialogContentContainer.tsx
index c6cacd35..1a11ac6d 100644
--- a/apps/web/app/(dash)/dialogContentContainer.tsx
+++ b/apps/web/app/(dash)/dialogContentContainer.tsx
@@ -76,7 +76,7 @@ export function DialogContentContainer({
setSelectedSpaces([]);
if (cont.success) {
- toast.success("Memory created", {
+ toast.success("Memory queued", {
richColors: true,
});
} else {
diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx
index 1acab2c8..783a4780 100644
--- a/apps/web/app/(dash)/menu.tsx
+++ b/apps/web/app/(dash)/menu.tsx
@@ -128,7 +128,7 @@ function Menu() {
setSelectedSpaces([]);
if (cont.success) {
- toast.success("Memory created", {
+ toast.success("Memory queued", {
richColors: true,
});
} else {
diff --git a/apps/web/migrations/0001_Adding_jobs_table.sql b/apps/web/migrations/0001_Adding_jobs_table.sql
new file mode 100644
index 00000000..7a687f72
--- /dev/null
+++ b/apps/web/migrations/0001_Adding_jobs_table.sql
@@ -0,0 +1,19 @@
+-- Migration number: 0001 2024-08-05T18:05:16.793Z
+CREATE TABLE `jobs` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `userId` text NOT NULL,
+ `url` text NOT NULL,
+ `status` text NOT NULL,
+ `attempts` integer DEFAULT 0 NOT NULL,
+ `lastAttemptAt` integer,
+ `error` blob,
+ `createdAt` integer NOT NULL,
+ `updatedAt` integer NOT NULL,
+ FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
+);
+
+
+CREATE INDEX `jobs_userId_idx` ON `jobs` (`userId`);--> statement-breakpoint
+CREATE INDEX `jobs_status_idx` ON `jobs` (`status`);--> statement-breakpoint
+CREATE INDEX `jobs_createdAt_idx` ON `jobs` (`createdAt`);--> statement-breakpoint
+CREATE INDEX `jobs_url_idx` ON `jobs` (`url`);--> statement-breakpoint \ No newline at end of file
diff --git a/apps/web/wrangler.toml b/apps/web/wrangler.toml
index a6232450..2e991ad9 100644
--- a/apps/web/wrangler.toml
+++ b/apps/web/wrangler.toml
@@ -1,4 +1,4 @@
-name = "supermemory"
+name = "dev-supermemory"
compatibility_date = "2024-03-29"
compatibility_flags = [ "nodejs_compat" ]
pages_build_output_dir = ".vercel/output/static"
@@ -31,8 +31,8 @@ database_id = "fc562605-157a-4f60-b439-2a24ffed5b4c"
[[env.production.d1_databases]]
binding = "DATABASE"
-database_name = "prod-d1-supermemory"
-database_id = "f527a727-c472-41d4-8eaf-3d7ba0f2f395"
+database_name = "staging-d1-supermemory"
+database_id = "40a3bb06-82bd-42f1-aef4-fde04f3635c5"
[env.preview.ai]
binding = "AI"