lua-cli 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/dev.js +5 -5
- package/package.json +1 -1
- package/template/package.json +1 -1
package/dist/commands/dev.js
CHANGED
|
@@ -483,8 +483,8 @@ function createChatServer(apiKey, agentId, skillId, sandboxId, port = 3000) {
|
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
485
|
if (req.method === 'GET' && req.url === '/') {
|
|
486
|
-
// Read the React app HTML template
|
|
487
|
-
const htmlTemplate = fs.readFileSync(path.join(__dirname, '..', '
|
|
486
|
+
// Read the React app HTML template from dist directory
|
|
487
|
+
const htmlTemplate = fs.readFileSync(path.join(__dirname, '..', 'web', 'index.html'), 'utf8');
|
|
488
488
|
// Replace placeholders with actual values
|
|
489
489
|
const html = htmlTemplate
|
|
490
490
|
.replace('{{API_KEY}}', apiKey)
|
|
@@ -498,7 +498,7 @@ function createChatServer(apiKey, agentId, skillId, sandboxId, port = 3000) {
|
|
|
498
498
|
// Serve the React app bundle
|
|
499
499
|
if (req.method === 'GET' && req.url === '/app.js') {
|
|
500
500
|
try {
|
|
501
|
-
const appJs = fs.readFileSync(path.join(__dirname, '..', '
|
|
501
|
+
const appJs = fs.readFileSync(path.join(__dirname, '..', 'web', 'app.js'), 'utf8');
|
|
502
502
|
res.writeHead(200, { 'Content-Type': 'application/javascript' });
|
|
503
503
|
res.end(appJs);
|
|
504
504
|
}
|
|
@@ -511,7 +511,7 @@ function createChatServer(apiKey, agentId, skillId, sandboxId, port = 3000) {
|
|
|
511
511
|
// Serve the CSS files
|
|
512
512
|
if (req.method === 'GET' && req.url === '/app.css') {
|
|
513
513
|
try {
|
|
514
|
-
const appCss = fs.readFileSync(path.join(__dirname, '..', '
|
|
514
|
+
const appCss = fs.readFileSync(path.join(__dirname, '..', 'web', 'app.css'), 'utf8');
|
|
515
515
|
res.writeHead(200, { 'Content-Type': 'text/css' });
|
|
516
516
|
res.end(appCss);
|
|
517
517
|
}
|
|
@@ -523,7 +523,7 @@ function createChatServer(apiKey, agentId, skillId, sandboxId, port = 3000) {
|
|
|
523
523
|
}
|
|
524
524
|
if (req.method === 'GET' && req.url === '/tools-page.css') {
|
|
525
525
|
try {
|
|
526
|
-
const toolsPageCss = fs.readFileSync(path.join(__dirname, '..', '
|
|
526
|
+
const toolsPageCss = fs.readFileSync(path.join(__dirname, '..', 'web', 'tools-page.css'), 'utf8');
|
|
527
527
|
res.writeHead(200, { 'Content-Type': 'text/css' });
|
|
528
528
|
res.end(toolsPageCss);
|
|
529
529
|
}
|
package/package.json
CHANGED