agentgui 1.0.326 → 1.0.327
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/package.json +1 -1
- package/server.js +1 -1
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -2860,7 +2860,7 @@ function serveFile(filePath, res, req) {
|
|
|
2860
2860
|
const baseTag = `<script>window.__BASE_URL='${BASE_URL}';</script>`;
|
|
2861
2861
|
content = content.replace('<head>', '<head>\n ' + baseTag);
|
|
2862
2862
|
if (watch) {
|
|
2863
|
-
content += `\n<script>(function(){const ws=new WebSocket('ws://'+location.host+'${BASE_URL}/hot-reload');ws.onmessage=e=>{if(JSON.parse(e.data).type==='reload')location.reload()};})();</script>`;
|
|
2863
|
+
content += `\n<script>(function(){const ws=new WebSocket((location.protocol==='https:'?'wss://':'ws://')+location.host+'${BASE_URL}/hot-reload');ws.onmessage=e=>{if(JSON.parse(e.data).type==='reload')location.reload()};})();</script>`;
|
|
2864
2864
|
}
|
|
2865
2865
|
compressAndSend(req, res, 200, contentType, content);
|
|
2866
2866
|
});
|