changes for staging

This commit is contained in:
Dhravya Shah 2024-08-05 18:36:26 -07:00
parent 28e4c3b6d1
commit 4a9565f91d
8 changed files with 37 additions and 17 deletions

BIN
apps/cf-ai-backend/bun.lockb Executable file

Binary file not shown.

View file

@ -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(

View file

@ -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"

View file

@ -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 {

View file

@ -76,7 +76,7 @@ export function DialogContentContainer({
setSelectedSpaces([]);
if (cont.success) {
toast.success("Memory created", {
toast.success("Memory queued", {
richColors: true,
});
} else {

View file

@ -128,7 +128,7 @@ function Menu() {
setSelectedSpaces([]);
if (cont.success) {
toast.success("Memory created", {
toast.success("Memory queued", {
richColors: true,
});
} else {

View file

@ -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

View file

@ -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"