From 22d23afbafcfd827d58dc85c30dfb0213f00f379 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 19 May 2024 00:17:40 -0700 Subject: [PATCH] feat: memory ui frontend --- .../chat/Settings/Personalization.svelte | 21 ++- .../Personalization/AddMemoryModal.svelte | 105 +++++++++++++++ .../Personalization/ManageModal.svelte | 123 ++++++------------ src/lib/components/common/Modal.svelte | 2 +- 4 files changed, 167 insertions(+), 84 deletions(-) create mode 100644 src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte diff --git a/src/lib/components/chat/Settings/Personalization.svelte b/src/lib/components/chat/Settings/Personalization.svelte index 2a339407e..d2528d743 100644 --- a/src/lib/components/chat/Settings/Personalization.svelte +++ b/src/lib/components/chat/Settings/Personalization.svelte @@ -5,12 +5,16 @@ import { config, models, settings, user } from '$lib/stores'; import { createEventDispatcher, onMount, getContext, tick } from 'svelte'; import { toast } from 'svelte-sonner'; + import ManageModal from './Personalization/ManageModal.svelte'; + import Tooltip from '$lib/components/common/Tooltip.svelte'; const dispatch = createEventDispatcher(); const i18n = getContext('i18n'); export let saveSettings: Function; + let showManageModal = false; + // Addons let enableMemory = true; @@ -20,6 +24,8 @@ }); + +
{ @@ -29,9 +35,15 @@
-
- {$i18n.t('Memory')} ({$i18n.t('Beta')}) -
+ +
+ {$i18n.t('Memory')} + + ({$i18n.t('Experimental')}) +
+
{ + showManageModal = true; + }} > Manage diff --git a/src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte b/src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte new file mode 100644 index 000000000..a3a74c19b --- /dev/null +++ b/src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte @@ -0,0 +1,105 @@ + + + +
+
+
{$i18n.t('Add Memory')}
+ +
+ +
+
+ { + submitHandler(); + }} + > +
+