()
| 816 | * coincide with scroll. Resolves immediately if not scrolling; otherwise |
| 817 | * polls at the idle interval until the flag clears. */ |
| 818 | export async function waitForScrollIdle(): Promise<void> { |
| 819 | while (scrollDraining) { |
| 820 | // bootstrap-isolation forbids importing sleep() from src/utils/ |
| 821 | // eslint-disable-next-line no-restricted-syntax |
| 822 | await new Promise(r => setTimeout(r, SCROLL_DRAIN_IDLE_MS).unref?.()) |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | export function getModelUsage(): { [modelName: string]: ModelUsage } { |
| 827 | return STATE.modelUsage |
no outgoing calls
no test coverage detected