Skip to content

feat(tui): add /theme command to toggle dark/light theme#1057

Merged
Hmbown merged 1 commit intoHmbown:mainfrom
MengZ-super:theme-clean
May 7, 2026
Merged

feat(tui): add /theme command to toggle dark/light theme#1057
Hmbown merged 1 commit intoHmbown:mainfrom
MengZ-super:theme-clean

Conversation

@MengZ-super
Copy link
Copy Markdown
Contributor

Summary

Minimal /theme command that toggles between dark and light themes using the existing UiTheme system — no new theme state, no thread_local, no persistence layer.

Linked Issue

Follows up on PR #992 comment where maintainer requested a focused smaller PR.

AI-Use Disclosure

assisted — Claude Code used for implementation; all changes reviewed line-by-line by human.

Human-Owner Statement

I have read the diff and can explain every changed file:

  • commands/config.rs: theme() function toggles app.ui_theme via UiTheme::for_mode() — delegates to existing system
  • commands/mod.rs: CommandInfo entry and dispatch match for /theme
  • localization.rs: CmdThemeDescription added in en/zh/ja/pt locales

Changes (3 files, 30 lines)

File Lines Change
commands/config.rs +14 theme() toggles app.ui_theme
commands/mod.rs +7 CommandInfo + dispatch
localization.rs +9 CmdThemeDescription (en/zh/ja/pt)

Test Plan

  • cargo build -p deepseek-tui
  • /theme toggles theme and shows confirmation
  • Theme persists within session (runtime toggle)

Verification Commands Run

cargo build -p deepseek-tui  # ✓ Passed

Adds a minimal /theme command that toggles between dark and light
theme using the existing UiTheme system (no new theme state).

Changes:
- config.rs: theme() function toggles app.ui_theme via UiTheme::for_mode()
- mod.rs: command entry and dispatch for /theme
- localization.rs: CmdThemeDescription in en/zh/ja/pt

AI-use: assisted
Human-owner: kurise, has read the diff and can explain every change

Closes Hmbown#992 (minimal focused PR per maintainer feedback)
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@Hmbown Hmbown merged commit 379186d into Hmbown:main May 7, 2026
1 check passed
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.

2 participants