()
| 832 | * coincide with scroll. Resolves immediately if not scrolling; otherwise |
| 833 | * polls at the idle interval until the flag clears. */ |
| 834 | export async function waitForScrollIdle(): Promise<void> { |
| 835 | while (scrollDraining) { |
| 836 | // bootstrap-isolation forbids importing sleep() from src/utils/ |
| 837 | // eslint-disable-next-line no-restricted-syntax |
| 838 | await new Promise(r => setTimeout(r, SCROLL_DRAIN_IDLE_MS).unref?.()) |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | export function getModelUsage(): { [modelName: string]: ModelUsage } { |
| 843 | return STATE.modelUsage |
no outgoing calls
no test coverage detected