Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev
This commit is contained in:
@@ -140,7 +140,9 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
|
||||
|
||||
if (event.data instanceof Blob) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`[Terminal ${sessionId ?? "default"}] received ${(event.data as Blob).size} bytes`);
|
||||
console.log(
|
||||
`[Terminal ${sessionId ?? "default"}] received ${(event.data as Blob).size} bytes`,
|
||||
);
|
||||
event.data.arrayBuffer().then((buffer) => {
|
||||
const data = new Uint8Array(buffer);
|
||||
termRef.current?.write(data);
|
||||
@@ -311,7 +313,9 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
|
||||
// Open xterm first (must happen before fit)
|
||||
term.open(container);
|
||||
term.focus();
|
||||
console.log(`[Terminal ${sessionId ?? "default"}] xterm opened and focused`);
|
||||
console.log(
|
||||
`[Terminal ${sessionId ?? "default"}] xterm opened and focused`,
|
||||
);
|
||||
const ws = connectWebSocket();
|
||||
|
||||
// Initial fit after layout settles (terminal must be opened first)
|
||||
@@ -337,7 +341,10 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
|
||||
// Handle terminal input
|
||||
term.onData((data) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`[Terminal ${sessionId ?? "default"}] sending:`, JSON.stringify(data));
|
||||
console.log(
|
||||
`[Terminal ${sessionId ?? "default"}] sending:`,
|
||||
JSON.stringify(data),
|
||||
);
|
||||
const currentWs = wsRef.current;
|
||||
if (currentWs?.readyState !== WebSocket.OPEN) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user