@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed theme sharing across package scopes so extensions do not crash with `Theme not initialized` ([#4333](https://github.com/earendil-works/pi/issues/4333)).
|
||||||
- Fixed keybinding hints to show Option instead of Alt on macOS ([#4289](https://github.com/earendil-works/pi/issues/4289)).
|
- Fixed keybinding hints to show Option instead of Alt on macOS ([#4289](https://github.com/earendil-works/pi/issues/4289)).
|
||||||
- Fixed the interactive update notification to render the changelog as an OSC 8 hyperlink when the terminal supports hyperlinks ([#4280](https://github.com/earendil-works/pi/issues/4280)).
|
- Fixed the interactive update notification to render the changelog as an OSC 8 hyperlink when the terminal supports hyperlinks ([#4280](https://github.com/earendil-works/pi/issues/4280)).
|
||||||
|
|
||||||
|
|||||||
@@ -658,6 +658,7 @@ function getDefaultTheme(): string {
|
|||||||
|
|
||||||
// Use globalThis to share theme across module loaders (tsx + jiti in dev mode)
|
// Use globalThis to share theme across module loaders (tsx + jiti in dev mode)
|
||||||
const THEME_KEY = Symbol.for("@earendil-works/pi-coding-agent:theme");
|
const THEME_KEY = Symbol.for("@earendil-works/pi-coding-agent:theme");
|
||||||
|
const THEME_KEY_OLD = Symbol.for("@mariozechner/pi-coding-agent:theme");
|
||||||
|
|
||||||
// Export theme as a getter that reads from globalThis
|
// Export theme as a getter that reads from globalThis
|
||||||
// This ensures all module instances (tsx, jiti) see the same theme
|
// This ensures all module instances (tsx, jiti) see the same theme
|
||||||
@@ -671,6 +672,7 @@ export const theme: Theme = new Proxy({} as Theme, {
|
|||||||
|
|
||||||
function setGlobalTheme(t: Theme): void {
|
function setGlobalTheme(t: Theme): void {
|
||||||
(globalThis as Record<symbol, Theme>)[THEME_KEY] = t;
|
(globalThis as Record<symbol, Theme>)[THEME_KEY] = t;
|
||||||
|
(globalThis as Record<symbol, Theme>)[THEME_KEY_OLD] = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
let currentThemeName: string | undefined;
|
let currentThemeName: string | undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user