Skip to content

Commit 5617c29

Browse files
committed
Add changeset for terminal carriage return fix
1 parent 97371b8 commit 5617c29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.changeset/cuddly-cows-sip.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
I introduced a new method `processCarriageReturns` in `TerminalProcess.ts` to process carriage returns in terminal output. This method splits the output into lines, handles each line with `\r` by retaining only the content after the last carriage return, and preserves escape sequences to avoid breaking terminal formatting. The method is called within `getUnretrievedOutput` to ensure output is processed before being displayed. Additionally, I added comprehensive test cases in `TerminalProcess.test.ts` under a new `describe("processCarriageReturns", ...)` block to validate various scenarios, including basic progress bars, multiple lines, and ANSI escape sequences.
6+
7+
Key implementation details:
8+
9+
- The solution carefully handles special characters and escape sequences to maintain terminal integrity.
10+
- Tradeoff: Slightly increased processing overhead for outputs with carriage returns, but this is negligible compared to the improved user experience.
11+
- I’d like reviewers to pay close attention to the handling of edge cases in `processCarriageReturns` (e.g., lines ending with `\r` or mixed content with escape sequences) to ensure no unintended side effects.

0 commit comments

Comments
 (0)