Feature (OpenMemory): Add support for LLM and Embedding Providers in OpenMemory (#2794)
This commit is contained in:
@@ -11,6 +11,8 @@ import { useMemoriesApi } from "@/hooks/useMemoriesApi";
|
||||
import Image from "next/image";
|
||||
import { useStats } from "@/hooks/useStats";
|
||||
import { useAppsApi } from "@/hooks/useAppsApi";
|
||||
import { Settings } from "lucide-react";
|
||||
import { useConfig } from "@/hooks/useConfig";
|
||||
|
||||
export function Navbar() {
|
||||
const pathname = usePathname();
|
||||
@@ -18,6 +20,7 @@ export function Navbar() {
|
||||
const memoriesApi = useMemoriesApi();
|
||||
const appsApi = useAppsApi();
|
||||
const statsApi = useStats();
|
||||
const configApi = useConfig();
|
||||
|
||||
// Define route matchers with typed parameter extraction
|
||||
const routeBasedFetchMapping: {
|
||||
@@ -52,6 +55,10 @@ export function Navbar() {
|
||||
match: /^\/$/,
|
||||
getFetchers: () => [statsApi.fetchStats, memoriesApi.fetchMemories],
|
||||
},
|
||||
{
|
||||
match: /^\/settings$/,
|
||||
getFetchers: () => [configApi.fetchConfig],
|
||||
},
|
||||
];
|
||||
|
||||
const getFetchersForPath = (path: string) => {
|
||||
@@ -127,6 +134,18 @@ export function Navbar() {
|
||||
Apps
|
||||
</Button>
|
||||
</Link>
|
||||
<Link href="/settings">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className={`flex items-center gap-2 border-none ${
|
||||
isActive("/settings") ? activeClass : inactiveClass
|
||||
}`}
|
||||
>
|
||||
<Settings />
|
||||
Settings
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user