feat: improve mode and peripheral orchestration
This commit is contained in:
@@ -429,23 +429,26 @@ class SpeechCapabilityAlignmentTests(unittest.TestCase):
|
||||
result = self.processor.process("打开座椅通风并调到三档")
|
||||
self.assertEqual(
|
||||
[command.capability for command in result.commands],
|
||||
[
|
||||
"seat.set_driver_ventilation_native",
|
||||
"seat.set_driver_ventilation_native",
|
||||
],
|
||||
["seat.set_driver_ventilation_native"],
|
||||
)
|
||||
self.assertEqual(
|
||||
[command.target_scope for command in result.commands],
|
||||
["driver", "driver"],
|
||||
["driver"],
|
||||
)
|
||||
self.assertIn("3档", result.clean_text)
|
||||
self.assertEqual(result.semantic_status, "recognized_unsupported")
|
||||
self.assertFalse(result.execution_eligible)
|
||||
self.assertEqual(result.commands[0].parameters, {"state": "on", "level": 1})
|
||||
self.assertEqual(result.commands[0].qualifiers["display_level"], "3档")
|
||||
self.assertEqual(result.semantic_status, "recognized_executable")
|
||||
self.assertTrue(result.execution_eligible)
|
||||
|
||||
passenger = self.processor.process("打开副驾座椅通风并调到三档")
|
||||
self.assertEqual(
|
||||
[command.target_scope for command in passenger.commands],
|
||||
["passenger", "passenger"],
|
||||
["passenger"],
|
||||
)
|
||||
self.assertEqual(
|
||||
passenger.commands[0].parameters,
|
||||
{"state": "on", "level": 3},
|
||||
)
|
||||
self.assertTrue(passenger.execution_eligible)
|
||||
|
||||
@@ -489,7 +492,11 @@ class SpeechCapabilityAlignmentTests(unittest.TestCase):
|
||||
self.assertNotIn("设置为", result.clean_text)
|
||||
|
||||
explicit_level = self.processor.process("主驾座椅通风开到一档")
|
||||
self.assertEqual(explicit_level.commands[0].parameters["level"], 1)
|
||||
self.assertEqual(explicit_level.commands[0].parameters["level"], 2)
|
||||
self.assertEqual(
|
||||
explicit_level.commands[0].qualifiers["display_level"],
|
||||
"1档",
|
||||
)
|
||||
|
||||
def test_discourse_connectors_preserve_actions_without_leaking_scope(self) -> None:
|
||||
cases = (
|
||||
|
||||
Reference in New Issue
Block a user