保持Direct观察器调用接口稳定

保留原有run_turn_with_direct_observer参数形状。

将历史回放参数收口到内部专用入口。
This commit is contained in:
2026-09-02 20:14:53 +08:00
parent ae8d51500b
commit 877724d7bc
@@ -2079,7 +2079,6 @@ impl CodexAppServerConnection {
snapshot,
llm,
request,
None,
on_agent_message_delta,
None,
None,
@@ -2088,6 +2087,27 @@ impl CodexAppServerConnection {
}
async fn run_turn_with_direct_observer(
&self,
snapshot: &AgentRuntimeProviderRequestSnapshot,
llm: &GameCreatorLlmConfig,
request: LlmRunRequest,
mut on_agent_message_delta: Option<&mut (dyn FnMut(&platform_llm::LlmStreamDelta) + Send)>,
mut direct_observer: Option<&mut (dyn FnMut(DirectCodexTurnObservation) + Send)>,
mut audit: Option<&mut DirectCodexTurnAudit>,
) -> Result<platform_llm::LlmRunResponse, platform_llm::LlmError> {
self.run_turn_with_direct_observer_and_history(
snapshot,
llm,
request,
None,
on_agent_message_delta,
direct_observer,
audit,
)
.await
}
async fn run_turn_with_direct_observer_and_history(
&self,
snapshot: &AgentRuntimeProviderRequestSnapshot,
llm: &GameCreatorLlmConfig,
@@ -3179,7 +3199,7 @@ pub(crate) async fn direct_game_creator_codex_chat_at_with_optional_observer(
.with_request_timeout_ms(config.llm.request_timeout_ms)
.with_max_output_tokens(16_000);
connection
.run_turn_with_direct_observer(
.run_turn_with_direct_observer_and_history(
&snapshot,
&config.llm,
request,
@@ -4652,7 +4672,6 @@ while IFS= read -r line; do :; done
&test_snapshot(),
&llm,
tool_request(),
None,
Some(&mut on_delta),
Some(&mut observer),
None,