Added Cloudflare Worker Compatible Configs (#2343)
@@ -45,7 +45,7 @@ const useUserId = () => {
|
|||||||
export const Assistant = () => {
|
export const Assistant = () => {
|
||||||
const { userId, resetUserId } = useUserId();
|
const { userId, resetUserId } = useUserId();
|
||||||
const runtime = useChatRuntime({
|
const runtime = useChatRuntime({
|
||||||
api: "/api/chat",
|
api: "https://demo.mem0.ai/api/chat",
|
||||||
body: { userId },
|
body: { userId },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
import darkAssistantUi from "@/images/assistant-ui-dark.svg";
|
||||||
|
import assistantUi from "@/images/assistant-ui.svg";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
||||||
@@ -27,7 +28,7 @@ export default function ThemeAwareLogo({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For default variant, use the full logo image
|
// For default variant, use the full logo image
|
||||||
const logoSrc = isDarkMode ? "/images/assistant-ui-dark.svg" : "/images/assistant-ui.svg";
|
const logoSrc = isDarkMode ? darkAssistantUi : assistantUi;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import darkLogo from "@/images/dark.svg";
|
||||||
|
import lightLogo from "@/images/light.svg";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
||||||
@@ -27,7 +29,7 @@ export default function ThemeAwareLogo({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For default variant, use the full logo image
|
// For default variant, use the full logo image
|
||||||
const logoSrc = isDarkMode ? "/images/dark.svg" : "/images/light.svg";
|
const logoSrc = isDarkMode ? darkLogo : lightLogo;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 371 B |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -2,6 +2,24 @@ import type { NextConfig } from "next";
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
/* config options here */
|
/* config options here */
|
||||||
|
assetPrefix: "https://demo.mem0.ai",
|
||||||
|
images: {
|
||||||
|
path: "https://demo.mem0.ai",
|
||||||
|
},
|
||||||
|
async headers() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
// matching all API routes
|
||||||
|
source: "/api/:path*",
|
||||||
|
headers: [
|
||||||
|
{ key: "Access-Control-Allow-Credentials", value: "true" },
|
||||||
|
{ key: "Access-Control-Allow-Origin", value: "*" },
|
||||||
|
{ key: "Access-Control-Allow-Methods", value: "GET,DELETE,PATCH,POST,PUT" },
|
||||||
|
{ key: "Access-Control-Allow-Headers", value: "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||