mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
Merge pull request #4692 from NousResearch/feat/ink-refactor
Feat/ink refactor
This commit is contained in:
commit
e9b8ece103
272 changed files with 51548 additions and 938 deletions
|
|
@ -64,6 +64,17 @@ WATCH_WINDOW_SECONDS = 10 # Rolling window length
|
|||
WATCH_OVERLOAD_KILL_SECONDS = 45 # Sustained overload duration before disabling watch
|
||||
|
||||
|
||||
def format_uptime_short(seconds: int) -> str:
|
||||
s = max(0, int(seconds))
|
||||
if s < 60:
|
||||
return f"{s}s"
|
||||
mins, secs = divmod(s, 60)
|
||||
if mins < 60:
|
||||
return f"{mins}m {secs}s"
|
||||
hours, mins = divmod(mins, 60)
|
||||
return f"{hours}h {mins}m"
|
||||
|
||||
|
||||
@dataclass
|
||||
class ProcessSession:
|
||||
"""A tracked background process with output buffering."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue