fix: Reset token counters on new session for accurate usage display (#2099)
This commit is contained in:
parent
4c0c7f4c6e
commit
fe331ed9bd
2 changed files with 38 additions and 0 deletions
1
cli.py
1
cli.py
|
|
@ -2733,6 +2733,7 @@ class HermesCLI:
|
|||
if self.agent:
|
||||
self.agent.session_id = self.session_id
|
||||
self.agent.session_start = self.session_start
|
||||
self.agent.reset_session_state()
|
||||
if hasattr(self.agent, "_last_flushed_db_idx"):
|
||||
self.agent._last_flushed_db_idx = 0
|
||||
if hasattr(self.agent, "_todo_store"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue