fix(webui): drive slash command routing from metadata
This commit is contained in:
@@ -149,7 +149,10 @@ async def test_model_command_registered_as_exact_and_prefix(tmp_path) -> None:
|
||||
def test_model_command_in_help_and_palette() -> None:
|
||||
palette = builtin_command_palette()
|
||||
|
||||
assert any(item["command"] == "/model" and item["arg_hint"] == "[preset]" for item in palette)
|
||||
model = next(item for item in palette if item["command"] == "/model")
|
||||
assert model["arg_hint"] == "[preset]"
|
||||
assert model["lifecycle"] == "side_channel"
|
||||
assert model["accepts_args"] is True
|
||||
assert "/model [preset]" in build_help_text()
|
||||
|
||||
|
||||
@@ -204,5 +207,8 @@ async def test_goal_command_registered_on_router(tmp_path) -> None:
|
||||
|
||||
def test_goal_command_in_help_and_palette() -> None:
|
||||
palette = builtin_command_palette()
|
||||
assert any(item["command"] == "/goal" and item["arg_hint"] == "<goal>" for item in palette)
|
||||
goal = next(item for item in palette if item["command"] == "/goal")
|
||||
assert goal["arg_hint"] == "<goal>"
|
||||
assert goal["lifecycle"] == "agent_turn_with_args"
|
||||
assert goal["accepts_args"] is True
|
||||
assert "/goal <goal>" in build_help_text()
|
||||
|
||||
Reference in New Issue
Block a user