()
| 15 | * 2. Fallback to legacy code-only theme atoms |
| 16 | */ |
| 17 | export function useCodeTheme(): string { |
| 18 | const { resolvedTheme } = useTheme() |
| 19 | const lightTheme = useAtomValue(vscodeCodeThemeLightAtom) |
| 20 | const darkTheme = useAtomValue(vscodeCodeThemeDarkAtom) |
| 21 | const fullTheme = useAtomValue(fullThemeDataAtom) |
| 22 | |
| 23 | // If a full VS Code theme is selected, use its ID for syntax highlighting |
| 24 | if (fullTheme) { |
| 25 | return fullTheme.id |
| 26 | } |
| 27 | |
| 28 | // Fallback to legacy code-only theme selection |
| 29 | return resolvedTheme === "light" ? lightTheme : darkTheme |
| 30 | } |
no outgoing calls
no test coverage detected