UI Updates, and fix UTF8 issues

This commit is contained in:
Andy Dixon
2026-04-21 08:59:49 +01:00
parent c5debd9c77
commit 7146063da2
8 changed files with 3629 additions and 2795 deletions
+14 -1
View File
@@ -214,6 +214,10 @@
searchAddon,
webLinksAddon,
observer,
decoder:
typeof TextDecoder !== "undefined"
? new TextDecoder("utf-8")
: null,
});
return term;
@@ -230,7 +234,16 @@
try {
const raw = atob(base64Data);
entry.term.write(raw);
if (entry.decoder) {
const bytes = new Uint8Array(raw.length);
for (let i = 0; i < raw.length; i++) {
bytes[i] = raw.charCodeAt(i);
}
const text = entry.decoder.decode(bytes, { stream: true });
entry.term.write(text);
} else {
entry.term.write(raw);
}
} catch (err) {
console.error("Failed to decode session data:", err);
}