From 0b2f6404c20a54eaf344adfb17e52e604e6129bf Mon Sep 17 00:00:00 2001 From: Antonio Date: Fri, 23 Jan 2026 11:31:09 +0100 Subject: [PATCH] feat(app): add toggle to enable/disable memory context in chat - Add "Memory on/off" toggle inside chat input container - Skip automatic RAG retrieval when toggle is off - Attached memories still work when toggle is off - Toggle defaults to on (current behavior preserved) Closes #99 --- .changeset/memory-context-toggle.md | 10 +++++ app/src/components/ChatInput.tsx | 65 ++++++++++++++++------------- app/src/pages/ChatPage.tsx | 21 +++++++++- backend/app/routes/chat.py | 14 +++---- backend/app/schemas.py | 1 + 5 files changed, 74 insertions(+), 37 deletions(-) create mode 100644 .changeset/memory-context-toggle.md diff --git a/.changeset/memory-context-toggle.md b/.changeset/memory-context-toggle.md new file mode 100644 index 0000000..e7e7501 --- /dev/null +++ b/.changeset/memory-context-toggle.md @@ -0,0 +1,10 @@ +--- +"think-app": patch +--- + +feat(app): add toggle to enable/disable memory context in chat + +- Add "Memory on/off" toggle inside chat input container +- Skip automatic RAG retrieval when toggle is off +- Attached memories still work when toggle is off +- Toggle defaults to on (current behavior preserved) diff --git a/app/src/components/ChatInput.tsx b/app/src/components/ChatInput.tsx index 67572e2..630e1e4 100644 --- a/app/src/components/ChatInput.tsx +++ b/app/src/components/ChatInput.tsx @@ -10,6 +10,7 @@ interface ChatInputProps { isLoading?: boolean; placeholder?: string; className?: string; + leftContent?: React.ReactNode; } export function ChatInput({ @@ -19,6 +20,7 @@ export function ChatInput({ isLoading, placeholder = "Type your message...", className, + leftContent, }: ChatInputProps) { const inputRef = useRef(null); @@ -53,7 +55,7 @@ export function ChatInput({ return (
-