MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / detectTerminalTheme

Function detectTerminalTheme

cli/src/utils/terminal-color-detection.ts:450–460  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

448 * @returns 'dark', 'light', or null if detection failed
449 */
450export async function detectTerminalTheme(): Promise<'dark' | 'light' | null> {
451 try {
452 return await withTimeout(
453 detectTerminalThemeCore(),
454 GLOBAL_OSC_TIMEOUT_MS,
455 null,
456 )
457 } catch {
458 return null
459 }
460}
461
462/**
463 * Get the global OSC timeout value (for testing/debugging)

Callers 1

mainFunction · 0.90

Calls 2

detectTerminalThemeCoreFunction · 0.85
withTimeoutFunction · 0.70

Tested by

no test coverage detected