feat: apply lobster palette to prompts

This commit is contained in:
Peter Steinberger
2026-01-09 09:04:58 +01:00
parent f9be9ad426
commit 8d67bd2889
20 changed files with 227 additions and 44 deletions

12
src/terminal/palette.ts Normal file
View File

@@ -0,0 +1,12 @@
// Lobster palette tokens for CLI/UI theming. "lobster seam" == use this palette.
// Keep in sync with docs/cli/index.md (CLI palette section).
export const LOBSTER_PALETTE = {
accent: "#FF5A2D",
accentBright: "#FF7A3D",
accentDim: "#D14A22",
info: "#FF8A5B",
success: "#2FBF71",
warn: "#FFB020",
error: "#E23D2D",
muted: "#8B7F77",
} as const;

View File

@@ -0,0 +1,10 @@
import { isRich, theme } from "./theme.js";
export const stylePromptMessage = (message: string): string =>
isRich() ? theme.accent(message) : message;
export const stylePromptTitle = (title?: string): string | undefined =>
title && isRich() ? theme.heading(title) : title;
export const stylePromptHint = (hint?: string): string | undefined =>
hint && isRich() ? theme.muted(hint) : hint;

View File

@@ -1,16 +1,6 @@
import chalk from "chalk";
// Semantic palette for CLI output. Keep in sync with docs/cli/index.md.
export const LOBSTER_PALETTE = {
accent: "#FF5A2D",
accentBright: "#FF7A3D",
accentDim: "#D14A22",
info: "#FF8A5B",
success: "#2FBF71",
warn: "#FFB020",
error: "#E23D2D",
muted: "#8B7F77",
} as const;
import { LOBSTER_PALETTE } from "./palette.js";
const hex = (value: string) => chalk.hex(value);