This commit is contained in:
ACoolName 2024-06-02 22:30:04 +03:00
parent e45936b53f
commit 02c62d2bc7

View File

@ -288,9 +288,7 @@ export function ActionItem(p: { action: ActionInfo, identifierSubstring?: string
<script>
window.onload = function() {
const Terminal = window.Terminal;
const FitAddon = window.FitAddon;
const terminalContainer = document.getElementById('terminal-container');
const terminalContainer = document.getElementById('root');
const terminal = new Terminal();
const fitAddon = new FitAddon();
@ -306,11 +304,11 @@ export function ActionItem(p: { action: ActionInfo, identifierSubstring?: string
};
socket.addEventListener('open', () => {
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${terminal.cols}x\`\${terminal.rows} }));
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${terminal.cols}x\${terminal.rows}\` }));
});
terminal.onResize(({ cols, rows }) => {
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${cols}x\`\${rows} }));
socket.send(JSON.stringify({ CommandType: 'resize', Arguments: \`\${cols}x\${rows}\` }));
});
socket.addEventListener('message', (event) => {