rm one pkg

This commit is contained in:
EthanShoeDev
2025-09-17 17:22:50 -04:00
parent 86ff6762a3
commit 2f5568a6d5
20 changed files with 44 additions and 225 deletions

View File

@@ -38,9 +38,9 @@ function ShellDetail() {
function sendDataToXterm(data: ArrayBuffer) {
try {
const bytes = new Uint8Array(data);
console.log('sendDataToXterm', new TextDecoder().decode(bytes));
xtermWebViewRef.current?.write(bytes);
const bytes = new Uint8Array(data.slice());
console.log('sendDataToXterm', new TextDecoder().decode(bytes.slice()));
xtermWebViewRef.current?.write(bytes.slice());
} catch (e) {
console.warn('Failed to decode shell data', e);
}
@@ -59,7 +59,10 @@ function ShellDetail() {
const xtermQueue = queueRef.current;
if (!connection || !xtermQueue) return;
const listenerId = connection.addChannelListener((data: ArrayBuffer) => {
console.log('ssh.onData', new TextDecoder().decode(new Uint8Array(data)));
console.log(
'ssh.onData',
new TextDecoder().decode(new Uint8Array(data.slice())),
);
void xtermQueue.add(() => {
sendDataToXterm(data);
});
@@ -126,7 +129,7 @@ setTimeout(() => {
}
const data = message.data;
console.log('xterm.onMessage', new TextDecoder().decode(data));
void shell?.sendData(data.buffer as ArrayBuffer);
void shell?.sendData(data.slice().buffer as ArrayBuffer);
}}
/>
</View>