MCPcopy Index your code
hub / github.com/anomalyco/opencode / refresh

Function refresh

packages/tui/src/context/theme.tsx:236–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

234
235 let themeRefreshTimeouts: ReturnType<typeof setTimeout>[] = []
236 const refresh = () => {
237 for (const timeout of themeRefreshTimeouts) clearTimeout(timeout)
238 themeRefreshTimeouts = THEME_REFRESH_DELAYS.map((delay) =>
239 setTimeout(() => {
240 refreshSystemTheme()
241 if (delay === THEME_REFRESH_DELAYS[THEME_REFRESH_DELAYS.length - 1]) void syncCustomThemes()
242 }, delay),
243 )
244 }
245 let unsubscribeRefresh: (() => void) | undefined
246 unsubscribeRefresh = themes.subscribeRefresh?.(refresh)
247

Callers

nothing calls this directly

Calls 2

refreshSystemThemeFunction · 0.85
syncCustomThemesFunction · 0.85

Tested by

no test coverage detected