feat: improve mode and peripheral orchestration
This commit is contained in:
@@ -2727,7 +2727,22 @@ class CodexAssistantService:
|
||||
raise TypeError("vehicle control returned an invalid result")
|
||||
safe_result = self._safe_vehicle_result(result)
|
||||
action_state, successful, completion_text = _vehicle_action_state(result)
|
||||
if mode_profile_preview:
|
||||
if (
|
||||
saved_mode_execution
|
||||
and result.get("status") == "partially_succeeded"
|
||||
):
|
||||
successful = True
|
||||
action_state = (
|
||||
"simulated"
|
||||
if result.get("execution_mode") != "hardware"
|
||||
else "submitted"
|
||||
)
|
||||
completion_text = (
|
||||
"功能模式模拟编排已完成"
|
||||
if action_state == "simulated"
|
||||
else "功能模式指令已提交"
|
||||
)
|
||||
elif mode_profile_preview:
|
||||
successful = _mode_profile_result_succeeded(result)
|
||||
action_state = "simulated" if successful else "failed"
|
||||
completion_text = (
|
||||
@@ -4232,6 +4247,7 @@ class CodexAssistantService:
|
||||
"local_control_elapsed_ms",
|
||||
"local_control_within_budget",
|
||||
"natural_language_routing",
|
||||
"parallel_dispatch",
|
||||
):
|
||||
if result.get(key) is not None:
|
||||
payload[key] = CodexAssistantService._safe_result_value(
|
||||
@@ -4444,6 +4460,11 @@ class CodexAssistantService:
|
||||
}
|
||||
if result.get("orchestration_route") is not None:
|
||||
safe["orchestration_route"] = str(result["orchestration_route"])
|
||||
if isinstance(result.get("parallel_dispatch"), Mapping):
|
||||
safe["parallel_dispatch"] = CodexAssistantService._safe_result_value(
|
||||
result["parallel_dispatch"],
|
||||
secret=secret,
|
||||
)
|
||||
validation = result.get("validation")
|
||||
if isinstance(validation, Sequence) and not isinstance(
|
||||
validation,
|
||||
|
||||
Reference in New Issue
Block a user