mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
refactor(ui-tui): clean touched resize and sticky prompt paths
Trim comment noise, remove redundant typing, normalize sticky prompt viewport args to top→bottom order, and reuse one sticky viewport helper instead of duplicating the math.
This commit is contained in:
parent
9a885fba31
commit
9bf6e1cd6e
5 changed files with 23 additions and 32 deletions
|
|
@ -18,8 +18,8 @@ const upperBound = (offsets: ArrayLike<number>, target: number) => {
|
|||
export const stickyPromptFromViewport = (
|
||||
messages: readonly Msg[],
|
||||
offsets: ArrayLike<number>,
|
||||
bottom: number,
|
||||
top: number,
|
||||
bottom: number,
|
||||
sticky: boolean
|
||||
) => {
|
||||
if (sticky || !messages.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue