浏览代码

refac: include packages

Timothy J. Baek 11 月之前
父节点
当前提交
8766d2699a
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      src/lib/components/chat/Messages/CodeBlock.svelte

+ 7 - 2
src/lib/components/chat/Messages/CodeBlock.svelte

@@ -183,7 +183,10 @@
 					code.includes('bs4') ? 'beautifulsoup4' : null,
 					code.includes('numpy') ? 'numpy' : null,
 					code.includes('pandas') ? 'pandas' : null,
-					code.includes('matplotlib') ? 'matplotlib' : null
+					code.includes('matplotlib') ? 'matplotlib' : null,
+					code.includes('scikit-learn') ? 'sklearn' : null,
+					code.includes('scipy') ? 'scipy' : null,
+					code.includes('re') ? 'regex' : null
 				].filter(Boolean);
 
 				console.log(packages);
@@ -230,7 +233,9 @@ __builtins__.input = input`);
 			code.includes('bs4') ? 'beautifulsoup4' : null,
 			code.includes('numpy') ? 'numpy' : null,
 			code.includes('pandas') ? 'pandas' : null,
-			code.includes('matplotlib') ? 'matplotlib' : null
+			code.includes('scikit-learn') ? 'sklearn' : null,
+			code.includes('scipy') ? 'scipy' : null,
+			code.includes('re') ? 'regex' : null
 		].filter(Boolean);
 
 		const pyodideWorker = new PyodideWorker();