mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-13 14:02:16 +00:00
feat(tui): add $petBox store for the pet's footprint
Publishes the floating pet's width/height in cells so the transcript can keep its text clear of it without the pet knowing anything about layout.
This commit is contained in:
parent
af35ae3c46
commit
c874999bc5
1 changed files with 6 additions and 0 deletions
|
|
@ -13,3 +13,9 @@ interface PetFlash {
|
|||
export const $petFlash = atom<PetFlash | null>(null)
|
||||
|
||||
export const flashPet = (state: PetState, ms = 1600) => $petFlash.set({ state, until: Date.now() + ms })
|
||||
|
||||
// The floating pet's footprint, or null when no pet is shown. The transcript
|
||||
// keeps its text clear of the pet responsively: on wide terminals it reserves a
|
||||
// right gutter (`width`) so lines wrap to the pet's LEFT; on narrow terminals it
|
||||
// reserves bottom rows (`height`) so lines stay full-width and sit ABOVE it.
|
||||
export const $petBox = atom<{ width: number; height: number } | null>(null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue