diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx index cee450788..a7534b2a1 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx @@ -1,12 +1,13 @@ "use client"; +import { Info } from "lucide-react"; import { useCallback, useEffect, useState } from "react"; import { toast } from "sonner"; import { z } from "zod"; +import { Alert, AlertDescription } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; -import { Label } from "@/components/ui/label"; +import { PlateEditor } from "@/components/editor/plate-editor"; import { Spinner } from "@/components/ui/spinner"; -import { Textarea } from "@/components/ui/textarea"; import { baseApiService } from "@/lib/apis/base-api.service"; const MEMORY_HARD_LIMIT = 25_000; @@ -69,6 +70,11 @@ export function MemoryContent() { } }; + const handleMarkdownChange = useCallback((md: string) => { + const trimmed = md.trim(); + setMemory(trimmed); + }, []); + const hasChanges = memory !== savedMemory; const charCount = memory.length; const isOverLimit = charCount > MEMORY_HARD_LIMIT; @@ -90,33 +96,32 @@ export function MemoryContent() { return (
- This is your personal memory document. The AI assistant reads it at the start of - every conversation and uses it to personalize responses. You can edit it directly - or let the assistant update it during conversations. -
-- This is the shared memory document for this search space. The AI assistant reads - it at the start of every conversation and uses it for team-wide context. You can - edit it directly or let the assistant update it during conversations. -
-