mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
refactor(tui): drop done-in sys line; FaceTicker counter only
The transcript line was noisy. Keep the one thing the issue really needs: live elapsed next to the busy verb.
This commit is contained in:
parent
2de1aad028
commit
f1f438e7f9
1 changed files with 5 additions and 17 deletions
|
|
@ -4,7 +4,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|||
|
||||
import { STARTUP_RESUME_ID } from '../config/env.js'
|
||||
import { MAX_HISTORY, WHEEL_SCROLL_STEP } from '../config/limits.js'
|
||||
import { fmtDuration, imageTokenMeta } from '../domain/messages.js'
|
||||
import { imageTokenMeta } from '../domain/messages.js'
|
||||
import { fmtCwdBranch } from '../domain/paths.js'
|
||||
import { type GatewayClient } from '../gatewayClient.js'
|
||||
import type {
|
||||
|
|
@ -284,25 +284,13 @@ export function useMainApp(gw: GatewayClient) {
|
|||
sys
|
||||
})
|
||||
|
||||
// Drive turnStartedAt from the busy edge and emit a one-shot "done in Xs"
|
||||
// line on the idle edge. Covers agent turns and `!shell` alike — only
|
||||
// suppresses when the block is under ~1s (too quick to matter).
|
||||
useEffect(() => {
|
||||
if (ui.busy && turnStartedAt === null) {
|
||||
setTurnStartedAt(Date.now())
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (!ui.busy && turnStartedAt !== null) {
|
||||
const elapsed = Date.now() - turnStartedAt
|
||||
if (ui.busy) {
|
||||
setTurnStartedAt(prev => prev ?? Date.now())
|
||||
} else {
|
||||
setTurnStartedAt(null)
|
||||
|
||||
if (elapsed >= 1000) {
|
||||
sys(`done in ${fmtDuration(elapsed)}`)
|
||||
}
|
||||
}
|
||||
}, [sys, turnStartedAt, ui.busy])
|
||||
}, [ui.busy])
|
||||
|
||||
useConfigSync({ gw, setBellOnComplete, setVoiceEnabled, sid: ui.sid })
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue