Roo-Code/src
Eric Wheeler 0b4fa0b1d6 feat: compress repeated terminal output lines
Add Terminal.compressTerminalOutput static method to apply run-length encoding
before truncating terminal output. This significantly reduces output size for
repeated lines while maintaining readability.

- Add compressTerminalOutput static method to Terminal class
- Replace all truncateOutput calls with Terminal.compressTerminalOutput
- Import required functions from extract-text

Test program demonstrating compression:
```python
def generate_repeats():
    patterns = [
        ("A\n", 10),          # 10 lines
        ("AA\n", 100),        # 100 lines
        ("AAA\n", 1000),      # 1K lines
        ("AAAA\n", 10000),    # 10K lines
        ("AAAAA\n", 100000),  # 100K lines
        ("AAAAAA\n", 1000000) # 1M lines
    ]

    for text, count in patterns:
        print(text * count, end="")
```

Sample output showing compression:
```
A
A
A
A
A
A
A
A
A
A
AA
<previous line repeated 99 additional times>
AAA
<previous line repeated 999 additional times>
AAAA
<previous line repeated 9999 additional times>
AAAAA
<previous line repeated 99999 additional times>
AAAAAA
<previous line repeated 999999 additional times>
```

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-10 20:55:05 -07:00
..
__mocks__ Strip BOM when applying diffs 2025-03-08 17:50:49 -05:00
activate refactor: move getTerminalContents to Terminal class 2025-03-10 20:55:05 -07:00
api Fix usage tracking for SiliconFlow etc 2025-03-10 22:59:08 -04:00
core feat: compress repeated terminal output lines 2025-03-10 20:55:05 -07:00
exports Update src/exports/README.md 2025-03-10 11:24:21 -07:00
integrations feat: compress repeated terminal output lines 2025-03-10 20:55:05 -07:00
services Merge pull request #1528 from afshawnlotfi/chrome-remote-webtools 2025-03-10 21:37:20 -04:00
shared Revert "Smart truncation for terminal output" 2025-03-10 20:54:53 -07:00
utils Revert "Smart truncation for terminal output" 2025-03-10 20:54:53 -07:00
extension.ts fix: prevent duplicate terminal handler registration 2025-03-10 20:55:05 -07:00