feat(app): syntax highlighting and copy button for chat code blocks (#1062)

Adds Lezer-based highlighting to fenced code blocks in assistant messages,
with a hover/tap copy button. Colors move into the theme as
`theme.colors.syntax`, so the chat blocks, file preview, and diff viewer
share one StyleSheet path — token color updates flow through the Unistyles
native ShadowRegistry with no React re-renders on the chat hot path.
This commit is contained in:
Mohamed Boudra
2026-05-17 16:01:08 +08:00
committed by GitHub
parent 952b58c0eb
commit f6afe0d864
7 changed files with 347 additions and 82 deletions
+4
View File
@@ -1,3 +1,5 @@
import { darkHighlightColors, lightHighlightColors } from "@getpaseo/highlight";
export const baseColors = {
// Base colors
white: "#ffffff",
@@ -518,6 +520,7 @@ function buildDarkTheme(semanticColors: ReturnType<typeof buildDarkSemanticColor
colors: {
...semanticColors,
palette: baseColors,
syntax: darkHighlightColors,
},
shadow: darkShadow,
...commonTheme,
@@ -535,6 +538,7 @@ export const lightTheme = {
colors: {
...lightSemanticColors,
palette: baseColors,
syntax: lightHighlightColors,
},
shadow: {
sm: {