Initial commit: add a dedicated page for managing the knowledge base

- One current issue in the Khoj application is that managing the files being referenced as the user's knowledge base is slightly opaque and difficult to access
- Add a migration for associating the fileobjects directly with the Entry objects, making it easier to get data via foreign key
- Add the new page that shows all indexed files in the search view, also allowing you to upload new docs directly from that page
- Support new APIs for getting / deleting files
This commit is contained in:
sabaimran
2025-01-10 16:24:50 -08:00
parent 65f1c27963
commit 454a752071
10 changed files with 788 additions and 56 deletions

View File

@@ -17,7 +17,7 @@ import {
KhojSearchLogo,
} from "../logo/khojLogo";
import { Gear } from "@phosphor-icons/react/dist/ssr";
import { Plus } from "@phosphor-icons/react";
import { Book, Plus } from "@phosphor-icons/react";
import { useEffect, useState } from "react";
import AllConversations from "../allConversations/allConversations";
import FooterMenu from "../navMenu/navMenu";
@@ -26,6 +26,7 @@ import { useIsMobileWidth } from "@/app/common/utils";
import { UserPlusIcon } from "lucide-react";
import { useAuthenticatedData } from "@/app/common/auth";
import LoginPrompt from "../loginPrompt/loginPrompt";
import { url } from "inspector";
// Menu items.
const items = [
@@ -54,6 +55,11 @@ const items = [
url: "/settings",
icon: Gear,
},
{
title: "Knowledge Base",
url: "/knowledge",
icon: Book,
},
];
const SIDEBAR_KEYBOARD_SHORTCUT = "b";