mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(tui): tighten /resume render, follow-up to 42721dbe
- useVirtualHistory: track last-seen ScrollBox metrics in a ref inside the post-layout effect and bump ver when sticky/top/vp change — the subscribe-based rearm was sufficient for fresh clicks but not for the "hydrated mid-commit, measured empty, then metrics settle" path where nothing re-triggered the hook until the next unrelated keystroke - useSessionLifecycle: resume scrollToBottom from queueMicrotask to setTimeout(..., 0) so the fresh transcript has a full task turn to commit + measure before we try to land at the newest content
This commit is contained in:
parent
00591e3801
commit
f53250b5e1
2 changed files with 22 additions and 2 deletions
|
|
@ -186,7 +186,7 @@ export function useSessionLifecycle(opts: UseSessionLifecycleOptions) {
|
|||
status: 'ready',
|
||||
usage: usageFrom(r.info ?? null)
|
||||
})
|
||||
queueMicrotask(() => scrollRef.current?.scrollToBottom())
|
||||
setTimeout(() => scrollRef.current?.scrollToBottom(), 0)
|
||||
})
|
||||
.catch((e: Error) => {
|
||||
sys(`error: ${e.message}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue