shadok-ai 0.2.72 → 0.2.73
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/public/index.html +12 -0
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -4860,6 +4860,18 @@
|
|
|
4860
4860
|
if (term && termSession && termSession.ws)
|
|
4861
4861
|
sendTo(termSession, { type: "term-input", data: strToB64Utf8(d) });
|
|
4862
4862
|
});
|
|
4863
|
+
// Selecting text in the TUI forwards the mouse to the app, which copies
|
|
4864
|
+
// and emits OSC 52 (it reports "N lines copied"). xterm ignores OSC 52 for
|
|
4865
|
+
// security, so the copy never left the pane; bridge it to the browser
|
|
4866
|
+
// clipboard. Payload is "<targets>;<base64>"; "?" is a read request (skip).
|
|
4867
|
+
term.parser.registerOscHandler(52, (data) => {
|
|
4868
|
+
const semi = data.indexOf(";");
|
|
4869
|
+
const payload = semi >= 0 ? data.slice(semi + 1) : data;
|
|
4870
|
+
if (!payload || payload === "?") return true;
|
|
4871
|
+
try { copyText(new TextDecoder().decode(b64ToBytes(payload))); }
|
|
4872
|
+
catch { /* malformed base64 → nothing to copy */ }
|
|
4873
|
+
return true; // handled
|
|
4874
|
+
});
|
|
4863
4875
|
}
|
|
4864
4876
|
if (termSession !== active) {
|
|
4865
4877
|
// Re-point the terminal at the newly-active channel (server re-seeds).
|