()
| 798 | * coincide with scroll. Resolves immediately if not scrolling; otherwise |
| 799 | * polls at the idle interval until the flag clears. */ |
| 800 | export async function waitForScrollIdle(): Promise<void> { |
| 801 | while (scrollDraining) { |
| 802 | // bootstrap-isolation forbids importing sleep() from src/utils/ |
| 803 | // eslint-disable-next-line no-restricted-syntax |
| 804 | await new Promise(r => setTimeout(r, SCROLL_DRAIN_IDLE_MS).unref?.()) |
| 805 | } |
| 806 | } |
| 807 | |
| 808 | export function getModelUsage(): { [modelName: string]: ModelUsage } { |
| 809 | return STATE.modelUsage |
no outgoing calls
no test coverage detected