fix(tui): harden themes and platform coverage

This commit is contained in:
Xubin Ren
2026-08-17 20:56:10 +08:00
parent 347583d3f7
commit 35f2d086b0
11 changed files with 208 additions and 15 deletions
+9
View File
@@ -1565,6 +1565,15 @@ def test_agent_help_shows_workspace_and_config_options():
assert "-w" in stripped_output
assert "--config" in stripped_output
assert "-c" in stripped_output
assert "--theme" in stripped_output
def test_agent_rejects_unknown_tui_theme(mock_agent_runtime):
result = runner.invoke(app, ["agent", "-m", "hello", "--theme", "sepia"])
assert result.exit_code != 0
assert "must be auto, dark, or light" in result.output
mock_agent_runtime["from_config"].assert_not_called()
def test_agent_uses_default_config_when_no_workspace_or_config_flags(mock_agent_runtime):
+2
View File
@@ -73,6 +73,7 @@ def test_interactive_agent_uses_native_tui(
markdown=True,
logs=False,
classic=False,
theme="light",
)
assert launched["args"] == (config,)
@@ -80,6 +81,7 @@ def test_interactive_agent_uses_native_tui(
"config_path": config_path,
"workspace_override": None,
"session_id": "websocket:terminal-chat",
"theme": "light",
}