@earendil-works/pi-coding-agent 0.74.1 → 0.74.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ import { getCwdRelativePath } from "../../utils/paths.js";
30
30
  import { getPiUserAgent } from "../../utils/pi-user-agent.js";
31
31
  import { killTrackedDetachedChildren } from "../../utils/shell.js";
32
32
  import { ensureTool } from "../../utils/tools-manager.js";
33
- import { checkForNewPiVersion } from "../../utils/version-check.js";
33
+ import { checkForNewPiVersion, getLatestPiNodeRequirementMessage, isCurrentNodeVersionSupportedByLatestPi, } from "../../utils/version-check.js";
34
34
  import { ArminComponent } from "./components/armin.js";
35
35
  import { AssistantMessageComponent } from "./components/assistant-message.js";
36
36
  import { BashExecutionComponent } from "./components/bash-execution.js";
@@ -2939,8 +2939,11 @@ export class InteractiveMode {
2939
2939
  this.ui.requestRender();
2940
2940
  }
2941
2941
  showNewVersionNotification(newVersion) {
2942
+ const nodeVersionSupported = isCurrentNodeVersionSupportedByLatestPi();
2942
2943
  const action = theme.fg("accent", `${APP_NAME} update`);
2943
- const updateInstruction = theme.fg("muted", `New version ${newVersion} is available. Run `) + action;
2944
+ const updateInstruction = nodeVersionSupported
2945
+ ? theme.fg("muted", `New version ${newVersion} is available. Run `) + action
2946
+ : theme.fg("muted", `New version ${newVersion} is available. ${getLatestPiNodeRequirementMessage(`${APP_NAME} update`)}`);
2944
2947
  const changelogUrl = "https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md";
2945
2948
  const changelogLink = getCapabilities().hyperlinks
2946
2949
  ? hyperlink(theme.fg("accent", "open changelog"), changelogUrl)
@@ -2948,7 +2951,8 @@ export class InteractiveMode {
2948
2951
  const changelogLine = theme.fg("muted", "Changelog: ") + changelogLink;
2949
2952
  this.chatContainer.addChild(new Spacer(1));
2950
2953
  this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));
2951
- this.chatContainer.addChild(new Text(`${theme.bold(theme.fg("warning", "Update Available"))}\n${updateInstruction}\n${changelogLine}`, 1, 0));
2954
+ const title = nodeVersionSupported ? "Update Available" : "Update Requires Newer Node";
2955
+ this.chatContainer.addChild(new Text(`${theme.bold(theme.fg("warning", title))}\n${updateInstruction}\n${changelogLine}`, 1, 0));
2952
2956
  this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));
2953
2957
  this.ui.requestRender();
2954
2958
  }