From e2e2cf116cf07b848b502d5f7c6b712b4bb7d796 Mon Sep 17 00:00:00 2001 From: badlogic Date: Tue, 2 Dec 2025 13:03:48 +0100 Subject: [PATCH] Enable truecolor support for Windows Terminal --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/src/theme/theme.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 2eaa6e17..831df14c 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -7,6 +7,7 @@ ### Fixed - **Windows Binary Path Resolution**: Fixed Bun compiled binary on Windows failing to find `package.json` and other assets. The binary was incorrectly using the Bun runtime's virtual filesystem path (`B:\~BUN\`) instead of the actual executable location. Now uses `process.execPath` which correctly points to the compiled binary, and updated detection to check for `%7EBUN` (URL-encoded `~BUN`) in `import.meta.url`. +- **Windows Terminal Truecolor Support**: Fixed theme colors appearing washed out in Windows Terminal. The color mode detection now checks for `WT_SESSION` environment variable to enable truecolor (24-bit RGB) support instead of falling back to 256-color mode. ## [0.12.1] - 2025-12-02 diff --git a/packages/coding-agent/src/theme/theme.ts b/packages/coding-agent/src/theme/theme.ts index 17e52042..2829764b 100644 --- a/packages/coding-agent/src/theme/theme.ts +++ b/packages/coding-agent/src/theme/theme.ts @@ -135,6 +135,10 @@ function detectColorMode(): ColorMode { if (colorterm === "truecolor" || colorterm === "24bit") { return "truecolor"; } + // Windows Terminal supports truecolor + if (process.env.WT_SESSION) { + return "truecolor"; + } const term = process.env.TERM || ""; if (term.includes("256color")) { return "256color";