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

Function createMarkdownPalette

cli/src/utils/theme-system.ts:1013–1041  ·  view source on GitHub ↗
(theme: ChatTheme)

Source from the content-addressed store, hash-verified

1011}
1012
1013export const createMarkdownPalette = (theme: ChatTheme): MarkdownPalette => {
1014 const headingDefaults: Record<MarkdownHeadingLevel, string> = {
1015 1: theme.primary,
1016 2: theme.primary,
1017 3: theme.primary,
1018 4: theme.primary,
1019 5: theme.primary,
1020 6: theme.primary,
1021 }
1022
1023 const overrides = theme.markdown?.headingFg ?? {}
1024
1025 return {
1026 inlineCodeFg: theme.markdown?.inlineCodeFg ?? theme.foreground,
1027 codeBackground: theme.markdown?.codeBackground ?? theme.background,
1028 codeHeaderFg: theme.markdown?.codeHeaderFg ?? theme.secondary,
1029 headingFg: {
1030 ...headingDefaults,
1031 ...overrides,
1032 },
1033 listBulletFg: theme.markdown?.listBulletFg ?? theme.secondary,
1034 blockquoteBorderFg: theme.markdown?.blockquoteBorderFg ?? theme.secondary,
1035 blockquoteTextFg: theme.markdown?.blockquoteTextFg ?? theme.foreground,
1036 dividerFg: theme.markdown?.dividerFg ?? theme.secondary,
1037 codeTextFg: theme.markdown?.codeTextFg ?? theme.foreground,
1038 codeMonochrome: theme.markdown?.codeMonochrome ?? true,
1039 linkFg: theme.markdown?.linkFg ?? theme.link,
1040 }
1041}
1042
1043/**
1044 * Exported utilities for theme system

Calls

no outgoing calls

Tested by

no test coverage detected