Filter Codex TUI redraw noise in Slack output
This commit is contained in:
@@ -16,3 +16,28 @@ def test_clean_terminal_output_removes_broken_csi_tokens():
|
||||
def test_clean_terminal_output_preserves_plain_text():
|
||||
raw = "line1\nline2"
|
||||
assert clean_terminal_output(raw) == "line1\nline2"
|
||||
|
||||
|
||||
def test_clean_terminal_output_removes_broken_charset_tokens():
|
||||
raw = "=(Bhello(B"
|
||||
assert clean_terminal_output(raw) == "=hello"
|
||||
|
||||
|
||||
def test_clean_terminal_output_filters_codex_tui_redraw_noise():
|
||||
raw = """=(B╭─────────────────────────────────────────────╮(B
|
||||
│ >_ OpenAI Codex (v0.101.0) │(B
|
||||
│ model: gpt-5.3-codex /model to change │(B
|
||||
│ directory: ~/repos/The-Ouroboros │(B
|
||||
╰─────────────────────────────────────────────╯(B
|
||||
Tip: New Codex is included in your plan for free
|
||||
› Find and fix a bug in @filename
|
||||
? for shortcuts
|
||||
100% context left
|
||||
Assistant: 작업을 시작합니다.
|
||||
"""
|
||||
assert clean_terminal_output(raw) == "Assistant: 작업을 시작합니다."
|
||||
|
||||
|
||||
def test_clean_terminal_output_removes_box_empty_line_noise():
|
||||
raw = "│ │\n› Explain this codebase\n"
|
||||
assert clean_terminal_output(raw) == "› Explain this codebase"
|
||||
|
||||
Reference in New Issue
Block a user