MCPcopy Index your code
hub / github.com/freecodexyz/free-code / getTaskOutput

Function getTaskOutput

src/components/tasks/ShellDetailDialog.tsx:34–48  ·  view source on GitHub ↗

* Read the tail of the task output file. Only reads the last few KB, * not the entire file.

(shell: DeepImmutable<LocalShellTaskState>)

Source from the content-addressed store, hash-verified

32 * not the entire file.
33 */
34async 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}
49export function ShellDetailDialog(t0) {
50 const $ = _c(57);
51 const {

Callers 2

ShellDetailDialogFunction · 0.70
_tempFunction · 0.70

Calls 2

getTaskOutputPathFunction · 0.85
tailFileFunction · 0.85

Tested by

no test coverage detected