Skip to content

feat: add text size setting (S / M / L / XL)#21

Open
liuxiaopai-ai wants to merge 1 commit intoibelick:mainfrom
liuxiaopai-ai:feat/text-size-setting
Open

feat: add text size setting (S / M / L / XL)#21
liuxiaopai-ai wants to merge 1 commit intoibelick:mainfrom
liuxiaopai-ai:feat/text-size-setting

Conversation

@liuxiaopai-ai
Copy link

What

Adds a configurable text size setting with four options: S, M, L, XL.

Changes

  1. use-chat-settings.ts — Added TextSize type ('sm' | 'md' | 'lg' | 'xl') and TEXT_SIZE_CLASSES mapping to Tailwind classes. Added textSize field to settings store with default 'md'.

  2. settings-dialog.tsx — Added "Text size" row in the Appearance section with a segmented Tabs control (S / M / L / XL), matching the existing Theme selector pattern exactly.

  3. message-item.tsx — Applied dynamic textSizeClass to MessageContent so all chat messages respect the setting.

  4. code-block/index.tsx — Replaced hardcoded text-sm with dynamic size class so code blocks also follow the text size preference.

Size mapping

Setting Tailwind class Size
S text-sm 14px
M (default) text-base 16px
L text-lg 18px
XL text-xl 20px

Minimal changes (4 files, ~45 lines added). Relates to the idea in PR #11.

@liuxiaopai-ai liuxiaopai-ai force-pushed the feat/text-size-setting branch from b22cffc to d413ad7 Compare February 9, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant