mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
A1
This commit is contained in:
@@ -106,6 +106,15 @@ impl ProgressReporter for TerminalProgressReporter {
|
||||
tracing::info!("Agent Message: {agent_msg:?}");
|
||||
}
|
||||
|
||||
fn invalid_solver_signal(&self, raw_message: &str) {
|
||||
let heading = "Warning".yellow().bold();
|
||||
let body = format!(
|
||||
"solver reply did not match expected JSON signal; got: {}",
|
||||
raw_message
|
||||
);
|
||||
println!("{} {} {}", self.timestamp(), heading, body);
|
||||
}
|
||||
|
||||
fn direction_request(&self, prompt: &str) {
|
||||
let prompt_line = format!("{}", prompt.yellow());
|
||||
self.print_exchange("solver", "director", vec![prompt_line], true);
|
||||
|
||||
@@ -12,6 +12,9 @@ pub trait ProgressReporter: Send + Sync {
|
||||
fn solver_event(&self, _event: &EventMsg) {}
|
||||
fn role_event(&self, _role: &str, _event: &EventMsg) {}
|
||||
fn solver_agent_message(&self, _message: &AgentMessageEvent) {}
|
||||
/// Called when the solver emits a message that failed to parse as a valid
|
||||
/// JSON signal according to the expected `solver_signal_schema`.
|
||||
fn invalid_solver_signal(&self, _raw_message: &str) {}
|
||||
fn direction_request(&self, _prompt: &str) {}
|
||||
fn director_response(&self, _directive: &DirectiveResponse) {}
|
||||
fn verification_request(&self, _claim_path: &str, _notes: Option<&str>) {}
|
||||
|
||||
@@ -99,7 +99,14 @@ impl SolverRole {
|
||||
Some(Self::final_delivery_schema()),
|
||||
)
|
||||
.await?;
|
||||
let _ = session::await_first_idle(self.hub.as_ref(), &handle, Duration::from_secs(5), None)
|
||||
// Allow more time for the solver to start emitting the
|
||||
// finalization signal before timing out as "idle".
|
||||
let _ = session::await_first_idle(
|
||||
self.hub.as_ref(),
|
||||
&handle,
|
||||
Duration::from_secs(120),
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user