fix(led-tool): harden Web Serial raw REPL connect
Improve boot wait, readUntil buffer handling, and settings editor host/Web Serial flows after device reset. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -185,10 +185,11 @@
|
||||
document.body.getAttribute('data-api-base') ??
|
||||
(location.pathname.includes('/led-tool') ? '/led-tool' : '');
|
||||
const prefix = api + '/static';
|
||||
const v = '20260520';
|
||||
function loadScript(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const s = document.createElement('script');
|
||||
s.src = url;
|
||||
s.src = url + (url.includes('?') ? '&' : '?') + 'v=' + v;
|
||||
s.onload = () => resolve();
|
||||
s.onerror = () => reject(new Error('Failed to load ' + url));
|
||||
document.body.appendChild(s);
|
||||
|
||||
Reference in New Issue
Block a user