From defd7038ab73fd5a6aaee4b48cda7c2f99f28738 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 8 May 2026 15:06:57 +0200 Subject: [PATCH] fix(coding-agent): hyperlink update changelog closes #4280 --- packages/coding-agent/CHANGELOG.md | 4 ++++ .../src/modes/interactive/interactive-mode.ts | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index daf63364..68fa535d 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Fixed + +- 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)). + ## [0.74.0] - 2026-05-07 ### Changed diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index e1cf2037..6e2cf1f4 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -33,6 +33,8 @@ import { type Component, Container, fuzzyFilter, + getCapabilities, + hyperlink, Loader, type LoaderIndicatorOptions, Markdown, @@ -3515,11 +3517,11 @@ export class InteractiveMode { showNewVersionNotification(newVersion: string): void { const action = theme.fg("accent", `${APP_NAME} update`); const updateInstruction = theme.fg("muted", `New version ${newVersion} is available. Run `) + action; - const changelogUrl = theme.fg( - "accent", - "https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md", - ); - const changelogLine = theme.fg("muted", "Changelog: ") + changelogUrl; + const changelogUrl = "https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md"; + const changelogLink = getCapabilities().hyperlinks + ? hyperlink(theme.fg("accent", "open changelog"), changelogUrl) + : theme.fg("accent", changelogUrl); + const changelogLine = theme.fg("muted", "Changelog: ") + changelogLink; this.chatContainer.addChild(new Spacer(1)); this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));