Narrow #152653 to defaults only. CLI caps come from DEFAULT_CONFIG, TUI foreground resolution uses that same source, explicit/background budgets remain unchanged, and panels say unlimited. Timeout display uses the shared default without seeding terminal.timeout over a shell override. Keep the original delegation fix with Max Freedom Pollards authorship. The ignored-config reader/writer policy, refusal and preflight machinery are not included. resolve_turn_limit remains in its original owner; config_turn_limit contains only the display formatter. Ten scoped guards pass; seven fail on base with three existing-behavior cases remaining green. Ruff clean; ty adds no diagnostics.
9 lines
275 B
Python
9 lines
275 B
Python
"""Formatting for resolved foreground turn budgets."""
|
|
|
|
from hermes_cli.config import TURN_LIMIT_UNLIMITED
|
|
|
|
|
|
def turn_limit_label(limit: int) -> str:
|
|
"""How a resolved turn limit reads on screen."""
|
|
return "unlimited" if limit == TURN_LIMIT_UNLIMITED else str(limit)
|