MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / waitForScrollIdle

Function waitForScrollIdle

restored-src/src/bootstrap/state.ts:818–824  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

816 * coincide with scroll. Resolves immediately if not scrolling; otherwise
817 * polls at the idle interval until the flag clears. */
818export 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
826export function getModelUsage(): { [modelName: string]: ModelUsage } {
827 return STATE.modelUsage

Callers 2

onHeadChangedMethod · 0.85

Calls 2

setTimeoutFunction · 0.85
unrefMethod · 0.45

Tested by

no test coverage detected