enh: enable_code_execution toggle

Co-Authored-By: recrudesce <6450799+recrudesce@users.noreply.github.com>
This commit is contained in:
Timothy Jaeryang Baek
2025-03-05 19:06:28 -08:00
parent dce24225e0
commit 5e78a5c510
6 changed files with 28 additions and 3 deletions

View File

@@ -439,7 +439,7 @@
</div>
</button>
{#if lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code))}
{#if ($config?.features?.enable_code_execution ?? true) && (lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code)))}
{#if executing}
<div class="run-code-button bg-none border-none p-1 cursor-not-allowed">Running</div>
{:else if run}