pub struct ReminderTracker { /* private fields */ }Expand description
Tracks tool usage for periodic reminder generation.
This tracker monitors which tools are used, how often, and whether actions are being repeated. It provides the data needed to generate contextual reminders at appropriate times.
Implementations§
Source§impl ReminderTracker
impl ReminderTracker
Sourcepub fn record_tool_use(&mut self, tool_name: &str, input: &Value)
pub fn record_tool_use(&mut self, tool_name: &str, input: &Value)
Records that a tool was used with the given input.
This updates the last-used turn for the tool and tracks whether the same action is being repeated.
Sourcepub const fn current_turn(&self) -> usize
pub const fn current_turn(&self) -> usize
Returns the current turn number.
Sourcepub fn tool_last_used(&self, tool_name: &str) -> Option<usize>
pub fn tool_last_used(&self, tool_name: &str) -> Option<usize>
Returns the turn when a tool was last used, if ever.
Sourcepub const fn repeated_action_count(&self) -> usize
pub const fn repeated_action_count(&self) -> usize
Returns the number of times the current action has been repeated.
Sourcepub fn get_periodic_reminders(&self, config: &ReminderConfig) -> Vec<String>
pub fn get_periodic_reminders(&self, config: &ReminderConfig) -> Vec<String>
Generates periodic reminders based on current state.
This checks various conditions and returns appropriate reminders:
TodoWritereminder if not used for several turns- Repeated action warning if same action performed multiple times
Sourcepub const fn advance_turn(&mut self)
pub const fn advance_turn(&mut self)
Advances to the next turn.
Trait Implementations§
Source§impl Debug for ReminderTracker
impl Debug for ReminderTracker
Source§impl Default for ReminderTracker
impl Default for ReminderTracker
Source§fn default() -> ReminderTracker
fn default() -> ReminderTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReminderTracker
impl RefUnwindSafe for ReminderTracker
impl Send for ReminderTracker
impl Sync for ReminderTracker
impl Unpin for ReminderTracker
impl UnwindSafe for ReminderTracker
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