Преглед изворни кода

fix(tui): only use macOS system appearance for Terminal.app

Other terminals (Ghostty, kitty, etc.) have their own theme
independent of macOS appearance. Only fall back to AppleInterfaceStyle
for Terminal.app. All other terminals default to dark when COLORFGBG
is not set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fanghanjun пре 7 месеци
родитељ
комит
06c42e3eaf
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      packages/cli/src/tui/theme.ts

+ 3 - 1
packages/cli/src/tui/theme.ts

@@ -19,7 +19,9 @@ function detectTerminalTheme(): TerminalTheme {
       return bg <= 6 || bg === 8 ? "dark" : "light";
     }
   }
-  if (process.platform === "darwin") {
+  // Only Terminal.app follows macOS system appearance; other terminals
+  // (Ghostty, kitty, etc.) have their own theme independent of the OS.
+  if (isAppleTerminal && process.platform === "darwin") {
     try {
       const result = execSync("defaults read -g AppleInterfaceStyle", {
         encoding: "utf8", timeout: 500, stdio: ["pipe", "pipe", "pipe"],