You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(filtering): remove terminal output overwritten by control flow (\r and \b) #2230
It's not uncommon for tools (like ollama, npm, curl, bazel, ninja, cmake...) to emit self-overwriting progress messages like like for example ⠋\b⠙\b⠹\b⠸\b⠼\b⠴\b⠦\b⠧\b⠇\b⠏\b or Downloading... 0%\rDownloading... 1%\rDownloading... 2%\rDownloading... 3%\r. I can't really think of any situation where one would want an LLM to see output intermediate outputs that would be only transiently visible to a human.
\r and \b are the most common cases to handle, but there's also ansi sequences that e.g. ncurses uses, like
\e[A (moves up one line)
\e[{N}A (e.g., \e[3A moves up 3 lines)
\e[B (move down)
\e[C (move forward)
\e[D (more backward)
\e[{row};{col}H (e.g., \e[1;1H moves to the top-left corner)
There's currently functionality to strip out ansi sequences, which is good for color etc, but that's not necessarily the desired behavior here. Implementing this comprehensively would probably end up being equivalent to writing a terminal emulator, particularly with the absolute positioning sequences. That might be tricky to implement, but there are many common cases which only update part or all of the most recent line, which could be handled more easily.
This should be applied before the output is separated into lines (especially if one wishes to eventually deal with multi-line edits). For one thing, \r\n is a completely different animal from \r without the \n (which should also probably be normalized, in general, for the benefit of Windows users who otherwise might find toml matchers failing to detect lines that look like they should be detected). Also perhaps obviously would need to happen before strip_ansi gets applied
This issue has been automatically marked as stale due to 90 days of inactivity. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please open a new issue with up-to-date information. Thank you!
Activity
rtk-release-bot commentedon Sep 3, 2026
This issue has been automatically marked as stale due to 90 days of inactivity. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet.
rtk-release-bot commentedon Sep 14, 2026
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please open a new issue with up-to-date information. Thank you!