repositories / pi-ext
pi-ext
bugabingas pi extensions
owned by admin
extensions/ephemlets/__tests__/theme.ts
Rawimport type { Theme } from "@earendil-works/pi-coding-agent";
import { type Color, rgbColor } from "@earendil-works/pi-tui";
const colors: Record<string, Color> = {
customMessageBg: rgbColor(36, 36, 36),
customMessageText: rgbColor(237, 237, 237),
muted: rgbColor(139, 139, 139),
accent: rgbColor(209, 81, 209),
success: rgbColor(123, 161, 170),
warning: rgbColor(240, 238, 105),
selectedBg: rgbColor(201, 182, 235),
};
/** Concrete colors, but renders plain text so assertions read cells rather than escapes. */
export const plainTheme = {
colors,
style: (text: string) => text,
fg: (_color: string, text: string) => text,
bg: (_color: string, text: string) => text,
bold: (text: string) => text,
} as unknown as Theme;
/** Same colors, but indexed like the user's palette-based theme. */
export const indexedTheme = {
...plainTheme,
colors: {
...colors,
customMessageBg: { kind: "indexed", index: 18 },
customMessageText: { kind: "indexed", index: 7 },
},
} as unknown as Theme;