diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index ce4362215..17c29ab39 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -335,11 +335,11 @@ scrollToBottom(); const messagesBody = [ - $settings.system || responseMessage?.userContext + $settings.system || (responseMessage?.userContext ?? null) ? { role: 'system', content: - $settings.system + (responseMessage?.userContext ?? null) + $settings.system + !!(responseMessage?.userContext ?? null) ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}` : '' } @@ -594,11 +594,11 @@ model: model.id, stream: true, messages: [ - $settings.system || responseMessage?.userContext + $settings.system || (responseMessage?.userContext ?? null) ? { role: 'system', content: - $settings.system + (responseMessage?.userContext ?? null) + $settings.system + !!(responseMessage?.userContext ?? null) ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}` : '' } diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 8f9051d61..072686e32 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -340,11 +340,11 @@ scrollToBottom(); const messagesBody = [ - $settings.system || responseMessage?.userContext + $settings.system || (responseMessage?.userContext ?? null) ? { role: 'system', content: - $settings.system + (responseMessage?.userContext ?? null) + $settings.system + !!(responseMessage?.userContext ?? null) ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}` : '' } @@ -599,11 +599,11 @@ model: model.id, stream: true, messages: [ - $settings.system || responseMessage?.userContext + $settings.system || (responseMessage?.userContext ?? null) ? { role: 'system', content: - $settings.system + (responseMessage?.userContext ?? null) + $settings.system + !!(responseMessage?.userContext ?? null) ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}` : '' }