feat(agent): Connect AI 웹사이트 탐색 기능(read_url) 추가 및 웹 스크래핑 구현
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import * as fs from 'fs';
|
||||
const base = fs.readFileSync('src/extension.ts', 'utf-8');
|
||||
const match = base.match(/_getHtml.*?\{\s*return\s+(`(?:[^`]|\\`)*`);/m);
|
||||
if (match) {
|
||||
let templateBody = match[1];
|
||||
// make it a valid JS file
|
||||
fs.writeFileSync('test_html2.js', `const html = ${templateBody};\nfs.writeFileSync('test_eval3.html', html);\nconsole.log(html.length);`);
|
||||
}
|
||||
Reference in New Issue
Block a user