It records escape sequences verbatim during capture, then handles them intelligently during replay.
Recording phase: All terminal output including ANSI escape codes, color sequences, and cursor movements are captured exactly as they appear - no processing or stripping occurs.
Replay phase:
- Decodes various escape formats (\u001b, \033, \x1b) back to actual
escape characters
- Filters out problematic terminal query sequences that could cause
artifacts
- Preserves visual escape sequences (colors, cursor positioning) for
faithful reproduction
So yes, escape sequences are recorded verbatim, but the replayer ntelligently processes them to recreate the original terminal experience while avoiding terminal corruption.
That sounds like a good strategy! I've dabbled in writing task runner, and relaying logs with preserved colors and formatting without messing up the terminal and interleaving messages from different tasks is a huge hurdle.
I wish there was a standard for telling processes "keep the colored and formatted output, but assume it will be read line by line"... It's possible to just let processes write into pty's and then parse the output, but then you pretty much have to implement an entire nested terminal emulator :-(
It records escape sequences verbatim during capture, then handles them intelligently during replay.
Recording phase: All terminal output including ANSI escape codes, color sequences, and cursor movements are captured exactly as they appear - no processing or stripping occurs.
Replay phase: - Decodes various escape formats (\u001b, \033, \x1b) back to actual escape characters - Filters out problematic terminal query sequences that could cause artifacts - Preserves visual escape sequences (colors, cursor positioning) for faithful reproduction
So yes, escape sequences are recorded verbatim, but the replayer ntelligently processes them to recreate the original terminal experience while avoiding terminal corruption.
That sounds like a good strategy! I've dabbled in writing task runner, and relaying logs with preserved colors and formatting without messing up the terminal and interleaving messages from different tasks is a huge hurdle.
I wish there was a standard for telling processes "keep the colored and formatted output, but assume it will be read line by line"... It's possible to just let processes write into pty's and then parse the output, but then you pretty much have to implement an entire nested terminal emulator :-(