fix(terminal): use real TTY exec and resize

This commit is contained in:
Gabriel Brown
2026-07-10 17:21:52 -04:00
parent 906f906ad3
commit c4d0f5219a
3 changed files with 124 additions and 70 deletions
+8
View File
@@ -1,6 +1,7 @@
import { mkdir } from 'node:fs/promises';
import path from 'node:path';
import type { Readable } from 'node:stream';
import Docker from 'dockerode';
import { execa } from 'execa';
import { env } from '../env';
@@ -10,6 +11,13 @@ type CommandResult = {
output: string;
};
let dockerClient: Docker | undefined;
export const getDockerClient = () => {
dockerClient ??= new Docker();
return dockerClient;
};
const environmentArgs = (environment: Record<string, string>) =>
Object.entries(environment).flatMap(([name, value]) => [
'-e',