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 8403c641c..4d1274282 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
@@ -85,6 +85,7 @@ export function MemoryContent() {
}
};
+ const displayMemory = memory.replace(/\(\d{4}-\d{2}-\d{2}\)\s*/g, "");
const charCount = memory.length;
const getCounterColor = () => {
@@ -102,6 +103,19 @@ export function MemoryContent() {
);
}
+ if (!memory) {
+ return (
+
+
+ What does SurfSense remember?
+
+
+ Nothing yet. SurfSense picks up on your preferences and context as you chat.
+
+
+ );
+ }
+
return (
@@ -116,7 +130,7 @@ export function MemoryContent() {
setEditQuery(e.target.value)}
onKeyDown={handleKeyDown}
- placeholder="e.g. "I prefer TypeScript over JavaScript" or "Remove the entry about Tokyo""
+ placeholder="Tell SurfSense what to remember or forget"
disabled={editing}
rows={2}
className="pr-12 resize-none text-sm"
diff --git a/surfsense_web/components/editor/plate-editor.tsx b/surfsense_web/components/editor/plate-editor.tsx
index 86bac6a2e..61f84126c 100644
--- a/surfsense_web/components/editor/plate-editor.tsx
+++ b/surfsense_web/components/editor/plate-editor.tsx
@@ -3,7 +3,7 @@
import { MarkdownPlugin, remarkMdx } from "@platejs/markdown";
import { slateToHtml } from "@slate-serializers/html";
import type { AnyPluginConfig, Descendant, Value } from "platejs";
-import { createPlatePlugin, Key, Plate, usePlateEditor } from "platejs/react";
+import { createPlatePlugin, Key, Plate, useEditorReadOnly, usePlateEditor } from "platejs/react";
import { useEffect, useMemo, useRef } from "react";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";
@@ -60,6 +60,24 @@ export interface PlateEditorProps {
extraPlugins?: AnyPluginConfig[];
}
+function PlateEditorContent({
+ editorVariant,
+ placeholder,
+}: {
+ editorVariant: PlateEditorProps["editorVariant"];
+ placeholder?: string;
+}) {
+ const isReadOnly = useEditorReadOnly();
+
+ return (
+
+ );
+}
+
export function PlateEditor({
markdown,
html,
@@ -188,7 +206,7 @@ export function PlateEditor({
}}
>
-
+
diff --git a/surfsense_web/components/settings/team-memory-manager.tsx b/surfsense_web/components/settings/team-memory-manager.tsx
index 1e469f28c..01cb7bbdb 100644
--- a/surfsense_web/components/settings/team-memory-manager.tsx
+++ b/surfsense_web/components/settings/team-memory-manager.tsx
@@ -88,6 +88,7 @@ export function TeamMemoryManager({ searchSpaceId }: TeamMemoryManagerProps) {
}
};
+ const displayMemory = memory.replace(/\(\d{4}-\d{2}-\d{2}\)\s*/g, "");
const charCount = memory.length;
const getCounterColor = () => {
@@ -105,6 +106,19 @@ export function TeamMemoryManager({ searchSpaceId }: TeamMemoryManagerProps) {
);
}
+ if (!memory) {
+ return (
+
+
+ What does SurfSense remember about your team?
+
+
+ Nothing yet. SurfSense picks up on team decisions and conventions as your team chats.
+
+
+ );
+ }
+
return (
@@ -119,7 +133,7 @@ export function TeamMemoryManager({ searchSpaceId }: TeamMemoryManagerProps) {
setEditQuery(e.target.value)}
onKeyDown={handleKeyDown}
- placeholder="e.g. "We decided to use PostgreSQL" or "Remove the standup entry""
+ placeholder="Tell SurfSense what to remember or forget about your team"
disabled={editing}
rows={2}
className="pr-12 resize-none text-sm"