diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index a1993648b..945568d57 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -4,7 +4,7 @@ import { tick } from 'svelte'; import Name from './Name.svelte'; import ProfileImage from './ProfileImage.svelte'; - import { modelfiles } from '$lib/stores'; + import { modelfiles, settings } from '$lib/stores'; export let user; export let message; @@ -60,6 +60,8 @@ {:else} You {message?.user ?? ''} {/if} + {:else if $settings.showUsername} + {user.name} {:else} You {/if} diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index 4c142a38d..a30e5eac3 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -16,6 +16,13 @@ // Interface let promptSuggestions = []; + let showUsername = false; + + const toggleShowUsername = async () => { + showUsername = !showUsername; + saveSettings({ showUsername: showUsername }); + }; + const toggleSpeechAutoSend = async () => { speechAutoSend = !speechAutoSend; @@ -64,7 +71,7 @@ titleAutoGenerate = settings.titleAutoGenerate ?? true; speechAutoSend = settings.speechAutoSend ?? false; responseAutoCopy = settings.responseAutoCopy ?? false; - + showUsername = settings.showUsername ?? false; titleAutoGenerateModel = settings.titleAutoGenerateModel ?? ''; }); @@ -139,6 +146,25 @@ +
+
+
Display the username instead of "You" in the Chat
+ + +
+