@henryqw/pi-pr 0.3.3 → 0.3.4

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.
Files changed (2) hide show
  1. package/extensions/pr.ts +3 -2
  2. package/package.json +3 -3
package/extensions/pr.ts CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  type ExtensionAPI,
4
4
  type ExtensionContext,
5
5
  } from "@earendil-works/pi-coding-agent";
6
- import { hyperlink } from "@earendil-works/pi-tui";
6
+ import { getCapabilities, hyperlink } from "@earendil-works/pi-tui";
7
7
 
8
8
  const POLL_INTERVAL_MS = 30_000;
9
9
  const REVIEW_POLL_WINDOW_MS = 20 * 60_000;
@@ -142,7 +142,8 @@ function statusFor(pullRequest: PullRequest, ci: CiStatus): Status {
142
142
  }
143
143
 
144
144
  export function formatPullRequest(pullRequest: PullRequest, theme: ExtensionContext["ui"]["theme"], unresolved = 0): string {
145
- const link = hyperlink(theme.fg("text", `PR #${pullRequest.number}`), pullRequest.url.href);
145
+ const prText = theme.fg("text", `PR #${pullRequest.number}`);
146
+ const link = getCapabilities().hyperlinks ? hyperlink(prText, pullRequest.url.href) : prText;
146
147
  const status = unresolved > 0
147
148
  ? { text: `${unresolved} unresolved`, color: "warning" as const }
148
149
  : statusFor(pullRequest, ciStatus(pullRequest.statusCheckRollup));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-pr",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Show the current branch pull request status in the Pi footer.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -26,8 +26,8 @@
26
26
  "pack:check": "npm pack --dry-run"
27
27
  },
28
28
  "peerDependencies": {
29
- "@earendil-works/pi-coding-agent": "^0.84.2",
30
- "@earendil-works/pi-tui": "^0.84.2"
29
+ "@earendil-works/pi-coding-agent": "^0.84.4",
30
+ "@earendil-works/pi-tui": "^0.84.4"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",