added favicon

This commit is contained in:
Dhravya 2024-04-13 23:11:09 -07:00
parent d5b130f916
commit d878645f37
12 changed files with 29 additions and 4 deletions

View file

@ -17,6 +17,10 @@ export async function POST(request: Request, store: CloudflareVectorizeStore, _:
if (!body.pageContent || !body.url) {
return new Response(JSON.stringify({ message: 'Invalid Page Content' }), { status: 400 });
}
// TODO: FIX THIS,BUT TEMPERORILY TRIM page content to 1000 words
body.pageContent = body.pageContent.split(' ').slice(0, 1000).join(' ');
const newPageContent = `Title: ${body.title}\nDescription: ${body.description}\nURL: ${body.url}\nContent: ${body.pageContent}`;
const ourID = `${body.url}-${body.user}`;
@ -31,7 +35,7 @@ export async function POST(request: Request, store: CloudflareVectorizeStore, _:
{
pageContent: newPageContent,
metadata: {
title: body.title ?? '',
title: body.title?.slice(0, 50) ?? '',
description: body.description ?? '',
space: body.space ?? '',
url: body.url,

View file

@ -122,6 +122,8 @@ export async function POST(request: Request, _: CloudflareVectorizeStore, embedd
`You are an agent that summarizes a page based on the query. don't say 'based on the context'. I expect you to be like a 'Second Brain'. you will be provided with the context (old saved posts) and questions. Answer accordingly. Answer in markdown format` +
`Context:\n${preparedContext ?? 'No context'}\n\nQuestion: ${query}\nAnswer:`;
console.log('Prompt', prompt);
// const output = await chat.sendMessageStream(prompt);
// const response = new Response(

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
apps/web/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View file

@ -272,7 +272,7 @@ export async function addMemory(
},
body: JSON.stringify({
pageContent: content.content,
title: content.title,
title: content.title?.slice(0, 50),
url: content.url,
user: user.email,
}),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View file

@ -6,8 +6,8 @@ const roboto = Roboto({ weight: ["300", "400", "500"], subsets: ["latin"] });
const inter = Inter({ weight: ["300", "400", "500"], subsets: ["latin"] });
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Supermemory - Your second brain",
description: "Save your memories forever, build your own second brain.",
};
export default function RootLayout({