mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix(tui): address latest review feedback
This commit is contained in:
parent
2be5e181a9
commit
a8bfe72d35
5 changed files with 17 additions and 87 deletions
|
|
@ -1,28 +0,0 @@
|
|||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import { getInteractionMode, markScrolling, markTyping, resetInteractionMode } from '../app/interactionMode.js'
|
||||
import { SCROLLING_IDLE_MS, TYPING_IDLE_MS } from '../config/timing.js'
|
||||
|
||||
describe('interactionMode', () => {
|
||||
afterEach(() => {
|
||||
resetInteractionMode()
|
||||
vi.useRealTimers()
|
||||
})
|
||||
|
||||
it('holds scrolling mode briefly then returns idle', () => {
|
||||
vi.useFakeTimers()
|
||||
markScrolling()
|
||||
expect(getInteractionMode()).toBe('scrolling')
|
||||
vi.advanceTimersByTime(SCROLLING_IDLE_MS)
|
||||
expect(getInteractionMode()).toBe('idle')
|
||||
})
|
||||
|
||||
it('typing takes priority over scrolling', () => {
|
||||
vi.useFakeTimers()
|
||||
markTyping()
|
||||
markScrolling()
|
||||
expect(getInteractionMode()).toBe('typing')
|
||||
vi.advanceTimersByTime(TYPING_IDLE_MS)
|
||||
expect(getInteractionMode()).toBe('idle')
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue