pub enum ProgressPhase {
Initializing,
PreparingContext,
SavingCheckpoint,
WaitingForModel,
Processing,
ReceivingResponse,
Retrying,
CheckingPermissions,
WaitingForApproval,
RunningTools,
CheckingToolOutput,
Compacting {
estimated_input_tokens: Option<usize>,
started_at: Instant,
},
}Expand description
Actual work phases; these labels never grant admission or change input ownership.
Variants§
Initializing
PreparingContext
SavingCheckpoint
WaitingForModel
Processing
ReceivingResponse
Retrying
CheckingPermissions
WaitingForApproval
RunningTools
CheckingToolOutput
Compacting
Implementations§
Source§impl ProgressPhase
impl ProgressPhase
pub fn label(self) -> &'static str
pub fn is_animated(self) -> bool
Sourcepub fn elapsed_secs(self, operation: ProgressOperation, now: Instant) -> u64
pub fn elapsed_secs(self, operation: ProgressOperation, now: Instant) -> u64
Elapsed whole seconds for this phase, using a phase-local clock only when the operation is being shown as compaction progress.
pub fn format(self, elapsed_secs: u64) -> String
Sourcepub fn format_for_width(self, elapsed_secs: u64, width: usize) -> String
pub fn format_for_width(self, elapsed_secs: u64, width: usize) -> String
Format a phase for a bounded transcript row, preserving the most useful compaction details when the full label would be truncated.
Trait Implementations§
Source§impl Clone for ProgressPhase
impl Clone for ProgressPhase
impl Copy for ProgressPhase
Source§impl Debug for ProgressPhase
impl Debug for ProgressPhase
impl Eq for ProgressPhase
Source§impl PartialEq for ProgressPhase
impl PartialEq for ProgressPhase
impl StructuralPartialEq for ProgressPhase
Auto Trait Implementations§
impl Freeze for ProgressPhase
impl RefUnwindSafe for ProgressPhase
impl Send for ProgressPhase
impl Sync for ProgressPhase
impl Unpin for ProgressPhase
impl UnsafeUnpin for ProgressPhase
impl UnwindSafe for ProgressPhase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.