diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte
index 4131fbd85..b9f6382ab 100644
--- a/src/lib/components/chat/Messages/CodeBlock.svelte
+++ b/src/lib/components/chat/Messages/CodeBlock.svelte
@@ -213,7 +213,7 @@ __builtins__.input = input`);
- {#if ['', 'python'].includes(lang) && (lang === 'python' || checkPythonCode(code))}
+ {#if lang === 'python' || (lang === '' && checkPythonCode(code))}
{#if executing}
Running
{:else}
diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte
index 6b929795f..66cb37755 100644
--- a/src/routes/(app)/+page.svelte
+++ b/src/routes/(app)/+page.svelte
@@ -345,8 +345,8 @@
? {
role: 'system',
content:
- $settings.system + (responseMessage?.userContext ?? null)
- ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}`
+ $settings.system + responseMessage?.userContext ?? null
+ ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: ''
}
: undefined,
@@ -605,7 +605,7 @@
role: 'system',
content:
$settings.system + (responseMessage?.userContext ?? null)
- ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}`
+ ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: ''
}
: undefined,
diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte
index 8bf3b6d54..91d6098cd 100644
--- a/src/routes/(app)/c/[id]/+page.svelte
+++ b/src/routes/(app)/c/[id]/+page.svelte
@@ -351,8 +351,8 @@
? {
role: 'system',
content:
- $settings.system + (responseMessage?.userContext ?? null)
- ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}`
+ $settings.system + responseMessage?.userContext ?? null
+ ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: ''
}
: undefined,
@@ -611,7 +611,7 @@
role: 'system',
content:
$settings.system + (responseMessage?.userContext ?? null)
- ? `\n\nUser Context:\n${responseMessage.userContext.join('\n')}`
+ ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: ''
}
: undefined,