fix: strip tool progress display modes
This commit is contained in:
@@ -233,7 +233,7 @@ def _normalise(setting: str, value: Any) -> Any:
|
||||
return "off"
|
||||
if value is True:
|
||||
return "all"
|
||||
val = str(value).lower()
|
||||
val = str(value).strip().lower()
|
||||
return val if val in {"off", "new", "all", "verbose"} else "all"
|
||||
if setting in {
|
||||
"show_reasoning",
|
||||
|
||||
@@ -155,6 +155,12 @@ class TestYAMLNormalisation:
|
||||
config = {"display": {"platforms": {"whatsapp": {"tool_progress": "generic"}}}}
|
||||
assert resolve_display_setting(config, "whatsapp", "tool_progress") == "all"
|
||||
|
||||
def test_tool_progress_mode_strips_whitespace(self):
|
||||
from gateway.display_config import resolve_display_setting
|
||||
|
||||
config = {"display": {"platforms": {"whatsapp": {"tool_progress": " off\n"}}}}
|
||||
assert resolve_display_setting(config, "whatsapp", "tool_progress") == "off"
|
||||
|
||||
def test_only_long_running_visibility_accepts_generic_mode(self):
|
||||
from gateway.display_config import resolve_display_setting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user