pub trait AgentDisplay {
// Required methods
fn start(&mut self);
fn update(&mut self, activity: &str);
fn finish_success(&mut self);
fn finish_error(&mut self, error: &str);
fn finish_with_outcome(&mut self, outcome: Outcome);
fn agent_name(&self) -> &str;
fn elapsed_secs(&self) -> u64;
fn iteration_info(&self) -> Option<&IterationInfo>;
fn set_iteration_info(&mut self, info: IterationInfo);
}Expand description
Common interface for agent display components.
This trait defines a unified contract for how all agents report their status, ensuring consistent display across Runner, Reviewer, Corrector, and Commit phases.
All implementors should provide:
- Agent name identification
- Elapsed time tracking
- Activity preview updates
- Iteration/progress context
Required Methods§
Sourcefn start(&mut self)
fn start(&mut self)
Start the display for an agent operation. Called when the agent begins its work.
Sourcefn update(&mut self, activity: &str)
fn update(&mut self, activity: &str)
Update the display with current activity information.
§Arguments
activity- Brief description of current activity (will be truncated if too long)
Sourcefn finish_success(&mut self)
fn finish_success(&mut self)
Mark the operation as successfully completed. Stops any timers and displays a success message.
Sourcefn finish_error(&mut self, error: &str)
fn finish_error(&mut self, error: &str)
Mark the operation as failed. Stops any timers and displays an error message.
§Arguments
error- Description of what went wrong
Sourcefn finish_with_outcome(&mut self, outcome: Outcome)
fn finish_with_outcome(&mut self, outcome: Outcome)
Mark the operation as completed with a specific outcome. Allows for more detailed completion information than simple success/failure.
§Arguments
outcome- The outcome information including success status and message
Sourcefn agent_name(&self) -> &str
fn agent_name(&self) -> &str
Get the agent’s display name
Sourcefn elapsed_secs(&self) -> u64
fn elapsed_secs(&self) -> u64
Get the elapsed time in seconds since the operation started
Sourcefn iteration_info(&self) -> Option<&IterationInfo>
fn iteration_info(&self) -> Option<&IterationInfo>
Get the current iteration information, if any
Sourcefn set_iteration_info(&mut self, info: IterationInfo)
fn set_iteration_info(&mut self, info: IterationInfo)
Set the iteration information for progress context