diff --git a/README.md b/README.md index 8b09551..c890b2d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Make sure pgvector extension is installed on your machine. Setup Guide https://g For File uploading you need Unstructured.io API key. You can get it at http://platform.unstructured.io/ #### Auth -SurfSense now only works with Google OAuth. Make sure to set your OAuth Client at https://developers.google.com/identity/protocols/oauth2 . We need client id and client secret for backend. +SurfSense now only works with Google OAuth. Make sure to set your OAuth Client at https://developers.google.com/identity/protocols/oauth2 . We need client id and client secret for backend. Make sure to enable people api and add the required scopes under data access (openid, userinfo.email, userinfo.profile) ![gauth](https://github.com/user-attachments/assets/80d60fe5-889b-48a6-b947-200fdaf544c1) @@ -130,7 +130,7 @@ You can also integrate any LLM just follow this https://docs.litellm.ai/docs/pro Now once you have everything let's proceed to run SurfSense. 1. Install `uv` : https://docs.astral.sh/uv/getting-started/installation/ 2. Now just run this command to install dependencies i.e `uv sync` -3. That's it. Now just run the `main.py` file using `uv run main.py`. +3. That's it. Now just run the `main.py` file using `uv run main.py`. You can also optionally pass `--reload` as an argument to enable hot reloading. 4. If everything worked fine you should see screen like this. ![backend](https://i.ibb.co/542Vhqw/backendrunning.png) diff --git a/surfsense_backend/main.py b/surfsense_backend/main.py index 78a33d4..76d478b 100644 --- a/surfsense_backend/main.py +++ b/surfsense_backend/main.py @@ -1,4 +1,15 @@ import uvicorn +import argparse if __name__ == "__main__": - uvicorn.run("app.app:app", host="0.0.0.0", log_level="info", loop="asyncio") + parser = argparse.ArgumentParser(description='Run the SurfSense application') + parser.add_argument('--reload', action='store_true', help='Enable hot reloading') + args = parser.parse_args() + + uvicorn.run( + "app.app:app", + host="0.0.0.0", + log_level="info", + reload=args.reload, + reload_dirs=["app"] + ) diff --git a/surfsense_web/app/dashboard/page.tsx b/surfsense_web/app/dashboard/page.tsx index 4e19545..1418b80 100644 --- a/surfsense_web/app/dashboard/page.tsx +++ b/surfsense_web/app/dashboard/page.tsx @@ -211,6 +211,7 @@ const DashboardPage = () => {
{searchSpaces && searchSpaces.map((space) => ( + { alt={space.name} className="h-full w-full object-cover grayscale duration-700 group-hover:grayscale-0" /> -
-
- - - - - -
+
- - - - - - - Delete Search Space - - Are you sure you want to delete "{space.name}"? This action cannot be undone. - All documents, chats, and podcasts in this search space will be permanently deleted. - - - - Cancel - handleDeleteSearchSpace(space.id)} - className="bg-destructive hover:bg-destructive/90" - > - Delete - - - - +
e.preventDefault()}> + + + + + + + Delete Search Space + + Are you sure you want to delete "{space.name}"? This action cannot be undone. + All documents, chats, and podcasts in this search space will be permanently deleted. + + + + Cancel + handleDeleteSearchSpace(space.id)} + className="bg-destructive hover:bg-destructive/90" + > + Delete + + + + +
@@ -298,6 +294,7 @@ const DashboardPage = () => { + ))} {searchSpaces.length === 0 && ( @@ -350,4 +347,4 @@ const DashboardPage = () => { ) } -export default DashboardPage \ No newline at end of file +export default DashboardPage