mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-12 08:51:53 +00:00
- eslint --fix across src/ and electron/ (unused imports, import/prop sort, padding) - flatten empty catch blocks in electron CJS; drop unused applyUpdatesPosixInApp arg - add setMutableRef helper for imperative ref writes (react-compiler clean) - move sidebar cookie persistence into an effect; extract scrollElementToBottom helper
6 lines
230 B
TypeScript
6 lines
230 B
TypeScript
import type { MutableRefObject } from 'react'
|
|
|
|
/** Imperative ref write — extracted so react-compiler doesn't flag hook-arg refs. */
|
|
export function setMutableRef<T>(ref: MutableRefObject<T>, value: T) {
|
|
ref.current = value
|
|
}
|