소스 검색

feat: support py Python for code execution

arkohut 11 달 전
부모
커밋
b443d61c6f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/lib/components/chat/Messages/CodeBlock.svelte

+ 1 - 1
src/lib/components/chat/Messages/CodeBlock.svelte

@@ -213,7 +213,7 @@ __builtins__.input = input`);
 			<div class="p-1">{@html lang}</div>
 
 			<div class="flex items-center">
-				{#if lang === 'python' || (lang === '' && checkPythonCode(code))}
+				{#if lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code))}
 					{#if executing}
 						<div class="copy-code-button bg-none border-none p-1 cursor-not-allowed">Running</div>
 					{:else}