Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
8afd03f
feat: Rich-based rendering engine with intra-line diff highlighting
KUSH42 Apr 1, 2026
d900363
fix(rich_output): Error token uses text colour not background
KUSH42 Apr 1, 2026
d146031
feat(rich_output): truncate DiffRenderer output at 80 lines
KUSH42 Apr 2, 2026
bbd0fd9
feat(rich_output): syntax highlighting in diff output
KUSH42 Apr 2, 2026
d253b88
fix(rich_output): extend diff background to line numbers and sigils
KUSH42 Apr 2, 2026
2a2d82f
fix(rich_output): preserve path-distinct diff headers and summary counts
KUSH42 Apr 5, 2026
6f7efa7
fix: unblock read-file guards and color assertions in tests
KUSH42 Apr 5, 2026
5d2a3fb
feat(config): expose diff and preview line limits in config.yaml
KUSH42 Apr 7, 2026
4a9131b
fix(reasoning): make show_reasoning sole gate for reasoning callback
KUSH42 Apr 7, 2026
a1f35f2
test(reasoning,display): fix stub isolation and add coverage for toda…
KUSH42 Apr 7, 2026
5b0c193
fix(tui): animate spinner during agent runs
KUSH42 Apr 7, 2026
40731f9
feat(tui): configurable spinner style + terminal tab/title animation
KUSH42 Apr 7, 2026
7037ca5
fix(display): wire missing imports and suppress code snippet when hig…
KUSH42 Apr 7, 2026
8930a02
feat: syntax highlighting for tool outputs and LLM responses
KUSH42 Apr 1, 2026
f1ba399
fix(rich_output): remove fence delimiters from Panel output
KUSH42 Apr 1, 2026
ceef43d
feat(rich_output): add line numbers to fenced code blocks
KUSH42 Apr 2, 2026
4eed9d3
fix(rich_output): use rich.markup.escape() to fix bracket/backslash r…
KUSH42 Apr 2, 2026
09bdc0d
fix(rich_output): resolve width=0 rendering, dead import, and _intra_…
KUSH42 Apr 3, 2026
4304e84
test(rich_output): align PR2 diff expectations with renderer output
KUSH42 Apr 5, 2026
054e527
test(rich_output): align PR3 diff expectations with renderer output
KUSH42 Apr 5, 2026
af167ab
test(rich_output): update PR3 paired-diff expectation after rebase
KUSH42 Apr 5, 2026
11fdf2e
test(rich_output): relax PR3 paired-diff ANSI assertion after rebase
KUSH42 Apr 5, 2026
22ebed0
feat(rich_output): stateful block markdown rendering (PR4)
KUSH42 Apr 2, 2026
60bd13e
fix(rich_output): table column misalignment when cells contain inline…
KUSH42 Apr 2, 2026
6eefedd
fix(rich_output): table column misalignment with wide/emoji characters
KUSH42 Apr 2, 2026
8da2fbd
fix(tests): update link test — URL preserved in output
KUSH42 Apr 2, 2026
11e5ddb
fix(rich_output): OL items after '---' falsely become setext headings
KUSH42 Apr 2, 2026
e43078c
feat(rich_output): bright-blue link color (_MD_LINK_ANSI)
KUSH42 Apr 2, 2026
9b6ac12
fix(rich_output): use truecolor for link color instead of ansibrightblue
KUSH42 Apr 2, 2026
22db3b3
feat(rich_output): style bare https?:// URLs with link color
KUSH42 Apr 2, 2026
d2c05e4
feat(rich_output): extend bare URL detection to file://, ftp://, www.
KUSH42 Apr 2, 2026
fcfe193
fix(rich_output): bare URL regex captures ESC byte inside bold/italic…
KUSH42 Apr 2, 2026
7e13261
fix(rich_output): diff deletion line numbers diverge from new-file scale
KUSH42 Apr 2, 2026
125001a
feat(rich_output): support GFM optional boundary pipes in tables
KUSH42 Apr 2, 2026
909cc7d
fix(rich_output): image reset code corrupts following markdown link
KUSH42 Apr 2, 2026
994fcbe
feat(rich_output): ordered lists, task lists, nested blockquotes, set…
KUSH42 Apr 2, 2026
83f1989
fix(rich_output): ref def title regex, 49 edge-case tests for new mar…
KUSH42 Apr 2, 2026
975ba4c
feat(rich_output): strict GFM tables framed, fix loose table detection
KUSH42 Apr 2, 2026
0dfc121
fix(rich_output): thread reset_suffix through apply_block_line to res…
KUSH42 Apr 3, 2026
992e4ed
fix(rich_output): deletion line numbers diverge when context splits a…
KUSH42 Apr 3, 2026
3bbf541
fix(cli): always render markdown during streaming responses
KUSH42 Apr 5, 2026
44bd708
test(rich_output): align PR4 diff expectations with renderer output
KUSH42 Apr 5, 2026
c6df71e
test(rich_output): restore shared ANSI strip helper after PR4 rebase
KUSH42 Apr 5, 2026
f0cd6f4
fix: resolve remaining PR4 markdown review bugs
KUSH42 Apr 5, 2026
7d40285
Fix CLI ANSI auth and reasoning rendering
KUSH42 Apr 5, 2026
41ea3bf
Refine rich diff marker styling
KUSH42 Apr 5, 2026
118d7ff
Tone down rich diff syntax styling
KUSH42 Apr 5, 2026
19a2a89
fix(streaming): import missing apply_inline_md and apply_block_line i…
KUSH42 Apr 7, 2026
7e881a4
fix(render): thread reset_suffix through non-streaming Panel path
KUSH42 Apr 7, 2026
69594cb
test(rich_output): add format_response reset_suffix coverage
KUSH42 Apr 7, 2026
f80aeaa
feat(config): expose diff and preview line limits in config.yaml
KUSH42 Apr 7, 2026
9249fe4
test(tui): add spinner config coverage to test_cli_init
KUSH42 Apr 7, 2026
9a75644
test(rich_output): move TestMonokaiIntraDiff to PR5 (skin integration)
KUSH42 Apr 8, 2026
c03dcc2
feat(rich_output): stateful block markdown rendering (PR4)
KUSH42 Apr 2, 2026
e70b967
feat(skin_engine): extend SkinConfig with syntax/diff/markdown/ui_ext
KUSH42 Apr 2, 2026
dc2c5ed
feat(syntax): wire syntax highlighting to active skin
KUSH42 Apr 2, 2026
10a61d5
feat(markdown-diff): wire markdown and diff rendering to active skin
KUSH42 Apr 2, 2026
24f36c3
feat(ui-chrome): wire context bar, tables, menus to active skin
KUSH42 Apr 2, 2026
90bdd24
test(theme): integration smoke-tests for syntax/markdown/diff/ui-chrome
KUSH42 Apr 2, 2026
181c016
fix(rich_output): remove dead singletons, fix stale test assertions, …
KUSH42 Apr 2, 2026
7ab74f5
docs(skins): update example skin to use monokai syntax scheme
KUSH42 Apr 2, 2026
3e9e99b
fix(theme): response border, status bar, and syntax scheme not updati…
KUSH42 Apr 2, 2026
d382ae2
fix(rich_output): replace removed _HEADING_STYLES/_BLOCKQUOTE_ANSI wi…
KUSH42 Apr 2, 2026
d7831f5
fix(rich_output): use single quotes inside f-strings for Python 3.11 …
KUSH42 Apr 3, 2026
1c2bfb1
fix(rich_output): extend diff background to line numbers and sigils, …
KUSH42 Apr 3, 2026
16c6db2
fix(rich_output): restore syntax highlighting in diff flat and intra-…
KUSH42 Apr 3, 2026
aada420
test(rich_output): add TestMonokaiIntraDiff — verify monokai syntax c…
KUSH42 Apr 3, 2026
0aa010b
fix(rich_output): indent hunk headers to align with diff content; bla…
KUSH42 Apr 3, 2026
21dc70c
test(rich_output): disable NO_COLOR for PR5 style assertions
KUSH42 Apr 5, 2026
98d7650
fix(rich_output): pass streaming prose through CLI markdown pipeline
KUSH42 Apr 5, 2026
207b875
fix: carry renderer review fixes through PR5
KUSH42 Apr 5, 2026
3ba9b81
fix: restore PR5 ANSI and read guard stability
KUSH42 Apr 5, 2026
5dedeef
Fix CLI ANSI auth and reasoning rendering
KUSH42 Apr 5, 2026
31be6ae
Refine rich diff marker styling
KUSH42 Apr 5, 2026
c0f970e
Polish diff layout and skin coherence
KUSH42 Apr 5, 2026
60319e9
Add syntax bold display toggle
KUSH42 Apr 5, 2026
ff250e3
fix(reasoning): restore show_reasoning as sole gate after PR5 rebase
KUSH42 Apr 8, 2026
5163796
feat(skin): add spinner style per skin + wire to TUI prompt spinner
KUSH42 Apr 8, 2026
b4c6063
test(skin): add get_spinner_style coverage for built-in skins
KUSH42 Apr 8, 2026
6a28d97
fix(cli): restore apply_block_line/apply_inline_markdown imports drop…
KUSH42 Apr 8, 2026
901a023
fix(cli): flush block/code buffers unconditionally in _flush_stream; …
KUSH42 Apr 9, 2026
aef0468
fix(display): uniform 2-space left indent on all code block output paths
KUSH42 Apr 9, 2026
a5dd775
fix(skin): refresh spinner frames on /skin switch
KUSH42 Apr 9, 2026
7637e7c
feat(syntax): replace hermes scheme named colors with truecolor hex p…
KUSH42 Apr 9, 2026
144cc09
feat(config): enable streaming by default; add spinner_style to displ…
KUSH42 Apr 9, 2026
54ce964
docs(skins): add spinner.style to example skin; fix hermes scheme des…
KUSH42 Apr 9, 2026
64a0dc7
docs(config): document display.* options added by rich rendering + th…
KUSH42 Apr 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
353 changes: 336 additions & 17 deletions agent/display.py

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions agent/redact.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@
r"(?<![A-Za-z0-9_-])(" + "|".join(_PREFIX_PATTERNS) + r")(?![A-Za-z0-9_-])"
)

_FAST_MARKERS_CASE_SENSITIVE = (
"sk-", "ghp_", "github_pat_", "gho_", "ghu_", "ghs_", "ghr_",
"xox", "AIza", "pplx-", "fal_", "fc-", "bb_live_", "gAAAA",
"AKIA", "sk_live_", "sk_test_", "rk_live_", "SG.", "hf_", "r8_",
"npm_", "pypi-", "dop_v1_", "doo_v1_", "am_", "sk_", "tvly-",
"exa_", "Authorization:", "://", "PRIVATE KEY",
)
_FAST_MARKERS_LOWER = (
"api_key", "apikey", "token", "secret", "password", "passwd",
"credential", "authorization:", "bearer", "access_token",
"refresh_token", "auth_token",
)


def _mask_token(token: str) -> str:
"""Mask a token, preserving prefix for long tokens."""
Expand All @@ -124,6 +137,15 @@ def redact_sensitive_text(text: str) -> str:
return text
if not _REDACT_ENABLED:
return text
# Fast path for large plain text blobs with no secret-like markers.
# This avoids running several regex passes across large source files or
# logs that contain no credentials at all.
if len(text) > 8192:
lower_text = text.lower()
if not any(marker in text for marker in _FAST_MARKERS_CASE_SENSITIVE) and not any(
marker in lower_text for marker in _FAST_MARKERS_LOWER
):
return text

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This early return bypasses _PREFIX_RE for large input. The same branch recognizes retaindb_, mem0_, and brv_ prefixes, but none is in either fast-marker list, so a >8 KiB blob containing one of them returns unredacted. Please remove this optimization from the theme PR or derive and test a complete guard.


# Known prefixes (sk-, ghp_, etc.)
text = _PREFIX_RE.sub(lambda m: _mask_token(m.group(1)), text)
Expand Down
Loading