Merge pull request #567 from ferologics/feat/bun-update-notification

fix(coding-agent): show release URL for bun binary updates
This commit is contained in:
Mario Zechner 2026-01-08 14:51:29 +01:00 committed by GitHub
commit 2d4fa997bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 9 deletions

View file

@ -6,6 +6,10 @@
- `--no-tools` flag to disable all built-in tools, allowing extension-only tool setups ([#555](https://github.com/badlogic/pi-mono/issues/555))
### Fixed
- Update notification for bun binary installs now shows release download URL instead of npm command ([#567](https://github.com/badlogic/pi-mono/pull/567) by [@ferologics](https://github.com/ferologics))
## [0.38.0] - 2026-01-08
### Breaking Changes

View file

@ -32,7 +32,7 @@ import {
visibleWidth,
} from "@mariozechner/pi-tui";
import { spawn, spawnSync } from "child_process";
import { APP_NAME, getAuthPath, getDebugLogPath, VERSION } from "../../config.js";
import { APP_NAME, getAuthPath, getDebugLogPath, isBunBinary, VERSION } from "../../config.js";
import type { AgentSession, AgentSessionEvent } from "../../core/agent-session.js";
import type {
ExtensionContext,
@ -2148,17 +2148,16 @@ export class InteractiveMode {
}
showNewVersionNotification(newVersion: string): void {
const updateInstruction = isBunBinary
? theme.fg("muted", `New version ${newVersion} is available. Download from: `) +
theme.fg("accent", "https://github.com/badlogic/pi-mono/releases/latest")
: theme.fg("muted", `New version ${newVersion} is available. Run: `) +
theme.fg("accent", "npm install -g @mariozechner/pi-coding-agent");
this.chatContainer.addChild(new Spacer(1));
this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));
this.chatContainer.addChild(
new Text(
theme.bold(theme.fg("warning", "Update Available")) +
"\n" +
theme.fg("muted", `New version ${newVersion} is available. Run: `) +
theme.fg("accent", "npm install -g @mariozechner/pi-coding-agent"),
1,
0,
),
new Text(`${theme.bold(theme.fg("warning", "Update Available"))}\n${updateInstruction}`, 1, 0),
);
this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));
this.ui.requestRender();