"""Default narration theme: icons per stage, green facts, blue paths.""" from . import register_theme ICONS = [ ('loading/', 'โฌ‡ '), ('dataset ready', '๐Ÿ“ฆ '), ('few-shot', 'โœณ '), ('checkpoint', 'โ—ท '), ('generation skipped', 'โญ '), ('generating', '๐Ÿค– '), ('generation complete', 'โœ“ '), ('scoring', 'โ˜… '), ('writing', '๐Ÿ“ '), ('endpoint', '๐Ÿ”— '), ] FACT_COLOR = 'green' # numbers/phrases/scores PATH_COLOR = 'blue' # filesystem locations @register_theme('default') def narrate(msg: str) -> str: import re low = msg.lower() icon = next((i for k, i in ICONS if k in low), '') def fact(text): return re.sub(r'(? ', 'to '): head, _, tail = msg.rpartition(sep) if head and tail.startswith('/'): return f'{icon}{head}{sep}[{PATH_COLOR}]{tail}[/{PATH_COLOR}]' return f'{icon}{fact(msg)}'