From 5b595f3a109880973c872533955a9f334056d13e Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Thu, 10 Sep 2026 11:19:58 +0000 Subject: [PATCH] Narration lines all plain white (color scheme toggle kept in _phase_color for quick restore) Co-Authored-By: Claude --- evalharness/cli.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/evalharness/cli.py b/evalharness/cli.py index ea4836d..095ecd6 100644 --- a/evalharness/cli.py +++ b/evalharness/cli.py @@ -199,10 +199,11 @@ def _print_run_plan(console, args, model_spec): def _phase_color(message: str) -> str: - """Start/finish color code: events that START or are IN progress are - yellow; events that COMPLETE are green. One glance = what stage, - did it finish.""" - m = message.lower() + """Narration line color. Currently PLAIN WHITE for everything (user + preference); flip the returns to 'yellow'/'green' to restore the + start/finish coloring scheme.""" + return '' + m = message.lower() # unreachable, kept for quick restore if any(k in m for k in ('complete', 'ready', 'downloaded', 'parsed', 'restored', 'ok (')): return 'green' @@ -215,7 +216,10 @@ def _print_phase(console, index, total, name, message): text = f'{prefix}{name}: {message}' color = _phase_color(message) if console is not None: - console.print(f'[{color}]{text}[/{color}]', highlight=False) + if color: + console.print(f'[{color}]{text}[/{color}]', highlight=False) + else: + console.print(text, highlight=False) else: print(text, flush=True) @@ -493,7 +497,8 @@ def _cmd_eval_run(args) -> int: def _emit(msg, _i=i, _n=name): if _shared_reporter is not None: _col = _phase_color(msg) - _shared_reporter.log(f'[{_col}][{_i + 1}/{total_runs}] {_n}: {msg}[/{_col}]') + _line = f'[{_i + 1}/{total_runs}] {_n}: {msg}' + _shared_reporter.log(f'[{_col}]{_line}[/{_col}]' if _col else _line) else: _print_phase(console, _i + 1, total_runs, _n, msg) @@ -531,7 +536,8 @@ def _cmd_eval_run(args) -> int: _tag = f'[{_idx}/{total_runs}] ' if total_runs > 1 else '' if _reporter is not None: _col = _phase_color(msg) - _reporter.log(f'[{_col}]{_tag}{_name}: {msg}[/{_col}]') + _line = f'{_tag}{_name}: {msg}' + _reporter.log(f'[{_col}]{_line}[/{_col}]' if _col else _line) if 'scoring' in msg: _reporter.set_phase('scoring') elif 'generating model responses' in msg: