()
| 448 | * @returns 'dark', 'light', or null if detection failed |
| 449 | */ |
| 450 | export 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) |
no test coverage detected