diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index ac5cc7cc..e513ebee 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -20,6 +20,7 @@ - Fix API key resolution after model switches by using provider argument ([#691](https://github.com/badlogic/pi-mono/pull/691) by [@joshp123](https://github.com/joshp123)) - Fixed z.ai thinking/reasoning: thinking toggle now correctly enables/disables thinking for z.ai models ([#688](https://github.com/badlogic/pi-mono/issues/688)) - Fixed extension loading in compiled Bun binary: extensions with local file imports now work correctly. Updated `@mariozechner/jiti` to v2.6.5 which bundles babel for Bun binary compatibility. ([#681](https://github.com/badlogic/pi-mono/issues/681)) +- Fixed theme loading when installed via mise: fallback to root directory if `theme/` subdirectory doesn't exist (mise flattens tarball structure). ([#681](https://github.com/badlogic/pi-mono/issues/681)) ## [0.45.3] - 2026-01-13 diff --git a/packages/coding-agent/src/config.ts b/packages/coding-agent/src/config.ts index b865350e..d192da4e 100644 --- a/packages/coding-agent/src/config.ts +++ b/packages/coding-agent/src/config.ts @@ -52,7 +52,13 @@ export function getPackageDir(): string { */ export function getThemesDir(): string { if (isBunBinary) { - return join(dirname(process.execPath), "theme"); + const execDir = dirname(process.execPath); + const themeDir = join(execDir, "theme"); + // Fall back to root if theme/ doesn't exist (mise flattens directory structure) + if (existsSync(themeDir)) { + return themeDir; + } + return execDir; } // Theme is in modes/interactive/theme/ relative to src/ or dist/ const packageDir = getPackageDir();