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

Function extractJetBrainsTheme

cli/src/utils/theme-system.ts:362–382  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

360}
361
362const extractJetBrainsTheme = (content: string): ThemeName | null => {
363 // Check if autodetect is enabled (Sync with OS setting)
364 const autodetectMatch = content.match(
365 /<component[^>]+name="LafManager"[^>]+autodetect="(true|false)"/i,
366 )
367 if (autodetectMatch?.[1]?.toLowerCase() === 'true') {
368 // When syncing with OS, return null to trigger platform detection
369 return null
370 }
371
372 const normalized = content.toLowerCase()
373 if (normalized.includes('darcula') || normalized.includes('dark')) {
374 return 'dark'
375 }
376
377 if (normalized.includes('light')) {
378 return 'light'
379 }
380
381 return null
382}
383
384const isVSCodeFamilyTerminal = (
385 env: CliEnv = getCliEnv(),

Callers 1

detectJetBrainsThemeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected