Expand description
Output text handling shared by the blocking bash and shell jobs, ported from utils/ansi.ts (stripAnsi), utils/shell.ts (sanitizeBinaryOutput), core/tools/truncate.ts (truncateTail) and the streaming TextDecoder.
Structs§
- Decoder
- Streaming UTF-8 decoder with WHATWG replacement (one U+FFFD per maximal invalid subpart).
Constants§
Functions§
- clean
- Chunk text as both TS paths write it:
sanitizeBinaryOutput(stripAnsi(text)).replace(/\r/g, ""). - strip_
ansi - tail_
bytes - The last
maxbytes oftext, starting at a character boundary. - truncate_
tail - truncateTail with the default limits: the last lines that fit, else the end of the last line.
Nonewhen the text fits.