feat: add seat-scoped static and dynamic assistant modes
This commit is contained in:
@@ -1237,6 +1237,10 @@ def test_known_mode_name_reuses_repository_profile_even_if_a_plan_is_supplied(
|
||||
) -> None:
|
||||
service, user_root = mode_service
|
||||
nap = service.mode_profiles.get_profile("nap", "denza_n7")
|
||||
selected_operations = [
|
||||
operation for operation in nap.operations
|
||||
if operation.domain != "seat" or operation.target_scope in {"passenger", "front_right"}
|
||||
]
|
||||
result = _preview_without_hardware(
|
||||
service,
|
||||
"构建一个小憩模式",
|
||||
@@ -1249,15 +1253,16 @@ def test_known_mode_name_reuses_repository_profile_even_if_a_plan_is_supplied(
|
||||
draft = _assert_successful_preview(
|
||||
result,
|
||||
name=nap.name,
|
||||
operation_count=len(nap.operations),
|
||||
operation_count=len(selected_operations),
|
||||
)
|
||||
assert draft["generation_source"] == "registered_mode_profile"
|
||||
assert draft["existing_mode_id"] == "nap"
|
||||
expected = {
|
||||
(operation.capability, operation.target_scope): operation.parameters
|
||||
for operation in nap.operations
|
||||
for operation in selected_operations
|
||||
}
|
||||
actual = _action_map(result)
|
||||
assert {target for capability, target in actual if capability.startswith("seat.")} == {"passenger"}
|
||||
for (capability, target), parameters in expected.items():
|
||||
rendered_target = "passenger" if target == "front_right" and capability.startswith("seat.") else target
|
||||
for name, value in parameters.items():
|
||||
|
||||
Reference in New Issue
Block a user