merge: integrate remote MQTT routing with seat-scoped dynamic modes

This commit is contained in:
vee
2026-09-12 15:10:16 +08:00
43 changed files with 5726 additions and 492 deletions
+2 -1
View File
@@ -81,7 +81,8 @@ AIRFLOW_CAUSE_PATTERN = re.compile(r"吹|风太大|风吹")
FIRST_PERSON_PATTERN = re.compile(r"我|自己")
VEHICLE_SCOPE_PATTERN = re.compile(r"车上|车内|车里|全车|整车|整个车")
NON_SEAT_DEVICE_PATTERN = re.compile(
r"车窗|车门|门锁|空调|温度|风量|风速|出风模式|"
r"车窗|(?:左前|前左|右前|前右|左后|后左|右后|后右)(?:排)?窗|"
r"车门|门锁|空调|温度|风量|风速|出风模式|"
r"内循环|外循环|循环模式|风口|遮阳帘|天幕|阅读灯|"
r"室内灯|车内灯|氛围灯"
)
@@ -305,8 +305,20 @@ class SeatServiceIntegrationTests(unittest.TestCase):
)
interpret.assert_called_once_with(
"播放音乐", context, self.service.capability_context
"播放音乐",
{
**context,
"natural_language_routing": {
"original_utterance": "空调温度设置为25度,播放音乐",
"parsed_clauses": ["空调温度设置为25度"],
"resolved_clauses": ["空调温度设置为25度"],
"unresolved_clauses": ["播放音乐"],
"cloud_input_utterance": "播放音乐",
},
},
self.service.capability_context,
)
self.assertNotIn("natural_language_routing", context)
self.assertEqual(
provider, f"local_rules+openai:{self.service.openai.model}"
)