From 8178173ff74a44e4e7aad7420d6f13ecf90bd317 Mon Sep 17 00:00:00 2001 From: Advait Paliwal Date: Wed, 25 Mar 2026 00:42:04 -0700 Subject: [PATCH] Use shared theme constants in help output Co-Authored-By: Claude Opus 4.6 (1M context) --- src/cli.ts | 5 +---- src/ui/terminal.ts | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 073d85f..5e744d4 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -29,7 +29,7 @@ import { printSearchStatus } from "./search/commands.js"; import { runDoctor, runStatus } from "./setup/doctor.js"; import { setupPreviewDependencies } from "./setup/preview.js"; import { runSetup } from "./setup/setup.js"; -import { printAsciiHeader, printInfo, printPanel, printSection } from "./ui/terminal.js"; +import { ASH, printAsciiHeader, printInfo, printPanel, printSection, RESET, SAGE } from "./ui/terminal.js"; import { cliCommandSections, formatCliWorkflowUsage, @@ -43,9 +43,6 @@ const TOP_LEVEL_COMMANDS = new Set(topLevelCommandNames); function printHelpLine(usage: string, description: string): void { const width = 30; const padding = Math.max(1, width - usage.length); - const RESET = "\x1b[0m"; - const SAGE = `\x1b[38;2;167;192;128m`; - const ASH = `\x1b[38;2;133;146;137m`; console.log(` ${SAGE}${usage}${RESET}${" ".repeat(padding)}${ASH}${description}${RESET}`); } diff --git a/src/ui/terminal.ts b/src/ui/terminal.ts index 9916e35..ea7c6a1 100644 --- a/src/ui/terminal.ts +++ b/src/ui/terminal.ts @@ -1,6 +1,6 @@ import { FEYNMAN_ASCII_LOGO } from "../../logo.mjs"; -const RESET = "\x1b[0m"; +export const RESET = "\x1b[0m"; const BOLD = "\x1b[1m"; const DIM = "\x1b[2m"; @@ -11,9 +11,9 @@ function rgb(red: number, green: number, blue: number): string { // Match the outer CLI to the bundled Feynman Pi theme instead of generic magenta panels. const INK = rgb(211, 198, 170); const STONE = rgb(157, 169, 160); -const ASH = rgb(133, 146, 137); +export const ASH = rgb(133, 146, 137); const DARK_ASH = rgb(92, 106, 114); -const SAGE = rgb(167, 192, 128); +export const SAGE = rgb(167, 192, 128); const TEAL = rgb(127, 187, 179); const ROSE = rgb(230, 126, 128);