mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-30 01:41:43 +00:00
feat: add scrollbar and fix selection on scroll
This commit is contained in:
parent
9804aa7443
commit
52c11d172a
10 changed files with 397 additions and 126 deletions
|
|
@ -46,6 +46,7 @@ export function useVirtualHistory(
|
|||
if (!s) {
|
||||
return NaN
|
||||
}
|
||||
|
||||
const b = Math.floor(s.getScrollTop() / QUANTUM)
|
||||
|
||||
return s.isSticky() ? -b - 1 : b
|
||||
|
|
@ -122,6 +123,7 @@ export function useVirtualHistory(
|
|||
if (!k) {
|
||||
continue
|
||||
}
|
||||
|
||||
const h = Math.ceil(nodes.current.get(k)?.yogaNode?.getComputedHeight?.() ?? 0)
|
||||
|
||||
if (h > 0 && heights.current.get(k) !== h) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue