File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -40,16 +40,18 @@ BrowserUI.create({
4040});
4141```
4242
43- Or use the unpkg CDN to use it on any webpage:
43+ < br />
4444
45- - ** CDN URL** : https://unpkg.com/@agent-infra/browser/dist/bundle/index.js
45+ Or use the unpkg CDN:
46+
47+ - ** CDN URL** : https://unpkg.com/@agent-infra/browser-ui/dist/bundle/index.js
4648
4749``` html
4850<!doctype html>
4951<html lang =" en" >
5052 <body >
5153 <div id =" browserContainer" ></div >
52- <script src =" https://unpkg.com/@agent-infra/browser/dist/bundle/index.js" ></script >
54+ <script src =" https://unpkg.com/@agent-infra/browser-ui /dist/bundle/index.js" ></script >
5355 <script >
5456 const BrowserUI = window .agent_infra_browser_ui .BrowserUI ;
5557
@@ -67,6 +69,8 @@ Or use the unpkg CDN to use it on any webpage:
6769</html >
6870```
6971
72+ <br />
73+
7074A complete usable example, which can be run directly with ` npm run dev ` in the current directory or viewed in the ` /examples ` directory within the package.
7175
7276## Features
Original file line number Diff line number Diff line change @@ -40,16 +40,18 @@ BrowserUI.create({
4040});
4141```
4242
43- 或者直接使用 unpkg CDN 在任意网页中使用:
43+ <br />
44+
45+ 或者直接使用 unpkg CDN:
4446
45- - ** CDN URL** : https://unpkg.com/@agent-infra/browser/dist/bundle/index.js
47+ - ** CDN URL** : https://unpkg.com/@agent-infra/browser-ui /dist/bundle/index.js
4648
4749``` html
4850<!doctype html>
4951<html lang =" en" >
5052 <body >
5153 <div id =" browserContainer" ></div >
52- <script src =" https://unpkg.com/@agent-infra/browser/dist/bundle/index.js" ></script >
54+ <script src =" https://unpkg.com/@agent-infra/browser-ui /dist/bundle/index.js" ></script >
5355 <script >
5456 const BrowserUI = window .agent_infra_browser_ui .BrowserUI ;
5557
Original file line number Diff line number Diff line change @@ -42,19 +42,14 @@ async function main() {
4242
4343 if ( req . url === '/' || req . url === '/index.html' ) {
4444 const indexPath = new URL ( './index.html' , import . meta. url ) . pathname ;
45- console . log ( `Reading file: ${ indexPath } ` ) ;
46-
4745 let html = await readFile ( indexPath , 'utf-8' ) ;
48- console . log ( 'File read successfully' ) ;
4946
5047 // Replace the import.meta.WSEndpoint with the actual wsEndpoint
5148 html = html . replace (
5249 'import.meta.WSEndpoint' ,
5350 JSON . stringify ( wsEndpoint ) ,
5451 ) ;
5552
56- console . log ( 'HTML length:' , html . length ) ;
57-
5853 res . writeHead ( 200 , { 'Content-Type' : 'text/html' } ) ;
5954 res . end ( html ) ;
6055 } else if ( req . url ?. startsWith ( '/dist/' ) ) {
You can’t perform that action at this time.
0 commit comments