* Read the tail of the task output file. Only reads the last few KB, * not the entire file.
(shell: DeepImmutable<LocalShellTaskState>)
| 32 | * not the entire file. |
| 33 | */ |
| 34 | async function getTaskOutput(shell: DeepImmutable<LocalShellTaskState>): Promise<TaskOutputResult> { |
| 35 | const path = getTaskOutputPath(shell.id); |
| 36 | try { |
| 37 | const result = await tailFile(path, SHELL_DETAIL_TAIL_BYTES); |
| 38 | return { |
| 39 | content: result.content, |
| 40 | bytesTotal: result.bytesTotal |
| 41 | }; |
| 42 | } catch { |
| 43 | return { |
| 44 | content: '', |
| 45 | bytesTotal: 0 |
| 46 | }; |
| 47 | } |
| 48 | } |
| 49 | export function ShellDetailDialog(t0) { |
| 50 | const $ = _c(57); |
| 51 | const { |
no test coverage detected