some commit

This commit is contained in:
EthanShoeDev
2025-09-17 20:24:25 -04:00
parent 07f7ce9a6f
commit c445eef1d1
2 changed files with 5 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ function ShellDetail() {
const listenerId = connection.addChannelListener((data: ArrayBuffer) => {
// Forward bytes to terminal (no string conversion)
xterm?.write(new Uint8Array(data));
const uInt8 = new Uint8Array(data);
xterm?.write(uInt8);
});
return () => {
@@ -118,7 +119,7 @@ function ShellDetail() {
theme.colors.background,
theme.colors.textPrimary,
);
xtermRef.current?.setFont?.('Menlo, ui-monospace, monospace', 14);
xtermRef.current?.setFont?.('Menlo, ui-monospace, monospace', 50);
}}
onMessage={(message) => {
if (message.type === 'initialized') {

View File

@@ -66,6 +66,7 @@ export function XtermJsWebView({
// ---- RN -> WebView message sender via injectJavaScript + window MessageEvent
const send = (obj: OutboundMessage) => {
const payload = JSON.stringify(obj);
console.log('sending msg', payload);
const js = `window.dispatchEvent(new MessageEvent('message',{data:${JSON.stringify(
payload,
)}})); true;`;
@@ -148,6 +149,7 @@ export function XtermJsWebView({
onMessage={(event) => {
try {
const msg: InboundMessage = JSON.parse(event.nativeEvent.data);
console.log('received msg', msg);
if (msg.type === 'initialized') {
onMessage?.({ type: 'initialized' });
return;