clairo 3.1.1 → 3.1.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.
- package/dist/cli.js +248 -261
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9,8 +9,8 @@ import { Box as Box24, Text as Text23, useApp, useInput as useInput19 } from "in
|
|
|
9
9
|
|
|
10
10
|
// src/components/github/GitHubView.tsx
|
|
11
11
|
import { useCallback as useCallback8, useEffect as useEffect9, useRef as useRef5, useState as useState12 } from "react";
|
|
12
|
-
import { TitledBox as
|
|
13
|
-
import { Box as
|
|
12
|
+
import { TitledBox as TitledBox4 } from "@mishieck/ink-titled-box";
|
|
13
|
+
import { Box as Box7, Text as Text8, useInput as useInput4 } from "ink";
|
|
14
14
|
import { ScrollView as ScrollView4 } from "ink-scroll-view";
|
|
15
15
|
|
|
16
16
|
// src/hooks/github/useGitRepo.ts
|
|
@@ -1555,7 +1555,7 @@ ${detail}
|
|
|
1555
1555
|
// src/components/github/PRDetailsBox.tsx
|
|
1556
1556
|
import open from "open";
|
|
1557
1557
|
import { useRef as useRef2 } from "react";
|
|
1558
|
-
import { Box as
|
|
1558
|
+
import { Box as Box4, Text as Text4, useInput } from "ink";
|
|
1559
1559
|
import { ScrollView } from "ink-scroll-view";
|
|
1560
1560
|
import Spinner from "ink-spinner";
|
|
1561
1561
|
|
|
@@ -1700,9 +1700,61 @@ function renderInlineToString(tokens) {
|
|
|
1700
1700
|
}).join("");
|
|
1701
1701
|
}
|
|
1702
1702
|
|
|
1703
|
-
// src/components/
|
|
1703
|
+
// src/components/ui/TitledBox.tsx
|
|
1704
|
+
import { Box as Box3, Spacer, Text as Text3, useStdout } from "ink";
|
|
1704
1705
|
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1705
|
-
function
|
|
1706
|
+
function TitledBox({
|
|
1707
|
+
title,
|
|
1708
|
+
borderColor,
|
|
1709
|
+
scrollRatio = null,
|
|
1710
|
+
fillColor = "#CC6600",
|
|
1711
|
+
footer,
|
|
1712
|
+
children
|
|
1713
|
+
}) {
|
|
1714
|
+
const { stdout } = useStdout();
|
|
1715
|
+
const terminalWidth = (stdout == null ? void 0 : stdout.columns) ?? 80;
|
|
1716
|
+
const columnWidth = Math.floor(terminalWidth / 2);
|
|
1717
|
+
const titlePart = `\u256D ${title} `;
|
|
1718
|
+
const totalDashes = Math.max(0, columnWidth - titlePart.length - 1);
|
|
1719
|
+
const topBorder = scrollRatio !== null && scrollRatio >= 0 ? /* @__PURE__ */ jsxs3(Text3, { children: [
|
|
1720
|
+
/* @__PURE__ */ jsx4(Text3, { color: borderColor, children: titlePart }),
|
|
1721
|
+
/* @__PURE__ */ jsx4(Text3, { color: fillColor, children: "\u2500".repeat(Math.round(scrollRatio * totalDashes)) }),
|
|
1722
|
+
/* @__PURE__ */ jsxs3(Text3, { color: borderColor, children: [
|
|
1723
|
+
"\u2500".repeat(totalDashes - Math.round(scrollRatio * totalDashes)),
|
|
1724
|
+
"\u256E"
|
|
1725
|
+
] })
|
|
1726
|
+
] }) : /* @__PURE__ */ jsxs3(Text3, { color: borderColor, children: [
|
|
1727
|
+
titlePart,
|
|
1728
|
+
"\u2500".repeat(totalDashes),
|
|
1729
|
+
"\u256E"
|
|
1730
|
+
] });
|
|
1731
|
+
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", flexGrow: 1, children: [
|
|
1732
|
+
topBorder,
|
|
1733
|
+
/* @__PURE__ */ jsxs3(
|
|
1734
|
+
Box3,
|
|
1735
|
+
{
|
|
1736
|
+
flexDirection: "column",
|
|
1737
|
+
flexGrow: 1,
|
|
1738
|
+
flexBasis: 0,
|
|
1739
|
+
overflow: "hidden",
|
|
1740
|
+
borderStyle: "round",
|
|
1741
|
+
borderTop: false,
|
|
1742
|
+
borderColor,
|
|
1743
|
+
children: [
|
|
1744
|
+
children,
|
|
1745
|
+
footer && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
1746
|
+
/* @__PURE__ */ jsx4(Spacer, {}),
|
|
1747
|
+
footer
|
|
1748
|
+
] })
|
|
1749
|
+
]
|
|
1750
|
+
}
|
|
1751
|
+
)
|
|
1752
|
+
] });
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
// src/components/github/PRDetailsBox.tsx
|
|
1756
|
+
import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1757
|
+
function PRDetailsBox({ pr, loading, error, isActive, title = "[3] PR Details", footer }) {
|
|
1706
1758
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1707
1759
|
const scrollRef = useRef2(null);
|
|
1708
1760
|
const borderColor = isActive ? "yellow" : void 0;
|
|
@@ -1725,134 +1777,113 @@ function PRDetailsBox({ pr, loading, error, isActive, title = "[3] PR Details" }
|
|
|
1725
1777
|
},
|
|
1726
1778
|
{ isActive }
|
|
1727
1779
|
);
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
/* @__PURE__ */
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
const jobName = check.name ?? check.context;
|
|
1829
|
-
const displayName = check.workflowName ? `${check.workflowName} / ${jobName}` : jobName;
|
|
1830
|
-
const status = resolveCheckStatus(check);
|
|
1831
|
-
return /* @__PURE__ */ jsxs3(Text3, { color: CHECK_COLORS[status], children: [
|
|
1832
|
-
" ",
|
|
1833
|
-
CHECK_ICONS[status],
|
|
1834
|
-
" ",
|
|
1835
|
-
displayName
|
|
1836
|
-
] }, idx);
|
|
1837
|
-
})
|
|
1838
|
-
] }),
|
|
1839
|
-
pr.body && /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, flexDirection: "column", children: [
|
|
1840
|
-
/* @__PURE__ */ jsx4(Divider, {}),
|
|
1841
|
-
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Description:" }),
|
|
1842
|
-
/* @__PURE__ */ jsx4(Markdown, { children: pr.body })
|
|
1843
|
-
] })
|
|
1844
|
-
] })
|
|
1845
|
-
] }) })
|
|
1846
|
-
}
|
|
1847
|
-
)
|
|
1848
|
-
] });
|
|
1780
|
+
return /* @__PURE__ */ jsx5(TitledBox, { title: displayTitle, borderColor, footer, children: /* @__PURE__ */ jsx5(Box4, { flexDirection: "column", flexGrow: 1, flexBasis: 0, overflow: "hidden", children: /* @__PURE__ */ jsx5(ScrollView, { ref: scrollRef, children: /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", paddingX: 1, children: [
|
|
1781
|
+
loading && /* @__PURE__ */ jsxs4(Text4, { color: "yellow", children: [
|
|
1782
|
+
/* @__PURE__ */ jsx5(Spinner, { type: "dots" }),
|
|
1783
|
+
" Loading details..."
|
|
1784
|
+
] }),
|
|
1785
|
+
error && /* @__PURE__ */ jsx5(Text4, { color: "red", children: error }),
|
|
1786
|
+
!loading && !error && !pr && /* @__PURE__ */ jsx5(Text4, { dimColor: true, children: "Select a PR to view details" }),
|
|
1787
|
+
!loading && !error && pr && /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
1788
|
+
/* @__PURE__ */ jsxs4(Box4, { children: [
|
|
1789
|
+
/* @__PURE__ */ jsxs4(Text4, { bold: true, children: [
|
|
1790
|
+
pr.title,
|
|
1791
|
+
" "
|
|
1792
|
+
] }),
|
|
1793
|
+
/* @__PURE__ */ jsx5(Badge, { color: "black", background: mergeDisplay.color, children: mergeDisplay.text })
|
|
1794
|
+
] }),
|
|
1795
|
+
/* @__PURE__ */ jsxs4(Box4, { children: [
|
|
1796
|
+
/* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
|
|
1797
|
+
pr.baseRefName,
|
|
1798
|
+
" \u2190 ",
|
|
1799
|
+
pr.headRefName,
|
|
1800
|
+
" | by ",
|
|
1801
|
+
((_a = pr.author) == null ? void 0 : _a.login) ?? "unknown",
|
|
1802
|
+
" | ",
|
|
1803
|
+
((_b = pr.commits) == null ? void 0 : _b.length) ?? 0,
|
|
1804
|
+
" ",
|
|
1805
|
+
"commits",
|
|
1806
|
+
pr.createdAt && ` | opened ${timeAgo(pr.createdAt)}`,
|
|
1807
|
+
" |",
|
|
1808
|
+
" "
|
|
1809
|
+
] }),
|
|
1810
|
+
/* @__PURE__ */ jsxs4(Text4, { color: "green", children: [
|
|
1811
|
+
"+",
|
|
1812
|
+
pr.additions
|
|
1813
|
+
] }),
|
|
1814
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " " }),
|
|
1815
|
+
/* @__PURE__ */ jsxs4(Text4, { color: "red", children: [
|
|
1816
|
+
"-",
|
|
1817
|
+
pr.deletions
|
|
1818
|
+
] })
|
|
1819
|
+
] }),
|
|
1820
|
+
(((_c = pr.labels) == null ? void 0 : _c.length) ?? 0) > 0 && /* @__PURE__ */ jsx5(Box4, { gap: 1, children: pr.labels.map((l) => /* @__PURE__ */ jsx5(Box4, { children: /* @__PURE__ */ jsx5(Badge, { color: "black", background: "gray", children: l.name }) }, l.name)) }),
|
|
1821
|
+
/* @__PURE__ */ jsx5(Box4, { marginTop: 1, children: /* @__PURE__ */ jsx5(Divider, {}) }),
|
|
1822
|
+
(((_d = pr.assignees) == null ? void 0 : _d.length) ?? 0) > 0 && /* @__PURE__ */ jsxs4(Box4, { marginTop: 1, children: [
|
|
1823
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: "Assignees: " }),
|
|
1824
|
+
/* @__PURE__ */ jsx5(Text4, { children: pr.assignees.map((a) => a.login).join(", ") })
|
|
1825
|
+
] }),
|
|
1826
|
+
((((_e = pr.reviews) == null ? void 0 : _e.length) ?? 0) > 0 || (((_f = pr.reviewRequests) == null ? void 0 : _f.length) ?? 0) > 0) && /* @__PURE__ */ jsxs4(Box4, { marginTop: 1, flexDirection: "column", children: [
|
|
1827
|
+
/* @__PURE__ */ jsxs4(Box4, { children: [
|
|
1828
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: "Reviews: " }),
|
|
1829
|
+
/* @__PURE__ */ jsx5(Text4, { color: reviewDisplay.color, children: reviewDisplay.text })
|
|
1830
|
+
] }),
|
|
1831
|
+
(_g = pr.reviews) == null ? void 0 : _g.map((review, idx) => {
|
|
1832
|
+
const color = review.state === "APPROVED" ? "green" : review.state === "CHANGES_REQUESTED" ? "red" : review.state === "COMMENTED" ? "blue" : "yellow";
|
|
1833
|
+
const icon = review.state === "APPROVED" ? "\u2713" : review.state === "CHANGES_REQUESTED" ? "\u2717" : review.state === "COMMENTED" ? "\u{1F4AC}" : "\u25CB";
|
|
1834
|
+
return /* @__PURE__ */ jsxs4(Text4, { color, children: [
|
|
1835
|
+
" ",
|
|
1836
|
+
icon,
|
|
1837
|
+
" ",
|
|
1838
|
+
review.author.login
|
|
1839
|
+
] }, idx);
|
|
1840
|
+
}),
|
|
1841
|
+
(_h = pr.reviewRequests) == null ? void 0 : _h.map((r, idx) => /* @__PURE__ */ jsxs4(Text4, { color: "yellow", children: [
|
|
1842
|
+
" ",
|
|
1843
|
+
"\u25CB ",
|
|
1844
|
+
r.login ?? r.name ?? r.slug ?? "Team",
|
|
1845
|
+
" ",
|
|
1846
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: "(pending)" })
|
|
1847
|
+
] }, `pending-${idx}`))
|
|
1848
|
+
] }),
|
|
1849
|
+
(((_i = pr.statusCheckRollup) == null ? void 0 : _i.length) ?? 0) > 0 && /* @__PURE__ */ jsxs4(Box4, { marginTop: 1, flexDirection: "column", children: [
|
|
1850
|
+
/* @__PURE__ */ jsx5(Divider, {}),
|
|
1851
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: "Checks:" }),
|
|
1852
|
+
Array.from(
|
|
1853
|
+
((_j = pr.statusCheckRollup) == null ? void 0 : _j.reduce((acc, check) => {
|
|
1854
|
+
const key = check.name ?? check.context ?? "";
|
|
1855
|
+
const existing = acc.get(key);
|
|
1856
|
+
if (!existing || (check.startedAt ?? "") > (existing.startedAt ?? "")) {
|
|
1857
|
+
acc.set(key, check);
|
|
1858
|
+
}
|
|
1859
|
+
return acc;
|
|
1860
|
+
}, /* @__PURE__ */ new Map()).values()) ?? []
|
|
1861
|
+
).sort((a, b) => CHECK_SORT_ORDER[resolveCheckStatus(a)] - CHECK_SORT_ORDER[resolveCheckStatus(b)]).map((check, idx) => {
|
|
1862
|
+
const jobName = check.name ?? check.context;
|
|
1863
|
+
const displayName = check.workflowName ? `${check.workflowName} / ${jobName}` : jobName;
|
|
1864
|
+
const status = resolveCheckStatus(check);
|
|
1865
|
+
return /* @__PURE__ */ jsxs4(Text4, { color: CHECK_COLORS[status], children: [
|
|
1866
|
+
" ",
|
|
1867
|
+
CHECK_ICONS[status],
|
|
1868
|
+
" ",
|
|
1869
|
+
displayName
|
|
1870
|
+
] }, idx);
|
|
1871
|
+
})
|
|
1872
|
+
] }),
|
|
1873
|
+
pr.body && /* @__PURE__ */ jsxs4(Box4, { marginTop: 1, flexDirection: "column", children: [
|
|
1874
|
+
/* @__PURE__ */ jsx5(Divider, {}),
|
|
1875
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: "Description:" }),
|
|
1876
|
+
/* @__PURE__ */ jsx5(Markdown, { children: pr.body })
|
|
1877
|
+
] })
|
|
1878
|
+
] })
|
|
1879
|
+
] }) }) }) });
|
|
1849
1880
|
}
|
|
1850
1881
|
|
|
1851
1882
|
// src/components/github/PullRequestsBox.tsx
|
|
1852
1883
|
import open2 from "open";
|
|
1853
1884
|
import { useState as useState11 } from "react";
|
|
1854
|
-
import { TitledBox } from "@mishieck/ink-titled-box";
|
|
1855
|
-
import { Box as
|
|
1885
|
+
import { TitledBox as TitledBox2 } from "@mishieck/ink-titled-box";
|
|
1886
|
+
import { Box as Box5, Text as Text6, useInput as useInput3 } from "ink";
|
|
1856
1887
|
import { ScrollView as ScrollView2 } from "ink-scroll-view";
|
|
1857
1888
|
|
|
1858
1889
|
// src/hooks/jira/useJiraTickets.ts
|
|
@@ -3163,8 +3194,8 @@ var source_default = chalk;
|
|
|
3163
3194
|
|
|
3164
3195
|
// src/components/ui/AnimatedText.tsx
|
|
3165
3196
|
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
3166
|
-
import { Text as
|
|
3167
|
-
import { jsx as
|
|
3197
|
+
import { Text as Text5 } from "ink";
|
|
3198
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
3168
3199
|
function hexToRgb(hex) {
|
|
3169
3200
|
const h = hex.replace("#", "");
|
|
3170
3201
|
const n = h.length === 3 ? parseInt(h[0] + h[0] + h[1] + h[1] + h[2] + h[2], 16) : parseInt(h, 16);
|
|
@@ -3320,11 +3351,11 @@ function AnimatedText({
|
|
|
3320
3351
|
if (underline) animated = source_default.underline(animated);
|
|
3321
3352
|
if (strikethrough) animated = source_default.strikethrough(animated);
|
|
3322
3353
|
if (dimColor) animated = source_default.dim(animated);
|
|
3323
|
-
return /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ jsx6(Text5, { children: animated });
|
|
3324
3355
|
}
|
|
3325
3356
|
|
|
3326
3357
|
// src/components/github/PullRequestsBox.tsx
|
|
3327
|
-
import { jsx as
|
|
3358
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3328
3359
|
function PullRequestsBox({
|
|
3329
3360
|
prs,
|
|
3330
3361
|
selectedPR,
|
|
@@ -3374,40 +3405,40 @@ function PullRequestsBox({
|
|
|
3374
3405
|
const subtitle = branch ? ` (${branch})` : "";
|
|
3375
3406
|
const copiedIndicator = copied ? " [Copied!]" : "";
|
|
3376
3407
|
const borderColor = isActive ? "yellow" : void 0;
|
|
3377
|
-
return /* @__PURE__ */
|
|
3378
|
-
|
|
3408
|
+
return /* @__PURE__ */ jsx7(
|
|
3409
|
+
TitledBox2,
|
|
3379
3410
|
{
|
|
3380
3411
|
borderStyle: "round",
|
|
3381
3412
|
titles: [`${title}${subtitle}${copiedIndicator}`],
|
|
3382
3413
|
borderColor,
|
|
3383
3414
|
height: 5,
|
|
3384
|
-
children: /* @__PURE__ */
|
|
3385
|
-
loading && /* @__PURE__ */
|
|
3386
|
-
error && /* @__PURE__ */
|
|
3387
|
-
isGeneratingPR && /* @__PURE__ */
|
|
3388
|
-
!loading && !error && /* @__PURE__ */
|
|
3389
|
-
prs.length === 0 && /* @__PURE__ */
|
|
3415
|
+
children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
3416
|
+
loading && /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "Loading PRs..." }),
|
|
3417
|
+
error && /* @__PURE__ */ jsx7(Text6, { color: "red", children: error }),
|
|
3418
|
+
isGeneratingPR && /* @__PURE__ */ jsx7(AnimatedText, { name: "radar", config: { baseColor: "#CC6600" }, children: "Generating PR with Claude... (Esc to cancel)" }),
|
|
3419
|
+
!loading && !error && /* @__PURE__ */ jsxs5(ScrollView2, { ref: scrollRef, children: [
|
|
3420
|
+
prs.length === 0 && /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "No PRs for this branch" }, "empty"),
|
|
3390
3421
|
prs.map((pr, idx) => {
|
|
3391
3422
|
const isHighlighted = isActive && idx === highlightedIndex;
|
|
3392
3423
|
const isSelected = pr.number === (selectedPR == null ? void 0 : selectedPR.number);
|
|
3393
3424
|
const cursor = isHighlighted ? ">" : " ";
|
|
3394
3425
|
const indicator = isSelected ? " *" : "";
|
|
3395
|
-
return /* @__PURE__ */
|
|
3396
|
-
/* @__PURE__ */
|
|
3426
|
+
return /* @__PURE__ */ jsxs5(Box5, { children: [
|
|
3427
|
+
/* @__PURE__ */ jsxs5(Text6, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
3397
3428
|
cursor,
|
|
3398
3429
|
" "
|
|
3399
3430
|
] }),
|
|
3400
|
-
/* @__PURE__ */
|
|
3431
|
+
/* @__PURE__ */ jsxs5(Text6, { color: isSelected ? "green" : void 0, children: [
|
|
3401
3432
|
"#",
|
|
3402
3433
|
pr.number,
|
|
3403
3434
|
" ",
|
|
3404
3435
|
pr.isDraft ? "[Draft] " : "",
|
|
3405
3436
|
pr.title
|
|
3406
3437
|
] }),
|
|
3407
|
-
/* @__PURE__ */
|
|
3438
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: indicator })
|
|
3408
3439
|
] }, pr.number);
|
|
3409
3440
|
}),
|
|
3410
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ jsxs5(Text6, { color: "blue", children: [
|
|
3411
3442
|
isActive && highlightedIndex === prs.length ? "> " : " ",
|
|
3412
3443
|
"+ Create new PR"
|
|
3413
3444
|
] }, "create")
|
|
@@ -3418,10 +3449,10 @@ function PullRequestsBox({
|
|
|
3418
3449
|
}
|
|
3419
3450
|
|
|
3420
3451
|
// src/components/github/RemotesBox.tsx
|
|
3421
|
-
import { TitledBox as
|
|
3422
|
-
import { Box as
|
|
3452
|
+
import { TitledBox as TitledBox3 } from "@mishieck/ink-titled-box";
|
|
3453
|
+
import { Box as Box6, Text as Text7 } from "ink";
|
|
3423
3454
|
import { ScrollView as ScrollView3 } from "ink-scroll-view";
|
|
3424
|
-
import { jsx as
|
|
3455
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3425
3456
|
function RemotesBox({ remotes, selectedRemote, onSelect, loading, error, isActive }) {
|
|
3426
3457
|
const selectedIndex = remotes.findIndex((r) => r.name === selectedRemote);
|
|
3427
3458
|
const { highlightedIndex, scrollRef } = useListNavigation({
|
|
@@ -3432,34 +3463,34 @@ function RemotesBox({ remotes, selectedRemote, onSelect, loading, error, isActiv
|
|
|
3432
3463
|
});
|
|
3433
3464
|
const title = "[1] Remotes";
|
|
3434
3465
|
const borderColor = isActive ? "yellow" : void 0;
|
|
3435
|
-
return /* @__PURE__ */
|
|
3436
|
-
loading && /* @__PURE__ */
|
|
3437
|
-
error && /* @__PURE__ */
|
|
3438
|
-
!loading && !error && remotes.length === 0 && /* @__PURE__ */
|
|
3439
|
-
!loading && !error && remotes.length > 0 && /* @__PURE__ */
|
|
3466
|
+
return /* @__PURE__ */ jsx8(TitledBox3, { borderStyle: "round", titles: [title], borderColor, height: 5, children: /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
3467
|
+
loading && /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "Loading..." }),
|
|
3468
|
+
error && /* @__PURE__ */ jsx8(Text7, { color: "red", children: error }),
|
|
3469
|
+
!loading && !error && remotes.length === 0 && /* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "No remotes configured" }),
|
|
3470
|
+
!loading && !error && remotes.length > 0 && /* @__PURE__ */ jsx8(ScrollView3, { ref: scrollRef, children: remotes.map((remote, idx) => {
|
|
3440
3471
|
const isHighlighted = isActive && idx === highlightedIndex;
|
|
3441
3472
|
const isSelected = remote.name === selectedRemote;
|
|
3442
3473
|
const cursor = isHighlighted ? ">" : " ";
|
|
3443
3474
|
const indicator = isSelected ? " *" : "";
|
|
3444
|
-
return /* @__PURE__ */
|
|
3445
|
-
/* @__PURE__ */
|
|
3475
|
+
return /* @__PURE__ */ jsxs6(Box6, { children: [
|
|
3476
|
+
/* @__PURE__ */ jsxs6(Text7, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
3446
3477
|
cursor,
|
|
3447
3478
|
" "
|
|
3448
3479
|
] }),
|
|
3449
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ jsxs6(Text7, { color: isSelected ? "green" : void 0, children: [
|
|
3450
3481
|
remote.name,
|
|
3451
3482
|
" (",
|
|
3452
3483
|
remote.url,
|
|
3453
3484
|
")"
|
|
3454
3485
|
] }),
|
|
3455
|
-
/* @__PURE__ */
|
|
3486
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: indicator })
|
|
3456
3487
|
] }, remote.name);
|
|
3457
3488
|
}) })
|
|
3458
3489
|
] }) });
|
|
3459
3490
|
}
|
|
3460
3491
|
|
|
3461
3492
|
// src/components/github/GitHubView.tsx
|
|
3462
|
-
import { jsx as
|
|
3493
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3463
3494
|
function GitHubView({ isActive, onFocusedBoxChange, onLogUpdated }) {
|
|
3464
3495
|
const repo = useGitRepo();
|
|
3465
3496
|
const pullRequests = usePullRequests();
|
|
@@ -3675,10 +3706,10 @@ ${body}`;
|
|
|
3675
3706
|
{ isActive }
|
|
3676
3707
|
);
|
|
3677
3708
|
if (repo.isRepo === false) {
|
|
3678
|
-
return /* @__PURE__ */
|
|
3709
|
+
return /* @__PURE__ */ jsx9(TitledBox4, { borderStyle: "round", titles: ["Error"], flexGrow: 1, children: /* @__PURE__ */ jsx9(Text8, { color: "red", children: "Current directory is not a git repository" }) });
|
|
3679
3710
|
}
|
|
3680
|
-
return /* @__PURE__ */
|
|
3681
|
-
/* @__PURE__ */
|
|
3711
|
+
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", flexGrow: 1, children: [
|
|
3712
|
+
/* @__PURE__ */ jsx9(
|
|
3682
3713
|
RemotesBox,
|
|
3683
3714
|
{
|
|
3684
3715
|
remotes: repo.remotes,
|
|
@@ -3689,7 +3720,7 @@ ${body}`;
|
|
|
3689
3720
|
isActive: isActive && !prPreview && focusedBox === "remotes"
|
|
3690
3721
|
}
|
|
3691
3722
|
),
|
|
3692
|
-
/* @__PURE__ */
|
|
3723
|
+
/* @__PURE__ */ jsx9(
|
|
3693
3724
|
PullRequestsBox,
|
|
3694
3725
|
{
|
|
3695
3726
|
prs: pullRequests.prs,
|
|
@@ -3704,7 +3735,7 @@ ${body}`;
|
|
|
3704
3735
|
isGeneratingPR
|
|
3705
3736
|
}
|
|
3706
3737
|
),
|
|
3707
|
-
/* @__PURE__ */
|
|
3738
|
+
/* @__PURE__ */ jsx9(
|
|
3708
3739
|
PRDetailsBox,
|
|
3709
3740
|
{
|
|
3710
3741
|
pr: pullRequests.prDetails,
|
|
@@ -3713,13 +3744,13 @@ ${body}`;
|
|
|
3713
3744
|
isActive: isActive && !prPreview && focusedBox === "details"
|
|
3714
3745
|
}
|
|
3715
3746
|
),
|
|
3716
|
-
prPreview && /* @__PURE__ */
|
|
3717
|
-
/* @__PURE__ */
|
|
3718
|
-
/* @__PURE__ */
|
|
3719
|
-
/* @__PURE__ */
|
|
3720
|
-
/* @__PURE__ */
|
|
3747
|
+
prPreview && /* @__PURE__ */ jsx9(TitledBox4, { borderStyle: "round", titles: ["PR Preview"], borderColor: "yellow", flexGrow: 1, flexBasis: 0, children: /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", paddingX: 1, flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
3748
|
+
/* @__PURE__ */ jsx9(Box7, { flexGrow: 1, flexBasis: 0, overflow: "hidden", children: /* @__PURE__ */ jsx9(ScrollView4, { ref: previewScrollRef, children: /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
3749
|
+
/* @__PURE__ */ jsx9(Text8, { bold: true, children: prPreview.title }),
|
|
3750
|
+
/* @__PURE__ */ jsx9(Text8, { children: "" }),
|
|
3751
|
+
/* @__PURE__ */ jsx9(Text8, { children: prPreview.body })
|
|
3721
3752
|
] }) }) }),
|
|
3722
|
-
/* @__PURE__ */
|
|
3753
|
+
/* @__PURE__ */ jsx9(Text8, { dimColor: true, children: "Enter to apply, Esc to dismiss, j/k to scroll" })
|
|
3723
3754
|
] }) })
|
|
3724
3755
|
] });
|
|
3725
3756
|
}
|
|
@@ -3730,11 +3761,11 @@ import { Box as Box13, useInput as useInput10 } from "ink";
|
|
|
3730
3761
|
|
|
3731
3762
|
// src/components/jira-browser/AddViewModal.tsx
|
|
3732
3763
|
import { useState as useState13 } from "react";
|
|
3733
|
-
import { Box as
|
|
3764
|
+
import { Box as Box9, Text as Text10, useInput as useInput6 } from "ink";
|
|
3734
3765
|
|
|
3735
3766
|
// src/components/ui/TextInput.tsx
|
|
3736
|
-
import { Box as
|
|
3737
|
-
import { jsx as
|
|
3767
|
+
import { Box as Box8, Text as Text9, useInput as useInput5 } from "ink";
|
|
3768
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3738
3769
|
function TextInput({ value, onChange, placeholder, isActive, mask }) {
|
|
3739
3770
|
useInput5(
|
|
3740
3771
|
(input, key) => {
|
|
@@ -3758,14 +3789,14 @@ function TextInput({ value, onChange, placeholder, isActive, mask }) {
|
|
|
3758
3789
|
);
|
|
3759
3790
|
const displayValue = mask ? "*".repeat(value.length) : value;
|
|
3760
3791
|
const showPlaceholder = value.length === 0 && placeholder;
|
|
3761
|
-
return /* @__PURE__ */
|
|
3762
|
-
showPlaceholder ? /* @__PURE__ */
|
|
3763
|
-
isActive && /* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ jsx10(Box8, { children: /* @__PURE__ */ jsxs8(Text9, { children: [
|
|
3793
|
+
showPlaceholder ? /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: placeholder }) : /* @__PURE__ */ jsx10(Text9, { children: displayValue }),
|
|
3794
|
+
isActive && /* @__PURE__ */ jsx10(Text9, { backgroundColor: "yellow", children: " " })
|
|
3764
3795
|
] }) });
|
|
3765
3796
|
}
|
|
3766
3797
|
|
|
3767
3798
|
// src/components/jira-browser/AddViewModal.tsx
|
|
3768
|
-
import { jsx as
|
|
3799
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3769
3800
|
function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
3770
3801
|
const [url, setUrl] = useState13("");
|
|
3771
3802
|
const [name, setName] = useState13("");
|
|
@@ -3789,14 +3820,14 @@ function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3789
3820
|
},
|
|
3790
3821
|
{ isActive: !loading }
|
|
3791
3822
|
);
|
|
3792
|
-
return /* @__PURE__ */
|
|
3793
|
-
/* @__PURE__ */
|
|
3794
|
-
/* @__PURE__ */
|
|
3795
|
-
/* @__PURE__ */
|
|
3796
|
-
error && /* @__PURE__ */
|
|
3797
|
-
/* @__PURE__ */
|
|
3798
|
-
/* @__PURE__ */
|
|
3799
|
-
/* @__PURE__ */
|
|
3823
|
+
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1, children: [
|
|
3824
|
+
/* @__PURE__ */ jsx11(Text10, { bold: true, color: "yellow", children: "Add Jira View" }),
|
|
3825
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Tab to switch fields, Enter to save, Esc to cancel" }),
|
|
3826
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1 }),
|
|
3827
|
+
error && /* @__PURE__ */ jsx11(Box9, { marginBottom: 1, children: /* @__PURE__ */ jsx11(Text10, { color: "red", children: error }) }),
|
|
3828
|
+
/* @__PURE__ */ jsxs9(Box9, { children: [
|
|
3829
|
+
/* @__PURE__ */ jsx11(Text10, { color: "blue", children: "URL: " }),
|
|
3830
|
+
/* @__PURE__ */ jsx11(
|
|
3800
3831
|
TextInput,
|
|
3801
3832
|
{
|
|
3802
3833
|
value: url,
|
|
@@ -3806,9 +3837,9 @@ function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3806
3837
|
}
|
|
3807
3838
|
)
|
|
3808
3839
|
] }),
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
/* @__PURE__ */
|
|
3811
|
-
/* @__PURE__ */
|
|
3840
|
+
/* @__PURE__ */ jsxs9(Box9, { marginTop: 1, children: [
|
|
3841
|
+
/* @__PURE__ */ jsx11(Text10, { color: "blue", children: "Name: " }),
|
|
3842
|
+
/* @__PURE__ */ jsx11(
|
|
3812
3843
|
TextInput,
|
|
3813
3844
|
{
|
|
3814
3845
|
value: name,
|
|
@@ -3818,8 +3849,8 @@ function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3818
3849
|
}
|
|
3819
3850
|
)
|
|
3820
3851
|
] }),
|
|
3821
|
-
loading && /* @__PURE__ */
|
|
3822
|
-
/* @__PURE__ */
|
|
3852
|
+
loading && /* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text10, { color: "yellow", children: "Validating view..." }) }),
|
|
3853
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Supports: filter URLs, JQL URLs, board URLs" }) })
|
|
3823
3854
|
] });
|
|
3824
3855
|
}
|
|
3825
3856
|
|
|
@@ -3830,45 +3861,6 @@ import { Box as Box11, Text as Text12, useInput as useInput8 } from "ink";
|
|
|
3830
3861
|
import { ScrollView as ScrollView6 } from "ink-scroll-view";
|
|
3831
3862
|
import Spinner3 from "ink-spinner";
|
|
3832
3863
|
|
|
3833
|
-
// src/components/ui/TitledBox.tsx
|
|
3834
|
-
import { Box as Box9, Text as Text10, useStdout as useStdout2 } from "ink";
|
|
3835
|
-
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3836
|
-
function TitledBox4({ title, borderColor, scrollRatio = null, fillColor = "#CC6600", children }) {
|
|
3837
|
-
const { stdout } = useStdout2();
|
|
3838
|
-
const terminalWidth = (stdout == null ? void 0 : stdout.columns) ?? 80;
|
|
3839
|
-
const columnWidth = Math.floor(terminalWidth / 2);
|
|
3840
|
-
const titlePart = `\u256D ${title} `;
|
|
3841
|
-
const totalDashes = Math.max(0, columnWidth - titlePart.length - 1);
|
|
3842
|
-
const topBorder = scrollRatio !== null && scrollRatio >= 0 ? /* @__PURE__ */ jsxs9(Text10, { children: [
|
|
3843
|
-
/* @__PURE__ */ jsx11(Text10, { color: borderColor, children: titlePart }),
|
|
3844
|
-
/* @__PURE__ */ jsx11(Text10, { color: fillColor, children: "\u2500".repeat(Math.round(scrollRatio * totalDashes)) }),
|
|
3845
|
-
/* @__PURE__ */ jsxs9(Text10, { color: borderColor, children: [
|
|
3846
|
-
"\u2500".repeat(totalDashes - Math.round(scrollRatio * totalDashes)),
|
|
3847
|
-
"\u256E"
|
|
3848
|
-
] })
|
|
3849
|
-
] }) : /* @__PURE__ */ jsxs9(Text10, { color: borderColor, children: [
|
|
3850
|
-
titlePart,
|
|
3851
|
-
"\u2500".repeat(totalDashes),
|
|
3852
|
-
"\u256E"
|
|
3853
|
-
] });
|
|
3854
|
-
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", flexGrow: 1, children: [
|
|
3855
|
-
topBorder,
|
|
3856
|
-
/* @__PURE__ */ jsx11(
|
|
3857
|
-
Box9,
|
|
3858
|
-
{
|
|
3859
|
-
flexDirection: "column",
|
|
3860
|
-
flexGrow: 1,
|
|
3861
|
-
flexBasis: 0,
|
|
3862
|
-
overflow: "hidden",
|
|
3863
|
-
borderStyle: "round",
|
|
3864
|
-
borderTop: false,
|
|
3865
|
-
borderColor,
|
|
3866
|
-
children
|
|
3867
|
-
}
|
|
3868
|
-
)
|
|
3869
|
-
] });
|
|
3870
|
-
}
|
|
3871
|
-
|
|
3872
3864
|
// src/components/jira-browser/JiraIssueDetailView.tsx
|
|
3873
3865
|
import open3 from "open";
|
|
3874
3866
|
import { useEffect as useEffect10, useRef as useRef6, useState as useState14 } from "react";
|
|
@@ -4122,7 +4114,7 @@ function getStatusColor(status) {
|
|
|
4122
4114
|
}
|
|
4123
4115
|
|
|
4124
4116
|
// src/components/jira-browser/JiraSavedViewBrowserBox.tsx
|
|
4125
|
-
import { Fragment as
|
|
4117
|
+
import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4126
4118
|
function groupBySprint(issues) {
|
|
4127
4119
|
const groups = /* @__PURE__ */ new Map();
|
|
4128
4120
|
for (const issue of issues) {
|
|
@@ -4362,7 +4354,7 @@ function JiraSavedViewBrowserBox({
|
|
|
4362
4354
|
if (assigneeFilter === "unassigned") filterParts.push("unassigned");
|
|
4363
4355
|
if (assigneeFilter === "me") filterParts.push("mine");
|
|
4364
4356
|
if (searchText) filterParts.push(`"${searchText}"`);
|
|
4365
|
-
return /* @__PURE__ */ jsx13(
|
|
4357
|
+
return /* @__PURE__ */ jsx13(TitledBox, { title: displayTitle, borderColor, scrollRatio, children: /* @__PURE__ */ jsx13(Box11, { flexDirection: "column", flexGrow: 1, children: detailIssue && auth ? /* @__PURE__ */ jsx13(
|
|
4366
4358
|
JiraIssueDetailView,
|
|
4367
4359
|
{
|
|
4368
4360
|
issueKey: detailIssue.key,
|
|
@@ -4376,13 +4368,13 @@ function JiraSavedViewBrowserBox({
|
|
|
4376
4368
|
onIssueUpdated: handleIssueUpdated,
|
|
4377
4369
|
onLogUpdated
|
|
4378
4370
|
}
|
|
4379
|
-
) : /* @__PURE__ */ jsxs11(
|
|
4371
|
+
) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
4380
4372
|
(isFiltering || hasActiveFilters) && /* @__PURE__ */ jsxs11(Box11, { paddingX: 1, children: [
|
|
4381
4373
|
/* @__PURE__ */ jsx13(Text12, { color: "blue", children: "Search: " }),
|
|
4382
|
-
isFiltering ? /* @__PURE__ */ jsxs11(
|
|
4374
|
+
isFiltering ? /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
4383
4375
|
/* @__PURE__ */ jsx13(Text12, { children: inputText }),
|
|
4384
4376
|
/* @__PURE__ */ jsx13(Text12, { backgroundColor: "yellow", children: " " })
|
|
4385
|
-
] }) : /* @__PURE__ */ jsxs11(
|
|
4377
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
4386
4378
|
/* @__PURE__ */ jsx13(Text12, { children: filterParts.join(" + ") }),
|
|
4387
4379
|
/* @__PURE__ */ jsxs11(Text12, { dimColor: true, children: [
|
|
4388
4380
|
" ",
|
|
@@ -4454,7 +4446,7 @@ import { useEffect as useEffect12, useState as useState16 } from "react";
|
|
|
4454
4446
|
import { TitledBox as TitledBox5 } from "@mishieck/ink-titled-box";
|
|
4455
4447
|
import { Box as Box12, Text as Text13, useInput as useInput9 } from "ink";
|
|
4456
4448
|
import { ScrollView as ScrollView7 } from "ink-scroll-view";
|
|
4457
|
-
import { Fragment as
|
|
4449
|
+
import { Fragment as Fragment5, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4458
4450
|
function JiraSavedViewsBox({
|
|
4459
4451
|
views,
|
|
4460
4452
|
selectedViewId,
|
|
@@ -4537,7 +4529,7 @@ function JiraSavedViewsBox({
|
|
|
4537
4529
|
cursor,
|
|
4538
4530
|
" "
|
|
4539
4531
|
] }),
|
|
4540
|
-
isRenaming ? /* @__PURE__ */ jsx14(TextInput, { value: renameValue, onChange: setRenameValue, isActive: true }) : /* @__PURE__ */ jsxs12(
|
|
4532
|
+
isRenaming ? /* @__PURE__ */ jsx14(TextInput, { value: renameValue, onChange: setRenameValue, isActive: true }) : /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
4541
4533
|
/* @__PURE__ */ jsx14(Text13, { color: nameColor, children: view.name }),
|
|
4542
4534
|
/* @__PURE__ */ jsx14(Text13, { dimColor: true, children: indicator })
|
|
4543
4535
|
] })
|
|
@@ -5510,7 +5502,7 @@ async function checkoutPR(prNumber, repo) {
|
|
|
5510
5502
|
}
|
|
5511
5503
|
|
|
5512
5504
|
// src/components/pull-requests/AllPullRequestsView.tsx
|
|
5513
|
-
import { Fragment as
|
|
5505
|
+
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5514
5506
|
var STATE_CYCLE = ["open", "closed", "all"];
|
|
5515
5507
|
function computeOverallCheck(checks) {
|
|
5516
5508
|
if (!checks || checks.length === 0) return null;
|
|
@@ -5727,34 +5719,29 @@ function AllPullRequestsView({ isActive, onModalChange }) {
|
|
|
5727
5719
|
return "Open";
|
|
5728
5720
|
};
|
|
5729
5721
|
if (detailPR) {
|
|
5730
|
-
|
|
5731
|
-
/* @__PURE__ */ jsx24(
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
] }) : checkoutResult ? /* @__PURE__ */ jsxs22(Text21, { color: checkoutResult.success ? "green" : "red", children: [
|
|
5746
|
-
" ",
|
|
5747
|
-
checkoutResult.message
|
|
5748
|
-
] }) : /* @__PURE__ */ jsx24(Text21, { dimColor: true, children: " Esc back \xB7 j/k scroll \xB7 o open \xB7 y copy \xB7 c checkout" })
|
|
5749
|
-
] });
|
|
5722
|
+
const hintFooter = checkoutLoading ? /* @__PURE__ */ jsx24(Box22, { paddingX: 1, children: /* @__PURE__ */ jsxs22(Text21, { color: "yellow", children: [
|
|
5723
|
+
/* @__PURE__ */ jsx24(Spinner4, { type: "dots" }),
|
|
5724
|
+
" Checking out..."
|
|
5725
|
+
] }) }) : checkoutResult ? /* @__PURE__ */ jsx24(Box22, { paddingX: 1, children: /* @__PURE__ */ jsx24(Text21, { color: checkoutResult.success ? "green" : "red", children: checkoutResult.message }) }) : /* @__PURE__ */ jsx24(Box22, { paddingX: 1, children: /* @__PURE__ */ jsx24(Text21, { dimColor: true, children: "Esc back \xB7 j/k scroll \xB7 o open \xB7 y copy \xB7 c checkout" }) });
|
|
5726
|
+
return /* @__PURE__ */ jsx24(
|
|
5727
|
+
PRDetailsBox,
|
|
5728
|
+
{
|
|
5729
|
+
pr: prDetails,
|
|
5730
|
+
loading: detailsLoading,
|
|
5731
|
+
error: detailsError,
|
|
5732
|
+
isActive,
|
|
5733
|
+
title: "[5] Pull Requests",
|
|
5734
|
+
footer: hintFooter
|
|
5735
|
+
}
|
|
5736
|
+
);
|
|
5750
5737
|
}
|
|
5751
|
-
return /* @__PURE__ */ jsx24(
|
|
5738
|
+
return /* @__PURE__ */ jsx24(TitledBox, { title: "[5] Pull Requests", borderColor, scrollRatio, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", paddingX: 1, flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
5752
5739
|
(isSearching || hasActiveFilters) && /* @__PURE__ */ jsxs22(Box22, { children: [
|
|
5753
5740
|
/* @__PURE__ */ jsx24(Text21, { color: "blue", children: "Filter: " }),
|
|
5754
|
-
isSearching ? /* @__PURE__ */ jsxs22(
|
|
5741
|
+
isSearching ? /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
5755
5742
|
/* @__PURE__ */ jsx24(Text21, { children: inputText }),
|
|
5756
5743
|
/* @__PURE__ */ jsx24(Text21, { backgroundColor: "yellow", children: " " })
|
|
5757
|
-
] }) : /* @__PURE__ */ jsxs22(
|
|
5744
|
+
] }) : /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
5758
5745
|
/* @__PURE__ */ jsx24(Text21, { children: filterParts.join(" + ") }),
|
|
5759
5746
|
/* @__PURE__ */ jsxs22(Text21, { dimColor: true, children: [
|
|
5760
5747
|
" (",
|
|
@@ -6095,10 +6082,10 @@ import { render as inkRender } from "ink";
|
|
|
6095
6082
|
|
|
6096
6083
|
// src/lib/Screen.tsx
|
|
6097
6084
|
import { useCallback as useCallback13, useEffect as useEffect19, useState as useState24 } from "react";
|
|
6098
|
-
import { Box as Box25, useStdout as
|
|
6085
|
+
import { Box as Box25, useStdout as useStdout2 } from "ink";
|
|
6099
6086
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
6100
6087
|
function Screen({ children }) {
|
|
6101
|
-
const { stdout } =
|
|
6088
|
+
const { stdout } = useStdout2();
|
|
6102
6089
|
const getSize = useCallback13(() => ({ height: stdout.rows, width: stdout.columns }), [stdout]);
|
|
6103
6090
|
const [size, setSize] = useState24(getSize);
|
|
6104
6091
|
useEffect19(() => {
|