@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 12 lines 454 Bytes
Raw
1 export const DEFAULT_TERMINAL_FONT_SIZE = 10.5;
2 export const TERMINAL_FONT_SIZE_STEP = 0.5;
3 export const MIN_TERMINAL_FONT_SIZE = 6;
4 export const MAX_TERMINAL_FONT_SIZE = 14;
5
6 export function normalizeTerminalFontSize(value: number | null | undefined): number {
7 if (typeof value !== "number" || !Number.isFinite(value)) {
8 return DEFAULT_TERMINAL_FONT_SIZE;
9 }
10
11 return Math.min(MAX_TERMINAL_FONT_SIZE, Math.max(MIN_TERMINAL_FONT_SIZE, value));
12 }