refactor(web): support same-origin backend and zero urls

This commit is contained in:
Anish Sarkar 2026-06-15 11:03:45 +05:30
parent 2373014943
commit f5d04cf8ba
11 changed files with 62 additions and 36 deletions

View file

@ -1,6 +1,7 @@
"use client";
import { authenticatedFetch } from "@/lib/auth-utils";
import { BACKEND_URL } from "@/lib/env-config";
export type MemoryScope = "user" | "team";
@ -30,7 +31,7 @@ function getMemoryPath(scope: MemoryScope, searchSpaceId?: number | null) {
}
function getBackendUrl(path: string) {
return `${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}${path}`;
return `${BACKEND_URL}${path}`;
}
export function getMemoryLimitState(length: number, limits?: MemoryLimits | null) {