clairo 2.1.2 → 2.2.1
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 +1211 -523
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import meow from "meow";
|
|
5
5
|
|
|
6
6
|
// src/app.tsx
|
|
7
|
-
import { useCallback as useCallback11, useMemo as useMemo4, useState as
|
|
8
|
-
import { Box as Box22, Text as
|
|
7
|
+
import { useCallback as useCallback11, useMemo as useMemo4, useState as useState22 } from "react";
|
|
8
|
+
import { Box as Box22, Text as Text21, useApp, useInput as useInput18 } from "ink";
|
|
9
9
|
|
|
10
10
|
// src/components/github/GitHubView.tsx
|
|
11
|
-
import { useCallback as useCallback8, useEffect as
|
|
11
|
+
import { useCallback as useCallback8, useEffect as useEffect9, useRef as useRef5, useState as useState12 } from "react";
|
|
12
12
|
import { TitledBox as TitledBox3 } from "@mishieck/ink-titled-box";
|
|
13
|
-
import { Box as Box6, Text as
|
|
13
|
+
import { Box as Box6, Text as Text7, useInput as useInput4 } from "ink";
|
|
14
14
|
import { ScrollView as ScrollView4 } from "ink-scroll-view";
|
|
15
15
|
|
|
16
16
|
// src/hooks/github/useGitRepo.ts
|
|
@@ -1146,25 +1146,45 @@ async function getBoardIssues(auth, boardId, opts) {
|
|
|
1146
1146
|
function escapeJql(text) {
|
|
1147
1147
|
return text.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1149
|
+
function createSearchClause(searchText) {
|
|
1150
1150
|
const escaped = escapeJql(searchText);
|
|
1151
|
-
|
|
1151
|
+
if (/^[A-Z]+-\d+$/i.test(searchText)) {
|
|
1152
|
+
return `(key = "${escaped}" OR text ~ "${escaped}")`;
|
|
1153
|
+
}
|
|
1154
|
+
if (/^\d+$/.test(searchText)) {
|
|
1155
|
+
return `(key ~ "*-${escaped}" OR text ~ "${escaped}")`;
|
|
1156
|
+
}
|
|
1157
|
+
return `text ~ "${escaped}"`;
|
|
1158
|
+
}
|
|
1159
|
+
function appendTextSearch(jql, searchText) {
|
|
1160
|
+
return `(${jql}) AND ${createSearchClause(searchText)}`;
|
|
1161
|
+
}
|
|
1162
|
+
function createAssigneeClause(filter) {
|
|
1163
|
+
if (filter === "unassigned") return "assignee is EMPTY";
|
|
1164
|
+
return "assignee = currentUser()";
|
|
1152
1165
|
}
|
|
1153
1166
|
async function fetchViewIssues(auth, view, opts) {
|
|
1154
|
-
const { searchText, ...pageOpts } = opts ?? {};
|
|
1167
|
+
const { searchText, assigneeFilter, ...pageOpts } = opts ?? {};
|
|
1155
1168
|
switch (view.source.type) {
|
|
1156
1169
|
case "jql": {
|
|
1157
|
-
|
|
1170
|
+
let jql = view.source.jql;
|
|
1171
|
+
if (searchText) jql = appendTextSearch(jql, searchText);
|
|
1172
|
+
if (assigneeFilter) jql = `(${jql}) AND ${createAssigneeClause(assigneeFilter)}`;
|
|
1158
1173
|
return searchIssues(auth, jql, pageOpts);
|
|
1159
1174
|
}
|
|
1160
1175
|
case "filter": {
|
|
1161
1176
|
const filterResult = await getFilterJql(auth, view.source.filterId);
|
|
1162
1177
|
if (!filterResult.success) return filterResult;
|
|
1163
|
-
|
|
1178
|
+
let jql = filterResult.data;
|
|
1179
|
+
if (searchText) jql = appendTextSearch(jql, searchText);
|
|
1180
|
+
if (assigneeFilter) jql = `(${jql}) AND ${createAssigneeClause(assigneeFilter)}`;
|
|
1164
1181
|
return searchIssues(auth, jql, pageOpts);
|
|
1165
1182
|
}
|
|
1166
1183
|
case "board": {
|
|
1167
|
-
const
|
|
1184
|
+
const clauses = [];
|
|
1185
|
+
if (searchText) clauses.push(createSearchClause(searchText));
|
|
1186
|
+
if (assigneeFilter) clauses.push(createAssigneeClause(assigneeFilter));
|
|
1187
|
+
const jql = clauses.length > 0 ? clauses.join(" AND ") : void 0;
|
|
1168
1188
|
return getBoardIssues(auth, view.source.boardId, { ...pageOpts, jql });
|
|
1169
1189
|
}
|
|
1170
1190
|
}
|
|
@@ -1535,14 +1555,25 @@ ${detail}
|
|
|
1535
1555
|
// src/components/github/PRDetailsBox.tsx
|
|
1536
1556
|
import open from "open";
|
|
1537
1557
|
import { useRef as useRef2 } from "react";
|
|
1538
|
-
import { Box as Box3, Text as
|
|
1558
|
+
import { Box as Box3, Text as Text3, useInput, useStdout } from "ink";
|
|
1539
1559
|
import { ScrollView } from "ink-scroll-view";
|
|
1540
1560
|
|
|
1561
|
+
// src/components/ui/Badge.tsx
|
|
1562
|
+
import { Text } from "ink";
|
|
1563
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
1564
|
+
function Badge({ color, background, children }) {
|
|
1565
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1566
|
+
/* @__PURE__ */ jsx(Text, { color: background, children: "\uE0B6" }),
|
|
1567
|
+
/* @__PURE__ */ jsx(Text, { color, backgroundColor: background, bold: true, children }),
|
|
1568
|
+
/* @__PURE__ */ jsx(Text, { color: background, children: "\uE0B4" })
|
|
1569
|
+
] });
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1541
1572
|
// src/components/ui/Divider.tsx
|
|
1542
1573
|
import { Box } from "ink";
|
|
1543
|
-
import { jsx } from "react/jsx-runtime";
|
|
1574
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1544
1575
|
function Divider({ color }) {
|
|
1545
|
-
return /* @__PURE__ */
|
|
1576
|
+
return /* @__PURE__ */ jsx2(
|
|
1546
1577
|
Box,
|
|
1547
1578
|
{
|
|
1548
1579
|
flexGrow: 1,
|
|
@@ -1560,18 +1591,18 @@ function Divider({ color }) {
|
|
|
1560
1591
|
// src/components/ui/Markdown.tsx
|
|
1561
1592
|
import Table from "cli-table3";
|
|
1562
1593
|
import { marked } from "marked";
|
|
1563
|
-
import { Box as Box2, Text } from "ink";
|
|
1594
|
+
import { Box as Box2, Text as Text2 } from "ink";
|
|
1564
1595
|
import Link from "ink-link";
|
|
1565
|
-
import { jsx as
|
|
1596
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1566
1597
|
function Markdown({ children }) {
|
|
1567
1598
|
const tokens = marked.lexer(children);
|
|
1568
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ jsx3(Box2, { flexDirection: "column", children: tokens.map((token, idx) => /* @__PURE__ */ jsx3(TokenRenderer, { token }, idx)) });
|
|
1569
1600
|
}
|
|
1570
1601
|
function TokenRenderer({ token }) {
|
|
1571
1602
|
var _a, _b;
|
|
1572
1603
|
switch (token.type) {
|
|
1573
1604
|
case "heading":
|
|
1574
|
-
return /* @__PURE__ */
|
|
1605
|
+
return /* @__PURE__ */ jsx3(Box2, { marginTop: token.depth === 1 ? 0 : 1, children: /* @__PURE__ */ jsx3(Text2, { bold: true, underline: token.depth === 1, children: renderInline(token.tokens) }) });
|
|
1575
1606
|
case "paragraph": {
|
|
1576
1607
|
const hasLinks = (_a = token.tokens) == null ? void 0 : _a.some(
|
|
1577
1608
|
(t) => {
|
|
@@ -1580,31 +1611,31 @@ function TokenRenderer({ token }) {
|
|
|
1580
1611
|
}
|
|
1581
1612
|
);
|
|
1582
1613
|
if (hasLinks) {
|
|
1583
|
-
return /* @__PURE__ */
|
|
1614
|
+
return /* @__PURE__ */ jsx3(Box2, { flexDirection: "row", flexWrap: "wrap", children: renderInline(token.tokens) });
|
|
1584
1615
|
}
|
|
1585
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ jsx3(Text2, { children: renderInline(token.tokens) });
|
|
1586
1617
|
}
|
|
1587
1618
|
case "code":
|
|
1588
|
-
return /* @__PURE__ */
|
|
1619
|
+
return /* @__PURE__ */ jsx3(Box2, { marginY: 1, paddingX: 1, borderStyle: "single", borderColor: "gray", children: /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: token.text }) });
|
|
1589
1620
|
case "blockquote":
|
|
1590
|
-
return /* @__PURE__ */
|
|
1591
|
-
/* @__PURE__ */
|
|
1592
|
-
/* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsxs2(Box2, { marginLeft: 2, children: [
|
|
1622
|
+
/* @__PURE__ */ jsx3(Text2, { color: "gray", children: "\u2502 " }),
|
|
1623
|
+
/* @__PURE__ */ jsx3(Box2, { flexDirection: "column", children: (_b = token.tokens) == null ? void 0 : _b.map((t, idx) => /* @__PURE__ */ jsx3(TokenRenderer, { token: t }, idx)) })
|
|
1593
1624
|
] });
|
|
1594
1625
|
case "list":
|
|
1595
|
-
return /* @__PURE__ */
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ jsx3(Box2, { flexDirection: "column", marginY: 1, children: token.items.map((item, idx) => /* @__PURE__ */ jsxs2(Box2, { children: [
|
|
1627
|
+
/* @__PURE__ */ jsx3(Text2, { children: token.ordered ? `${idx + 1}. ` : "\u2022 " }),
|
|
1628
|
+
/* @__PURE__ */ jsx3(Box2, { flexDirection: "column", children: item.tokens.map((t, i) => /* @__PURE__ */ jsx3(TokenRenderer, { token: t }, i)) })
|
|
1598
1629
|
] }, idx)) });
|
|
1599
1630
|
case "table":
|
|
1600
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ jsx3(TableRenderer, { token });
|
|
1601
1632
|
case "hr":
|
|
1602
|
-
return /* @__PURE__ */
|
|
1633
|
+
return /* @__PURE__ */ jsx3(Text2, { dimColor: true, children: "\u2500".repeat(40) });
|
|
1603
1634
|
case "space":
|
|
1604
1635
|
return null;
|
|
1605
1636
|
default:
|
|
1606
1637
|
if ("text" in token && typeof token.text === "string") {
|
|
1607
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ jsx3(Text2, { children: token.text });
|
|
1608
1639
|
}
|
|
1609
1640
|
return null;
|
|
1610
1641
|
}
|
|
@@ -1617,39 +1648,39 @@ function TableRenderer({ token }) {
|
|
|
1617
1648
|
for (const row of token.rows) {
|
|
1618
1649
|
table.push(row.map((cell) => renderInlineToString(cell.tokens)));
|
|
1619
1650
|
}
|
|
1620
|
-
return /* @__PURE__ */
|
|
1651
|
+
return /* @__PURE__ */ jsx3(Text2, { children: table.toString() });
|
|
1621
1652
|
}
|
|
1622
1653
|
function renderInline(tokens) {
|
|
1623
1654
|
if (!tokens) return null;
|
|
1624
1655
|
return tokens.map((token, idx) => {
|
|
1625
1656
|
switch (token.type) {
|
|
1626
1657
|
case "text":
|
|
1627
|
-
return /* @__PURE__ */
|
|
1658
|
+
return /* @__PURE__ */ jsx3(Text2, { children: token.text }, idx);
|
|
1628
1659
|
case "strong":
|
|
1629
|
-
return /* @__PURE__ */
|
|
1660
|
+
return /* @__PURE__ */ jsx3(Text2, { bold: true, children: renderInline(token.tokens) }, idx);
|
|
1630
1661
|
case "em":
|
|
1631
|
-
return /* @__PURE__ */
|
|
1662
|
+
return /* @__PURE__ */ jsx3(Text2, { italic: true, children: renderInline(token.tokens) }, idx);
|
|
1632
1663
|
case "codespan":
|
|
1633
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ jsxs2(Text2, { color: "yellow", children: [
|
|
1634
1665
|
"`",
|
|
1635
1666
|
token.text,
|
|
1636
1667
|
"`"
|
|
1637
1668
|
] }, idx);
|
|
1638
1669
|
case "link":
|
|
1639
|
-
return /* @__PURE__ */
|
|
1670
|
+
return /* @__PURE__ */ jsx3(Link, { url: token.href, children: /* @__PURE__ */ jsx3(Text2, { color: "blue", children: renderInlineToString(token.tokens) }) }, idx);
|
|
1640
1671
|
case "image":
|
|
1641
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ jsxs2(Text2, { color: "blue", children: [
|
|
1642
1673
|
"[Image: ",
|
|
1643
1674
|
token.text || token.href,
|
|
1644
1675
|
"]"
|
|
1645
1676
|
] }, idx);
|
|
1646
1677
|
case "br":
|
|
1647
|
-
return /* @__PURE__ */
|
|
1678
|
+
return /* @__PURE__ */ jsx3(Text2, { children: "\n" }, idx);
|
|
1648
1679
|
case "del":
|
|
1649
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsx3(Text2, { strikethrough: true, children: renderInline(token.tokens) }, idx);
|
|
1650
1681
|
default:
|
|
1651
1682
|
if ("text" in token && typeof token.text === "string") {
|
|
1652
|
-
return /* @__PURE__ */
|
|
1683
|
+
return /* @__PURE__ */ jsx3(Text2, { children: token.text }, idx);
|
|
1653
1684
|
}
|
|
1654
1685
|
return null;
|
|
1655
1686
|
}
|
|
@@ -1669,7 +1700,7 @@ function renderInlineToString(tokens) {
|
|
|
1669
1700
|
}
|
|
1670
1701
|
|
|
1671
1702
|
// src/components/github/PRDetailsBox.tsx
|
|
1672
|
-
import { Fragment, jsx as
|
|
1703
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1673
1704
|
function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
1674
1705
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1675
1706
|
const scrollRef = useRef2(null);
|
|
@@ -1700,9 +1731,9 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1700
1731
|
const titlePart = `\u256D ${displayTitle} `;
|
|
1701
1732
|
const dashCount = Math.max(0, columnWidth - titlePart.length - 1);
|
|
1702
1733
|
const topBorder = `${titlePart}${"\u2500".repeat(dashCount)}\u256E`;
|
|
1703
|
-
return /* @__PURE__ */
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1734
|
+
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", flexGrow: 1, children: [
|
|
1735
|
+
/* @__PURE__ */ jsx4(Text3, { color: borderColor, children: topBorder }),
|
|
1736
|
+
/* @__PURE__ */ jsx4(
|
|
1706
1737
|
Box3,
|
|
1707
1738
|
{
|
|
1708
1739
|
flexDirection: "column",
|
|
@@ -1712,22 +1743,20 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1712
1743
|
borderStyle: "round",
|
|
1713
1744
|
borderTop: false,
|
|
1714
1745
|
borderColor,
|
|
1715
|
-
children: /* @__PURE__ */
|
|
1716
|
-
loading && /* @__PURE__ */
|
|
1717
|
-
error && /* @__PURE__ */
|
|
1718
|
-
!loading && !error && !pr && /* @__PURE__ */
|
|
1719
|
-
!loading && !error && pr && /* @__PURE__ */
|
|
1720
|
-
/* @__PURE__ */
|
|
1721
|
-
/* @__PURE__ */
|
|
1746
|
+
children: /* @__PURE__ */ jsx4(ScrollView, { ref: scrollRef, children: /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", paddingX: 1, children: [
|
|
1747
|
+
loading && /* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Loading details..." }),
|
|
1748
|
+
error && /* @__PURE__ */ jsx4(Text3, { color: "red", children: error }),
|
|
1749
|
+
!loading && !error && !pr && /* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Select a PR to view details" }),
|
|
1750
|
+
!loading && !error && pr && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
1751
|
+
/* @__PURE__ */ jsxs3(Box3, { children: [
|
|
1752
|
+
/* @__PURE__ */ jsxs3(Text3, { bold: true, children: [
|
|
1722
1753
|
pr.title,
|
|
1723
1754
|
" "
|
|
1724
1755
|
] }),
|
|
1725
|
-
/* @__PURE__ */
|
|
1726
|
-
/* @__PURE__ */ jsx3(Text2, { color: "black", backgroundColor: mergeDisplay.color, bold: true, children: `${mergeDisplay.text}` }),
|
|
1727
|
-
/* @__PURE__ */ jsx3(Text2, { color: mergeDisplay.color, children: "\uE0B4" })
|
|
1756
|
+
/* @__PURE__ */ jsx4(Badge, { color: "black", background: mergeDisplay.color, children: mergeDisplay.text })
|
|
1728
1757
|
] }),
|
|
1729
|
-
/* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ jsxs3(Box3, { children: [
|
|
1759
|
+
/* @__PURE__ */ jsxs3(Text3, { dimColor: true, children: [
|
|
1731
1760
|
pr.baseRefName,
|
|
1732
1761
|
" \u2190 ",
|
|
1733
1762
|
pr.headRefName,
|
|
@@ -1741,52 +1770,48 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1741
1770
|
" |",
|
|
1742
1771
|
" "
|
|
1743
1772
|
] }),
|
|
1744
|
-
/* @__PURE__ */
|
|
1773
|
+
/* @__PURE__ */ jsxs3(Text3, { color: "green", children: [
|
|
1745
1774
|
"+",
|
|
1746
1775
|
pr.additions
|
|
1747
1776
|
] }),
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
/* @__PURE__ */
|
|
1777
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: " " }),
|
|
1778
|
+
/* @__PURE__ */ jsxs3(Text3, { color: "red", children: [
|
|
1750
1779
|
"-",
|
|
1751
1780
|
pr.deletions
|
|
1752
1781
|
] })
|
|
1753
1782
|
] }),
|
|
1754
|
-
(((_c = pr.labels) == null ? void 0 : _c.length) ?? 0) > 0 && /* @__PURE__ */
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
/* @__PURE__ */
|
|
1758
|
-
|
|
1759
|
-
/* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(Divider, {}) }),
|
|
1760
|
-
(((_d = pr.assignees) == null ? void 0 : _d.length) ?? 0) > 0 && /* @__PURE__ */ jsxs2(Box3, { marginTop: 1, children: [
|
|
1761
|
-
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: "Assignees: " }),
|
|
1762
|
-
/* @__PURE__ */ jsx3(Text2, { children: pr.assignees.map((a) => a.login).join(", ") })
|
|
1783
|
+
(((_c = pr.labels) == null ? void 0 : _c.length) ?? 0) > 0 && /* @__PURE__ */ jsx4(Box3, { gap: 1, children: pr.labels.map((l) => /* @__PURE__ */ jsx4(Box3, { children: /* @__PURE__ */ jsx4(Badge, { color: "black", background: "gray", children: l.name }) }, l.name)) }),
|
|
1784
|
+
/* @__PURE__ */ jsx4(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx4(Divider, {}) }),
|
|
1785
|
+
(((_d = pr.assignees) == null ? void 0 : _d.length) ?? 0) > 0 && /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, children: [
|
|
1786
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Assignees: " }),
|
|
1787
|
+
/* @__PURE__ */ jsx4(Text3, { children: pr.assignees.map((a) => a.login).join(", ") })
|
|
1763
1788
|
] }),
|
|
1764
|
-
((((_e = pr.reviews) == null ? void 0 : _e.length) ?? 0) > 0 || (((_f = pr.reviewRequests) == null ? void 0 : _f.length) ?? 0) > 0) && /* @__PURE__ */
|
|
1765
|
-
/* @__PURE__ */
|
|
1766
|
-
/* @__PURE__ */
|
|
1767
|
-
/* @__PURE__ */
|
|
1789
|
+
((((_e = pr.reviews) == null ? void 0 : _e.length) ?? 0) > 0 || (((_f = pr.reviewRequests) == null ? void 0 : _f.length) ?? 0) > 0) && /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, flexDirection: "column", children: [
|
|
1790
|
+
/* @__PURE__ */ jsxs3(Box3, { children: [
|
|
1791
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Reviews: " }),
|
|
1792
|
+
/* @__PURE__ */ jsx4(Text3, { color: reviewDisplay.color, children: reviewDisplay.text })
|
|
1768
1793
|
] }),
|
|
1769
1794
|
(_g = pr.reviews) == null ? void 0 : _g.map((review, idx) => {
|
|
1770
1795
|
const color = review.state === "APPROVED" ? "green" : review.state === "CHANGES_REQUESTED" ? "red" : review.state === "COMMENTED" ? "blue" : "yellow";
|
|
1771
1796
|
const icon = review.state === "APPROVED" ? "\u2713" : review.state === "CHANGES_REQUESTED" ? "\u2717" : review.state === "COMMENTED" ? "\u{1F4AC}" : "\u25CB";
|
|
1772
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ jsxs3(Text3, { color, children: [
|
|
1773
1798
|
" ",
|
|
1774
1799
|
icon,
|
|
1775
1800
|
" ",
|
|
1776
1801
|
review.author.login
|
|
1777
1802
|
] }, idx);
|
|
1778
1803
|
}),
|
|
1779
|
-
(_h = pr.reviewRequests) == null ? void 0 : _h.map((r, idx) => /* @__PURE__ */
|
|
1804
|
+
(_h = pr.reviewRequests) == null ? void 0 : _h.map((r, idx) => /* @__PURE__ */ jsxs3(Text3, { color: "yellow", children: [
|
|
1780
1805
|
" ",
|
|
1781
1806
|
"\u25CB ",
|
|
1782
1807
|
r.login ?? r.name ?? r.slug ?? "Team",
|
|
1783
1808
|
" ",
|
|
1784
|
-
/* @__PURE__ */
|
|
1809
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "(pending)" })
|
|
1785
1810
|
] }, `pending-${idx}`))
|
|
1786
1811
|
] }),
|
|
1787
|
-
(((_i = pr.statusCheckRollup) == null ? void 0 : _i.length) ?? 0) > 0 && /* @__PURE__ */
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */
|
|
1812
|
+
(((_i = pr.statusCheckRollup) == null ? void 0 : _i.length) ?? 0) > 0 && /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, flexDirection: "column", children: [
|
|
1813
|
+
/* @__PURE__ */ jsx4(Divider, {}),
|
|
1814
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Checks:" }),
|
|
1790
1815
|
Array.from(
|
|
1791
1816
|
((_j = pr.statusCheckRollup) == null ? void 0 : _j.reduce((acc, check) => {
|
|
1792
1817
|
const key = check.name ?? check.context ?? "";
|
|
@@ -1800,7 +1825,7 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1800
1825
|
const jobName = check.name ?? check.context;
|
|
1801
1826
|
const displayName = check.workflowName ? `${check.workflowName} / ${jobName}` : jobName;
|
|
1802
1827
|
const status = resolveCheckStatus(check);
|
|
1803
|
-
return /* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ jsxs3(Text3, { color: CHECK_COLORS[status], children: [
|
|
1804
1829
|
" ",
|
|
1805
1830
|
CHECK_ICONS[status],
|
|
1806
1831
|
" ",
|
|
@@ -1808,10 +1833,10 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1808
1833
|
] }, idx);
|
|
1809
1834
|
})
|
|
1810
1835
|
] }),
|
|
1811
|
-
pr.body && /* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
1814
|
-
/* @__PURE__ */
|
|
1836
|
+
pr.body && /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, flexDirection: "column", children: [
|
|
1837
|
+
/* @__PURE__ */ jsx4(Divider, {}),
|
|
1838
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Description:" }),
|
|
1839
|
+
/* @__PURE__ */ jsx4(Markdown, { children: pr.body })
|
|
1815
1840
|
] })
|
|
1816
1841
|
] })
|
|
1817
1842
|
] }) })
|
|
@@ -1822,11 +1847,10 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1822
1847
|
|
|
1823
1848
|
// src/components/github/PullRequestsBox.tsx
|
|
1824
1849
|
import open2 from "open";
|
|
1825
|
-
import { useState as
|
|
1850
|
+
import { useState as useState11 } from "react";
|
|
1826
1851
|
import { TitledBox } from "@mishieck/ink-titled-box";
|
|
1827
|
-
import { Box as Box4, Text as
|
|
1852
|
+
import { Box as Box4, Text as Text5, useInput as useInput3 } from "ink";
|
|
1828
1853
|
import { ScrollView as ScrollView2 } from "ink-scroll-view";
|
|
1829
|
-
import Spinner from "ink-spinner";
|
|
1830
1854
|
|
|
1831
1855
|
// src/hooks/jira/useJiraTickets.ts
|
|
1832
1856
|
import { useCallback as useCallback4, useState as useState5 } from "react";
|
|
@@ -2600,8 +2624,665 @@ async function copyToClipboard(text) {
|
|
|
2600
2624
|
}
|
|
2601
2625
|
}
|
|
2602
2626
|
|
|
2627
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
2628
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
2629
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
2630
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
2631
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
2632
|
+
var styles = {
|
|
2633
|
+
modifier: {
|
|
2634
|
+
reset: [0, 0],
|
|
2635
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
2636
|
+
bold: [1, 22],
|
|
2637
|
+
dim: [2, 22],
|
|
2638
|
+
italic: [3, 23],
|
|
2639
|
+
underline: [4, 24],
|
|
2640
|
+
overline: [53, 55],
|
|
2641
|
+
inverse: [7, 27],
|
|
2642
|
+
hidden: [8, 28],
|
|
2643
|
+
strikethrough: [9, 29]
|
|
2644
|
+
},
|
|
2645
|
+
color: {
|
|
2646
|
+
black: [30, 39],
|
|
2647
|
+
red: [31, 39],
|
|
2648
|
+
green: [32, 39],
|
|
2649
|
+
yellow: [33, 39],
|
|
2650
|
+
blue: [34, 39],
|
|
2651
|
+
magenta: [35, 39],
|
|
2652
|
+
cyan: [36, 39],
|
|
2653
|
+
white: [37, 39],
|
|
2654
|
+
// Bright color
|
|
2655
|
+
blackBright: [90, 39],
|
|
2656
|
+
gray: [90, 39],
|
|
2657
|
+
// Alias of `blackBright`
|
|
2658
|
+
grey: [90, 39],
|
|
2659
|
+
// Alias of `blackBright`
|
|
2660
|
+
redBright: [91, 39],
|
|
2661
|
+
greenBright: [92, 39],
|
|
2662
|
+
yellowBright: [93, 39],
|
|
2663
|
+
blueBright: [94, 39],
|
|
2664
|
+
magentaBright: [95, 39],
|
|
2665
|
+
cyanBright: [96, 39],
|
|
2666
|
+
whiteBright: [97, 39]
|
|
2667
|
+
},
|
|
2668
|
+
bgColor: {
|
|
2669
|
+
bgBlack: [40, 49],
|
|
2670
|
+
bgRed: [41, 49],
|
|
2671
|
+
bgGreen: [42, 49],
|
|
2672
|
+
bgYellow: [43, 49],
|
|
2673
|
+
bgBlue: [44, 49],
|
|
2674
|
+
bgMagenta: [45, 49],
|
|
2675
|
+
bgCyan: [46, 49],
|
|
2676
|
+
bgWhite: [47, 49],
|
|
2677
|
+
// Bright color
|
|
2678
|
+
bgBlackBright: [100, 49],
|
|
2679
|
+
bgGray: [100, 49],
|
|
2680
|
+
// Alias of `bgBlackBright`
|
|
2681
|
+
bgGrey: [100, 49],
|
|
2682
|
+
// Alias of `bgBlackBright`
|
|
2683
|
+
bgRedBright: [101, 49],
|
|
2684
|
+
bgGreenBright: [102, 49],
|
|
2685
|
+
bgYellowBright: [103, 49],
|
|
2686
|
+
bgBlueBright: [104, 49],
|
|
2687
|
+
bgMagentaBright: [105, 49],
|
|
2688
|
+
bgCyanBright: [106, 49],
|
|
2689
|
+
bgWhiteBright: [107, 49]
|
|
2690
|
+
}
|
|
2691
|
+
};
|
|
2692
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
2693
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
2694
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
2695
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
2696
|
+
function assembleStyles() {
|
|
2697
|
+
const codes = /* @__PURE__ */ new Map();
|
|
2698
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
2699
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
2700
|
+
styles[styleName] = {
|
|
2701
|
+
open: `\x1B[${style[0]}m`,
|
|
2702
|
+
close: `\x1B[${style[1]}m`
|
|
2703
|
+
};
|
|
2704
|
+
group[styleName] = styles[styleName];
|
|
2705
|
+
codes.set(style[0], style[1]);
|
|
2706
|
+
}
|
|
2707
|
+
Object.defineProperty(styles, groupName, {
|
|
2708
|
+
value: group,
|
|
2709
|
+
enumerable: false
|
|
2710
|
+
});
|
|
2711
|
+
}
|
|
2712
|
+
Object.defineProperty(styles, "codes", {
|
|
2713
|
+
value: codes,
|
|
2714
|
+
enumerable: false
|
|
2715
|
+
});
|
|
2716
|
+
styles.color.close = "\x1B[39m";
|
|
2717
|
+
styles.bgColor.close = "\x1B[49m";
|
|
2718
|
+
styles.color.ansi = wrapAnsi16();
|
|
2719
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
2720
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
2721
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
2722
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
2723
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
2724
|
+
Object.defineProperties(styles, {
|
|
2725
|
+
rgbToAnsi256: {
|
|
2726
|
+
value(red, green, blue) {
|
|
2727
|
+
if (red === green && green === blue) {
|
|
2728
|
+
if (red < 8) {
|
|
2729
|
+
return 16;
|
|
2730
|
+
}
|
|
2731
|
+
if (red > 248) {
|
|
2732
|
+
return 231;
|
|
2733
|
+
}
|
|
2734
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
2735
|
+
}
|
|
2736
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
2737
|
+
},
|
|
2738
|
+
enumerable: false
|
|
2739
|
+
},
|
|
2740
|
+
hexToRgb: {
|
|
2741
|
+
value(hex) {
|
|
2742
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
2743
|
+
if (!matches) {
|
|
2744
|
+
return [0, 0, 0];
|
|
2745
|
+
}
|
|
2746
|
+
let [colorString] = matches;
|
|
2747
|
+
if (colorString.length === 3) {
|
|
2748
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
2749
|
+
}
|
|
2750
|
+
const integer = Number.parseInt(colorString, 16);
|
|
2751
|
+
return [
|
|
2752
|
+
/* eslint-disable no-bitwise */
|
|
2753
|
+
integer >> 16 & 255,
|
|
2754
|
+
integer >> 8 & 255,
|
|
2755
|
+
integer & 255
|
|
2756
|
+
/* eslint-enable no-bitwise */
|
|
2757
|
+
];
|
|
2758
|
+
},
|
|
2759
|
+
enumerable: false
|
|
2760
|
+
},
|
|
2761
|
+
hexToAnsi256: {
|
|
2762
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
2763
|
+
enumerable: false
|
|
2764
|
+
},
|
|
2765
|
+
ansi256ToAnsi: {
|
|
2766
|
+
value(code) {
|
|
2767
|
+
if (code < 8) {
|
|
2768
|
+
return 30 + code;
|
|
2769
|
+
}
|
|
2770
|
+
if (code < 16) {
|
|
2771
|
+
return 90 + (code - 8);
|
|
2772
|
+
}
|
|
2773
|
+
let red;
|
|
2774
|
+
let green;
|
|
2775
|
+
let blue;
|
|
2776
|
+
if (code >= 232) {
|
|
2777
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
2778
|
+
green = red;
|
|
2779
|
+
blue = red;
|
|
2780
|
+
} else {
|
|
2781
|
+
code -= 16;
|
|
2782
|
+
const remainder = code % 36;
|
|
2783
|
+
red = Math.floor(code / 36) / 5;
|
|
2784
|
+
green = Math.floor(remainder / 6) / 5;
|
|
2785
|
+
blue = remainder % 6 / 5;
|
|
2786
|
+
}
|
|
2787
|
+
const value = Math.max(red, green, blue) * 2;
|
|
2788
|
+
if (value === 0) {
|
|
2789
|
+
return 30;
|
|
2790
|
+
}
|
|
2791
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
2792
|
+
if (value === 2) {
|
|
2793
|
+
result += 60;
|
|
2794
|
+
}
|
|
2795
|
+
return result;
|
|
2796
|
+
},
|
|
2797
|
+
enumerable: false
|
|
2798
|
+
},
|
|
2799
|
+
rgbToAnsi: {
|
|
2800
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
2801
|
+
enumerable: false
|
|
2802
|
+
},
|
|
2803
|
+
hexToAnsi: {
|
|
2804
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
2805
|
+
enumerable: false
|
|
2806
|
+
}
|
|
2807
|
+
});
|
|
2808
|
+
return styles;
|
|
2809
|
+
}
|
|
2810
|
+
var ansiStyles = assembleStyles();
|
|
2811
|
+
var ansi_styles_default = ansiStyles;
|
|
2812
|
+
|
|
2813
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
2814
|
+
import process2 from "process";
|
|
2815
|
+
import os from "os";
|
|
2816
|
+
import tty from "tty";
|
|
2817
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
2818
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
2819
|
+
const position = argv.indexOf(prefix + flag);
|
|
2820
|
+
const terminatorPosition = argv.indexOf("--");
|
|
2821
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
2822
|
+
}
|
|
2823
|
+
var { env } = process2;
|
|
2824
|
+
var flagForceColor;
|
|
2825
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
2826
|
+
flagForceColor = 0;
|
|
2827
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
2828
|
+
flagForceColor = 1;
|
|
2829
|
+
}
|
|
2830
|
+
function envForceColor() {
|
|
2831
|
+
if ("FORCE_COLOR" in env) {
|
|
2832
|
+
if (env.FORCE_COLOR === "true") {
|
|
2833
|
+
return 1;
|
|
2834
|
+
}
|
|
2835
|
+
if (env.FORCE_COLOR === "false") {
|
|
2836
|
+
return 0;
|
|
2837
|
+
}
|
|
2838
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
function translateLevel(level) {
|
|
2842
|
+
if (level === 0) {
|
|
2843
|
+
return false;
|
|
2844
|
+
}
|
|
2845
|
+
return {
|
|
2846
|
+
level,
|
|
2847
|
+
hasBasic: true,
|
|
2848
|
+
has256: level >= 2,
|
|
2849
|
+
has16m: level >= 3
|
|
2850
|
+
};
|
|
2851
|
+
}
|
|
2852
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
2853
|
+
const noFlagForceColor = envForceColor();
|
|
2854
|
+
if (noFlagForceColor !== void 0) {
|
|
2855
|
+
flagForceColor = noFlagForceColor;
|
|
2856
|
+
}
|
|
2857
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
2858
|
+
if (forceColor === 0) {
|
|
2859
|
+
return 0;
|
|
2860
|
+
}
|
|
2861
|
+
if (sniffFlags) {
|
|
2862
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
2863
|
+
return 3;
|
|
2864
|
+
}
|
|
2865
|
+
if (hasFlag("color=256")) {
|
|
2866
|
+
return 2;
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
2870
|
+
return 1;
|
|
2871
|
+
}
|
|
2872
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
2873
|
+
return 0;
|
|
2874
|
+
}
|
|
2875
|
+
const min = forceColor || 0;
|
|
2876
|
+
if (env.TERM === "dumb") {
|
|
2877
|
+
return min;
|
|
2878
|
+
}
|
|
2879
|
+
if (process2.platform === "win32") {
|
|
2880
|
+
const osRelease = os.release().split(".");
|
|
2881
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2882
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
2883
|
+
}
|
|
2884
|
+
return 1;
|
|
2885
|
+
}
|
|
2886
|
+
if ("CI" in env) {
|
|
2887
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
|
|
2888
|
+
return 3;
|
|
2889
|
+
}
|
|
2890
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
2891
|
+
return 1;
|
|
2892
|
+
}
|
|
2893
|
+
return min;
|
|
2894
|
+
}
|
|
2895
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
2896
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
2897
|
+
}
|
|
2898
|
+
if (env.COLORTERM === "truecolor") {
|
|
2899
|
+
return 3;
|
|
2900
|
+
}
|
|
2901
|
+
if (env.TERM === "xterm-kitty") {
|
|
2902
|
+
return 3;
|
|
2903
|
+
}
|
|
2904
|
+
if (env.TERM === "xterm-ghostty") {
|
|
2905
|
+
return 3;
|
|
2906
|
+
}
|
|
2907
|
+
if (env.TERM === "wezterm") {
|
|
2908
|
+
return 3;
|
|
2909
|
+
}
|
|
2910
|
+
if ("TERM_PROGRAM" in env) {
|
|
2911
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
2912
|
+
switch (env.TERM_PROGRAM) {
|
|
2913
|
+
case "iTerm.app": {
|
|
2914
|
+
return version >= 3 ? 3 : 2;
|
|
2915
|
+
}
|
|
2916
|
+
case "Apple_Terminal": {
|
|
2917
|
+
return 2;
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
2922
|
+
return 2;
|
|
2923
|
+
}
|
|
2924
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
2925
|
+
return 1;
|
|
2926
|
+
}
|
|
2927
|
+
if ("COLORTERM" in env) {
|
|
2928
|
+
return 1;
|
|
2929
|
+
}
|
|
2930
|
+
return min;
|
|
2931
|
+
}
|
|
2932
|
+
function createSupportsColor(stream, options = {}) {
|
|
2933
|
+
const level = _supportsColor(stream, {
|
|
2934
|
+
streamIsTTY: stream && stream.isTTY,
|
|
2935
|
+
...options
|
|
2936
|
+
});
|
|
2937
|
+
return translateLevel(level);
|
|
2938
|
+
}
|
|
2939
|
+
var supportsColor = {
|
|
2940
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
2941
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
2942
|
+
};
|
|
2943
|
+
var supports_color_default = supportsColor;
|
|
2944
|
+
|
|
2945
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
2946
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
2947
|
+
let index = string.indexOf(substring);
|
|
2948
|
+
if (index === -1) {
|
|
2949
|
+
return string;
|
|
2950
|
+
}
|
|
2951
|
+
const substringLength = substring.length;
|
|
2952
|
+
let endIndex = 0;
|
|
2953
|
+
let returnValue = "";
|
|
2954
|
+
do {
|
|
2955
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
2956
|
+
endIndex = index + substringLength;
|
|
2957
|
+
index = string.indexOf(substring, endIndex);
|
|
2958
|
+
} while (index !== -1);
|
|
2959
|
+
returnValue += string.slice(endIndex);
|
|
2960
|
+
return returnValue;
|
|
2961
|
+
}
|
|
2962
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
2963
|
+
let endIndex = 0;
|
|
2964
|
+
let returnValue = "";
|
|
2965
|
+
do {
|
|
2966
|
+
const gotCR = string[index - 1] === "\r";
|
|
2967
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
2968
|
+
endIndex = index + 1;
|
|
2969
|
+
index = string.indexOf("\n", endIndex);
|
|
2970
|
+
} while (index !== -1);
|
|
2971
|
+
returnValue += string.slice(endIndex);
|
|
2972
|
+
return returnValue;
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
2976
|
+
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
2977
|
+
var GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
|
|
2978
|
+
var STYLER = /* @__PURE__ */ Symbol("STYLER");
|
|
2979
|
+
var IS_EMPTY = /* @__PURE__ */ Symbol("IS_EMPTY");
|
|
2980
|
+
var levelMapping = [
|
|
2981
|
+
"ansi",
|
|
2982
|
+
"ansi",
|
|
2983
|
+
"ansi256",
|
|
2984
|
+
"ansi16m"
|
|
2985
|
+
];
|
|
2986
|
+
var styles2 = /* @__PURE__ */ Object.create(null);
|
|
2987
|
+
var applyOptions = (object, options = {}) => {
|
|
2988
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
2989
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
2990
|
+
}
|
|
2991
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
2992
|
+
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
2993
|
+
};
|
|
2994
|
+
var chalkFactory = (options) => {
|
|
2995
|
+
const chalk2 = (...strings) => strings.join(" ");
|
|
2996
|
+
applyOptions(chalk2, options);
|
|
2997
|
+
Object.setPrototypeOf(chalk2, createChalk.prototype);
|
|
2998
|
+
return chalk2;
|
|
2999
|
+
};
|
|
3000
|
+
function createChalk(options) {
|
|
3001
|
+
return chalkFactory(options);
|
|
3002
|
+
}
|
|
3003
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
3004
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
3005
|
+
styles2[styleName] = {
|
|
3006
|
+
get() {
|
|
3007
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
3008
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
3009
|
+
return builder;
|
|
3010
|
+
}
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
styles2.visible = {
|
|
3014
|
+
get() {
|
|
3015
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
3016
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
3017
|
+
return builder;
|
|
3018
|
+
}
|
|
3019
|
+
};
|
|
3020
|
+
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
3021
|
+
if (model === "rgb") {
|
|
3022
|
+
if (level === "ansi16m") {
|
|
3023
|
+
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
3024
|
+
}
|
|
3025
|
+
if (level === "ansi256") {
|
|
3026
|
+
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
3027
|
+
}
|
|
3028
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
3029
|
+
}
|
|
3030
|
+
if (model === "hex") {
|
|
3031
|
+
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
3032
|
+
}
|
|
3033
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
3034
|
+
};
|
|
3035
|
+
var usedModels = ["rgb", "hex", "ansi256"];
|
|
3036
|
+
for (const model of usedModels) {
|
|
3037
|
+
styles2[model] = {
|
|
3038
|
+
get() {
|
|
3039
|
+
const { level } = this;
|
|
3040
|
+
return function(...arguments_) {
|
|
3041
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
3042
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
3043
|
+
};
|
|
3044
|
+
}
|
|
3045
|
+
};
|
|
3046
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
3047
|
+
styles2[bgModel] = {
|
|
3048
|
+
get() {
|
|
3049
|
+
const { level } = this;
|
|
3050
|
+
return function(...arguments_) {
|
|
3051
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
3052
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
3053
|
+
};
|
|
3054
|
+
}
|
|
3055
|
+
};
|
|
3056
|
+
}
|
|
3057
|
+
var proto = Object.defineProperties(() => {
|
|
3058
|
+
}, {
|
|
3059
|
+
...styles2,
|
|
3060
|
+
level: {
|
|
3061
|
+
enumerable: true,
|
|
3062
|
+
get() {
|
|
3063
|
+
return this[GENERATOR].level;
|
|
3064
|
+
},
|
|
3065
|
+
set(level) {
|
|
3066
|
+
this[GENERATOR].level = level;
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
});
|
|
3070
|
+
var createStyler = (open6, close, parent) => {
|
|
3071
|
+
let openAll;
|
|
3072
|
+
let closeAll;
|
|
3073
|
+
if (parent === void 0) {
|
|
3074
|
+
openAll = open6;
|
|
3075
|
+
closeAll = close;
|
|
3076
|
+
} else {
|
|
3077
|
+
openAll = parent.openAll + open6;
|
|
3078
|
+
closeAll = close + parent.closeAll;
|
|
3079
|
+
}
|
|
3080
|
+
return {
|
|
3081
|
+
open: open6,
|
|
3082
|
+
close,
|
|
3083
|
+
openAll,
|
|
3084
|
+
closeAll,
|
|
3085
|
+
parent
|
|
3086
|
+
};
|
|
3087
|
+
};
|
|
3088
|
+
var createBuilder = (self, _styler, _isEmpty) => {
|
|
3089
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
3090
|
+
Object.setPrototypeOf(builder, proto);
|
|
3091
|
+
builder[GENERATOR] = self;
|
|
3092
|
+
builder[STYLER] = _styler;
|
|
3093
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
3094
|
+
return builder;
|
|
3095
|
+
};
|
|
3096
|
+
var applyStyle = (self, string) => {
|
|
3097
|
+
if (self.level <= 0 || !string) {
|
|
3098
|
+
return self[IS_EMPTY] ? "" : string;
|
|
3099
|
+
}
|
|
3100
|
+
let styler = self[STYLER];
|
|
3101
|
+
if (styler === void 0) {
|
|
3102
|
+
return string;
|
|
3103
|
+
}
|
|
3104
|
+
const { openAll, closeAll } = styler;
|
|
3105
|
+
if (string.includes("\x1B")) {
|
|
3106
|
+
while (styler !== void 0) {
|
|
3107
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
3108
|
+
styler = styler.parent;
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
const lfIndex = string.indexOf("\n");
|
|
3112
|
+
if (lfIndex !== -1) {
|
|
3113
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
3114
|
+
}
|
|
3115
|
+
return openAll + string + closeAll;
|
|
3116
|
+
};
|
|
3117
|
+
Object.defineProperties(createChalk.prototype, styles2);
|
|
3118
|
+
var chalk = createChalk();
|
|
3119
|
+
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
3120
|
+
var source_default = chalk;
|
|
3121
|
+
|
|
3122
|
+
// src/components/ui/AnimatedText.tsx
|
|
3123
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
3124
|
+
import { Text as Text4 } from "ink";
|
|
3125
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
3126
|
+
function hexToRgb(hex) {
|
|
3127
|
+
const h = hex.replace("#", "");
|
|
3128
|
+
const n = h.length === 3 ? parseInt(h[0] + h[0] + h[1] + h[1] + h[2] + h[2], 16) : parseInt(h, 16);
|
|
3129
|
+
return [n >> 16 & 255, n >> 8 & 255, n & 255];
|
|
3130
|
+
}
|
|
3131
|
+
var DELAYS = {
|
|
3132
|
+
pulse: 16,
|
|
3133
|
+
neon: 500,
|
|
3134
|
+
radar: 50,
|
|
3135
|
+
karaoke: 50,
|
|
3136
|
+
rainbow: 15,
|
|
3137
|
+
glitch: 55
|
|
3138
|
+
};
|
|
3139
|
+
var GLITCH_CHARS = "\u2593\u2592\u2591\u2588\u2580\u2584\u258C\u2590\u2500\u2502\u2524\u2510\u2514\u2518\u251C\u252C\u2534\u253C";
|
|
3140
|
+
var TOTAL_PULSE_FRAMES = 120;
|
|
3141
|
+
function lerp(a, b, t) {
|
|
3142
|
+
return Math.round(a + (b - a) * t);
|
|
3143
|
+
}
|
|
3144
|
+
function applyPulse(text, frame, config) {
|
|
3145
|
+
const [br, bg, bb] = hexToRgb((config == null ? void 0 : config.baseColor) ?? "#E6E6E6");
|
|
3146
|
+
const [pr, pg, pb] = hexToRgb((config == null ? void 0 : config.pulseColor) ?? "#FF1010");
|
|
3147
|
+
const t = (Math.sin(frame / TOTAL_PULSE_FRAMES * Math.PI * 2) + 1) / 2;
|
|
3148
|
+
const r = lerp(br, pr, t);
|
|
3149
|
+
const g = lerp(bg, pg, t);
|
|
3150
|
+
const b = lerp(bb, pb, t);
|
|
3151
|
+
return source_default.rgb(r, g, b)(text);
|
|
3152
|
+
}
|
|
3153
|
+
function applyNeon(text, frame, config) {
|
|
3154
|
+
const on = frame % 2 === 0;
|
|
3155
|
+
const onColor = (config == null ? void 0 : config.onColor) ?? "#00FFFF";
|
|
3156
|
+
const offColor = (config == null ? void 0 : config.offColor) ?? "#325050";
|
|
3157
|
+
return on ? source_default.hex(onColor)(text) : source_default.hex(offColor)(text);
|
|
3158
|
+
}
|
|
3159
|
+
function applyRadar(text, frame, config) {
|
|
3160
|
+
const [br, bg, bb] = hexToRgb((config == null ? void 0 : config.baseColor) ?? "#3C3C3C");
|
|
3161
|
+
const depth = Math.max(1, Math.floor(text.length * 0.2));
|
|
3162
|
+
const globalPos = frame % (text.length + depth);
|
|
3163
|
+
const chars = [];
|
|
3164
|
+
for (let i = 0; i < text.length; i++) {
|
|
3165
|
+
const pos = -(i - globalPos);
|
|
3166
|
+
if (pos > 0 && pos <= depth - 1) {
|
|
3167
|
+
const t = (depth - pos) / depth;
|
|
3168
|
+
chars.push(source_default.rgb(lerp(br, 255, t), lerp(bg, 255, t), lerp(bb, 255, t))(text[i]));
|
|
3169
|
+
} else {
|
|
3170
|
+
chars.push(source_default.rgb(br, bg, bb)(text[i]));
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
return chars.join("");
|
|
3174
|
+
}
|
|
3175
|
+
function applyKaraoke(text, frame, config) {
|
|
3176
|
+
const highlightColor = (config == null ? void 0 : config.highlightColor) ?? "#FFBB00";
|
|
3177
|
+
const baseColor = (config == null ? void 0 : config.baseColor) ?? "#FFFFFF";
|
|
3178
|
+
const pos = frame % (text.length + 20) - 10;
|
|
3179
|
+
if (pos < 0) {
|
|
3180
|
+
return source_default.hex(baseColor)(text);
|
|
3181
|
+
}
|
|
3182
|
+
return source_default.hex(highlightColor).bold(text.substring(0, pos)) + source_default.hex(baseColor)(text.substring(pos));
|
|
3183
|
+
}
|
|
3184
|
+
function hsvToRgb(h, s, v) {
|
|
3185
|
+
const i = Math.floor(h / 60) % 6;
|
|
3186
|
+
const f = h / 60 - Math.floor(h / 60);
|
|
3187
|
+
const p = v * (1 - s);
|
|
3188
|
+
const q = v * (1 - f * s);
|
|
3189
|
+
const t = v * (1 - (1 - f) * s);
|
|
3190
|
+
const map = [
|
|
3191
|
+
[v, t, p],
|
|
3192
|
+
[q, v, p],
|
|
3193
|
+
[p, v, t],
|
|
3194
|
+
[p, q, v],
|
|
3195
|
+
[t, p, v],
|
|
3196
|
+
[v, p, q]
|
|
3197
|
+
];
|
|
3198
|
+
return map[i].map((c) => Math.round(c * 255));
|
|
3199
|
+
}
|
|
3200
|
+
function applyRainbow(text, frame, config) {
|
|
3201
|
+
const sat = (config == null ? void 0 : config.saturation) ?? 1;
|
|
3202
|
+
const bri = (config == null ? void 0 : config.brightness) ?? 1;
|
|
3203
|
+
const hueStart = 5 * frame % 360;
|
|
3204
|
+
const chars = [];
|
|
3205
|
+
for (let i = 0; i < text.length; i++) {
|
|
3206
|
+
const hue = (hueStart + i * 360 / Math.max(text.length, 1)) % 360;
|
|
3207
|
+
const [r, g, b] = hsvToRgb(hue, sat, bri);
|
|
3208
|
+
chars.push(source_default.rgb(r, g, b)(text[i]));
|
|
3209
|
+
}
|
|
3210
|
+
return chars.join("");
|
|
3211
|
+
}
|
|
3212
|
+
function applyGlitch(text, frame) {
|
|
3213
|
+
if (frame % 2 + frame % 3 + frame % 11 + frame % 29 + frame % 37 > 52) {
|
|
3214
|
+
return text.replace(/[^\r\n]/g, " ");
|
|
3215
|
+
}
|
|
3216
|
+
const chunkSize = Math.max(3, Math.round(text.length * 0.02));
|
|
3217
|
+
const chars = [];
|
|
3218
|
+
for (let i = 0; i < text.length; i++) {
|
|
3219
|
+
const skip = Math.round(Math.max(0, (Math.random() - 0.8) * chunkSize));
|
|
3220
|
+
chars.push(text.substring(i, i + skip).replace(/[^\r\n]/g, " "));
|
|
3221
|
+
i += skip;
|
|
3222
|
+
if (text[i]) {
|
|
3223
|
+
if (text[i] !== "\n" && text[i] !== "\r" && Math.random() > 0.995) {
|
|
3224
|
+
chars.push(GLITCH_CHARS[Math.floor(Math.random() * GLITCH_CHARS.length)]);
|
|
3225
|
+
} else if (Math.random() > 5e-3) {
|
|
3226
|
+
chars.push(text[i]);
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
return chars.join("");
|
|
3231
|
+
}
|
|
3232
|
+
function applyAnimation(text, name, frame, config) {
|
|
3233
|
+
switch (name) {
|
|
3234
|
+
case "pulse":
|
|
3235
|
+
return applyPulse(text, frame, config);
|
|
3236
|
+
case "neon":
|
|
3237
|
+
return applyNeon(text, frame, config);
|
|
3238
|
+
case "radar":
|
|
3239
|
+
return applyRadar(text, frame, config);
|
|
3240
|
+
case "karaoke":
|
|
3241
|
+
return applyKaraoke(text, frame, config);
|
|
3242
|
+
case "rainbow":
|
|
3243
|
+
return applyRainbow(text, frame, config);
|
|
3244
|
+
case "glitch":
|
|
3245
|
+
return applyGlitch(text, frame);
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
function flattenChildren(children) {
|
|
3249
|
+
if (typeof children === "string") return children;
|
|
3250
|
+
if (typeof children === "number") return String(children);
|
|
3251
|
+
if (children == null || typeof children === "boolean") return "";
|
|
3252
|
+
if (Array.isArray(children)) return children.map(flattenChildren).join("");
|
|
3253
|
+
return "";
|
|
3254
|
+
}
|
|
3255
|
+
function AnimatedText({
|
|
3256
|
+
name = "pulse",
|
|
3257
|
+
speed = 1,
|
|
3258
|
+
bold,
|
|
3259
|
+
italic,
|
|
3260
|
+
underline,
|
|
3261
|
+
strikethrough,
|
|
3262
|
+
dimColor,
|
|
3263
|
+
config,
|
|
3264
|
+
children
|
|
3265
|
+
}) {
|
|
3266
|
+
const [frame, setFrame] = useState10(0);
|
|
3267
|
+
const text = flattenChildren(children);
|
|
3268
|
+
useEffect8(() => {
|
|
3269
|
+
const delay = DELAYS[name] / speed;
|
|
3270
|
+
const interval = setInterval(() => {
|
|
3271
|
+
setFrame((f) => f + 1);
|
|
3272
|
+
}, delay);
|
|
3273
|
+
return () => clearInterval(interval);
|
|
3274
|
+
}, [name, speed]);
|
|
3275
|
+
let animated = applyAnimation(text, name, frame, config);
|
|
3276
|
+
if (bold) animated = source_default.bold(animated);
|
|
3277
|
+
if (italic) animated = source_default.italic(animated);
|
|
3278
|
+
if (underline) animated = source_default.underline(animated);
|
|
3279
|
+
if (strikethrough) animated = source_default.strikethrough(animated);
|
|
3280
|
+
if (dimColor) animated = source_default.dim(animated);
|
|
3281
|
+
return /* @__PURE__ */ jsx5(Text4, { children: animated });
|
|
3282
|
+
}
|
|
3283
|
+
|
|
2603
3284
|
// src/components/github/PullRequestsBox.tsx
|
|
2604
|
-
import { jsx as
|
|
3285
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2605
3286
|
function PullRequestsBox({
|
|
2606
3287
|
prs,
|
|
2607
3288
|
selectedPR,
|
|
@@ -2614,7 +3295,7 @@ function PullRequestsBox({
|
|
|
2614
3295
|
isActive,
|
|
2615
3296
|
isGeneratingPR
|
|
2616
3297
|
}) {
|
|
2617
|
-
const [copied, setCopied] =
|
|
3298
|
+
const [copied, setCopied] = useState11(false);
|
|
2618
3299
|
const selectedIndex = prs.findIndex((p) => p.number === (selectedPR == null ? void 0 : selectedPR.number));
|
|
2619
3300
|
const { highlightedIndex, scrollRef } = useListNavigation({
|
|
2620
3301
|
items: prs,
|
|
@@ -2651,43 +3332,40 @@ function PullRequestsBox({
|
|
|
2651
3332
|
const subtitle = branch ? ` (${branch})` : "";
|
|
2652
3333
|
const copiedIndicator = copied ? " [Copied!]" : "";
|
|
2653
3334
|
const borderColor = isActive ? "yellow" : void 0;
|
|
2654
|
-
return /* @__PURE__ */
|
|
3335
|
+
return /* @__PURE__ */ jsx6(
|
|
2655
3336
|
TitledBox,
|
|
2656
3337
|
{
|
|
2657
3338
|
borderStyle: "round",
|
|
2658
3339
|
titles: [`${title}${subtitle}${copiedIndicator}`],
|
|
2659
3340
|
borderColor,
|
|
2660
3341
|
height: 5,
|
|
2661
|
-
children: /* @__PURE__ */
|
|
2662
|
-
loading && /* @__PURE__ */
|
|
2663
|
-
error && /* @__PURE__ */
|
|
2664
|
-
isGeneratingPR && /* @__PURE__ */
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
] }),
|
|
2668
|
-
!loading && !error && /* @__PURE__ */ jsxs3(ScrollView2, { ref: scrollRef, children: [
|
|
2669
|
-
prs.length === 0 && /* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "No PRs for this branch" }, "empty"),
|
|
3342
|
+
children: /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
3343
|
+
loading && /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "Loading PRs..." }),
|
|
3344
|
+
error && /* @__PURE__ */ jsx6(Text5, { color: "red", children: error }),
|
|
3345
|
+
isGeneratingPR && /* @__PURE__ */ jsx6(AnimatedText, { name: "radar", config: { baseColor: "#CC6600" }, children: "Generating PR with Claude... (Esc to cancel)" }),
|
|
3346
|
+
!loading && !error && /* @__PURE__ */ jsxs4(ScrollView2, { ref: scrollRef, children: [
|
|
3347
|
+
prs.length === 0 && /* @__PURE__ */ jsx6(Text5, { dimColor: true, children: "No PRs for this branch" }, "empty"),
|
|
2670
3348
|
prs.map((pr, idx) => {
|
|
2671
3349
|
const isHighlighted = isActive && idx === highlightedIndex;
|
|
2672
3350
|
const isSelected = pr.number === (selectedPR == null ? void 0 : selectedPR.number);
|
|
2673
3351
|
const cursor = isHighlighted ? ">" : " ";
|
|
2674
3352
|
const indicator = isSelected ? " *" : "";
|
|
2675
|
-
return /* @__PURE__ */
|
|
2676
|
-
/* @__PURE__ */
|
|
3353
|
+
return /* @__PURE__ */ jsxs4(Box4, { children: [
|
|
3354
|
+
/* @__PURE__ */ jsxs4(Text5, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
2677
3355
|
cursor,
|
|
2678
3356
|
" "
|
|
2679
3357
|
] }),
|
|
2680
|
-
/* @__PURE__ */
|
|
3358
|
+
/* @__PURE__ */ jsxs4(Text5, { color: isSelected ? "green" : void 0, children: [
|
|
2681
3359
|
"#",
|
|
2682
3360
|
pr.number,
|
|
2683
3361
|
" ",
|
|
2684
3362
|
pr.isDraft ? "[Draft] " : "",
|
|
2685
3363
|
pr.title
|
|
2686
3364
|
] }),
|
|
2687
|
-
/* @__PURE__ */
|
|
3365
|
+
/* @__PURE__ */ jsx6(Text5, { dimColor: true, children: indicator })
|
|
2688
3366
|
] }, pr.number);
|
|
2689
3367
|
}),
|
|
2690
|
-
/* @__PURE__ */
|
|
3368
|
+
/* @__PURE__ */ jsxs4(Text5, { color: "blue", children: [
|
|
2691
3369
|
isActive && highlightedIndex === prs.length ? "> " : " ",
|
|
2692
3370
|
"+ Create new PR"
|
|
2693
3371
|
] }, "create")
|
|
@@ -2699,9 +3377,9 @@ function PullRequestsBox({
|
|
|
2699
3377
|
|
|
2700
3378
|
// src/components/github/RemotesBox.tsx
|
|
2701
3379
|
import { TitledBox as TitledBox2 } from "@mishieck/ink-titled-box";
|
|
2702
|
-
import { Box as Box5, Text as
|
|
3380
|
+
import { Box as Box5, Text as Text6 } from "ink";
|
|
2703
3381
|
import { ScrollView as ScrollView3 } from "ink-scroll-view";
|
|
2704
|
-
import { jsx as
|
|
3382
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2705
3383
|
function RemotesBox({ remotes, selectedRemote, onSelect, loading, error, isActive }) {
|
|
2706
3384
|
const selectedIndex = remotes.findIndex((r) => r.name === selectedRemote);
|
|
2707
3385
|
const { highlightedIndex, scrollRef } = useListNavigation({
|
|
@@ -2712,52 +3390,52 @@ function RemotesBox({ remotes, selectedRemote, onSelect, loading, error, isActiv
|
|
|
2712
3390
|
});
|
|
2713
3391
|
const title = "[1] Remotes";
|
|
2714
3392
|
const borderColor = isActive ? "yellow" : void 0;
|
|
2715
|
-
return /* @__PURE__ */
|
|
2716
|
-
loading && /* @__PURE__ */
|
|
2717
|
-
error && /* @__PURE__ */
|
|
2718
|
-
!loading && !error && remotes.length === 0 && /* @__PURE__ */
|
|
2719
|
-
!loading && !error && remotes.length > 0 && /* @__PURE__ */
|
|
3393
|
+
return /* @__PURE__ */ jsx7(TitledBox2, { borderStyle: "round", titles: [title], borderColor, height: 5, children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
3394
|
+
loading && /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "Loading..." }),
|
|
3395
|
+
error && /* @__PURE__ */ jsx7(Text6, { color: "red", children: error }),
|
|
3396
|
+
!loading && !error && remotes.length === 0 && /* @__PURE__ */ jsx7(Text6, { dimColor: true, children: "No remotes configured" }),
|
|
3397
|
+
!loading && !error && remotes.length > 0 && /* @__PURE__ */ jsx7(ScrollView3, { ref: scrollRef, children: remotes.map((remote, idx) => {
|
|
2720
3398
|
const isHighlighted = isActive && idx === highlightedIndex;
|
|
2721
3399
|
const isSelected = remote.name === selectedRemote;
|
|
2722
3400
|
const cursor = isHighlighted ? ">" : " ";
|
|
2723
3401
|
const indicator = isSelected ? " *" : "";
|
|
2724
|
-
return /* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
3402
|
+
return /* @__PURE__ */ jsxs5(Box5, { children: [
|
|
3403
|
+
/* @__PURE__ */ jsxs5(Text6, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
2726
3404
|
cursor,
|
|
2727
3405
|
" "
|
|
2728
3406
|
] }),
|
|
2729
|
-
/* @__PURE__ */
|
|
3407
|
+
/* @__PURE__ */ jsxs5(Text6, { color: isSelected ? "green" : void 0, children: [
|
|
2730
3408
|
remote.name,
|
|
2731
3409
|
" (",
|
|
2732
3410
|
remote.url,
|
|
2733
3411
|
")"
|
|
2734
3412
|
] }),
|
|
2735
|
-
/* @__PURE__ */
|
|
3413
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: indicator })
|
|
2736
3414
|
] }, remote.name);
|
|
2737
3415
|
}) })
|
|
2738
3416
|
] }) });
|
|
2739
3417
|
}
|
|
2740
3418
|
|
|
2741
3419
|
// src/components/github/GitHubView.tsx
|
|
2742
|
-
import { jsx as
|
|
3420
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2743
3421
|
function GitHubView({ isActive, onFocusedBoxChange, onLogUpdated }) {
|
|
2744
3422
|
const repo = useGitRepo();
|
|
2745
3423
|
const pullRequests = usePullRequests();
|
|
2746
|
-
const [focusedBox, setFocusedBox] =
|
|
2747
|
-
const [isGeneratingPR, setIsGeneratingPR] =
|
|
3424
|
+
const [focusedBox, setFocusedBox] = useState12("remotes");
|
|
3425
|
+
const [isGeneratingPR, setIsGeneratingPR] = useState12(false);
|
|
2748
3426
|
const claudeProcessRef = useRef5(null);
|
|
2749
3427
|
const previewScrollRef = useRef5(null);
|
|
2750
|
-
const [prPreview, setPrPreview] =
|
|
2751
|
-
|
|
3428
|
+
const [prPreview, setPrPreview] = useState12(null);
|
|
3429
|
+
useEffect9(() => {
|
|
2752
3430
|
if (repo.loading || !repo.currentBranch || !repo.currentRepoSlug) return;
|
|
2753
3431
|
pullRequests.fetchPRsAndDetails(repo.currentBranch, repo.currentRepoSlug);
|
|
2754
3432
|
}, [repo.loading, repo.currentBranch, repo.currentRepoSlug, pullRequests.fetchPRsAndDetails]);
|
|
2755
|
-
|
|
3433
|
+
useEffect9(() => {
|
|
2756
3434
|
if (isActive) {
|
|
2757
3435
|
repo.refreshBranch();
|
|
2758
3436
|
}
|
|
2759
3437
|
}, [isActive, repo.refreshBranch]);
|
|
2760
|
-
|
|
3438
|
+
useEffect9(() => {
|
|
2761
3439
|
onFocusedBoxChange == null ? void 0 : onFocusedBoxChange(focusedBox);
|
|
2762
3440
|
}, [focusedBox, onFocusedBoxChange]);
|
|
2763
3441
|
const handleRemoteSelect = useCallback8(
|
|
@@ -2776,7 +3454,7 @@ function GitHubView({ isActive, onFocusedBoxChange, onLogUpdated }) {
|
|
|
2776
3454
|
onLogUpdatedRef.current = onLogUpdated;
|
|
2777
3455
|
const prsRef = useRef5(pullRequests.prs);
|
|
2778
3456
|
prsRef.current = pullRequests.prs;
|
|
2779
|
-
|
|
3457
|
+
useEffect9(() => {
|
|
2780
3458
|
return () => {
|
|
2781
3459
|
var _a;
|
|
2782
3460
|
(_a = claudeProcessRef.current) == null ? void 0 : _a.cancel();
|
|
@@ -2799,9 +3477,9 @@ function GitHubView({ isActive, onFocusedBoxChange, onLogUpdated }) {
|
|
|
2799
3477
|
const branch = repo.currentBranch;
|
|
2800
3478
|
const repoPath = repo.repoPath;
|
|
2801
3479
|
const owner = remoteResult.data.owner;
|
|
2802
|
-
const
|
|
2803
|
-
claudeProcessRef.current =
|
|
2804
|
-
|
|
3480
|
+
const process3 = generatePRContent();
|
|
3481
|
+
claudeProcessRef.current = process3;
|
|
3482
|
+
process3.promise.then((result) => {
|
|
2805
3483
|
claudeProcessRef.current = null;
|
|
2806
3484
|
setIsGeneratingPR(false);
|
|
2807
3485
|
if (!result.success) {
|
|
@@ -2955,10 +3633,10 @@ ${body}`;
|
|
|
2955
3633
|
{ isActive }
|
|
2956
3634
|
);
|
|
2957
3635
|
if (repo.isRepo === false) {
|
|
2958
|
-
return /* @__PURE__ */
|
|
3636
|
+
return /* @__PURE__ */ jsx8(TitledBox3, { borderStyle: "round", titles: ["Error"], flexGrow: 1, children: /* @__PURE__ */ jsx8(Text7, { color: "red", children: "Current directory is not a git repository" }) });
|
|
2959
3637
|
}
|
|
2960
|
-
return /* @__PURE__ */
|
|
2961
|
-
/* @__PURE__ */
|
|
3638
|
+
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", flexGrow: 1, children: [
|
|
3639
|
+
/* @__PURE__ */ jsx8(
|
|
2962
3640
|
RemotesBox,
|
|
2963
3641
|
{
|
|
2964
3642
|
remotes: repo.remotes,
|
|
@@ -2969,7 +3647,7 @@ ${body}`;
|
|
|
2969
3647
|
isActive: isActive && !prPreview && focusedBox === "remotes"
|
|
2970
3648
|
}
|
|
2971
3649
|
),
|
|
2972
|
-
/* @__PURE__ */
|
|
3650
|
+
/* @__PURE__ */ jsx8(
|
|
2973
3651
|
PullRequestsBox,
|
|
2974
3652
|
{
|
|
2975
3653
|
prs: pullRequests.prs,
|
|
@@ -2984,7 +3662,7 @@ ${body}`;
|
|
|
2984
3662
|
isGeneratingPR
|
|
2985
3663
|
}
|
|
2986
3664
|
),
|
|
2987
|
-
/* @__PURE__ */
|
|
3665
|
+
/* @__PURE__ */ jsx8(
|
|
2988
3666
|
PRDetailsBox,
|
|
2989
3667
|
{
|
|
2990
3668
|
pr: pullRequests.prDetails,
|
|
@@ -2993,28 +3671,28 @@ ${body}`;
|
|
|
2993
3671
|
isActive: isActive && !prPreview && focusedBox === "details"
|
|
2994
3672
|
}
|
|
2995
3673
|
),
|
|
2996
|
-
prPreview && /* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
2998
|
-
/* @__PURE__ */
|
|
2999
|
-
/* @__PURE__ */
|
|
3000
|
-
/* @__PURE__ */
|
|
3674
|
+
prPreview && /* @__PURE__ */ jsx8(TitledBox3, { borderStyle: "round", titles: ["PR Preview"], borderColor: "yellow", flexGrow: 1, flexBasis: 0, children: /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingX: 1, flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
3675
|
+
/* @__PURE__ */ jsx8(Box6, { flexGrow: 1, flexBasis: 0, overflow: "hidden", children: /* @__PURE__ */ jsx8(ScrollView4, { ref: previewScrollRef, children: /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
3676
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: prPreview.title }),
|
|
3677
|
+
/* @__PURE__ */ jsx8(Text7, { children: "" }),
|
|
3678
|
+
/* @__PURE__ */ jsx8(Text7, { children: prPreview.body })
|
|
3001
3679
|
] }) }) }),
|
|
3002
|
-
/* @__PURE__ */
|
|
3680
|
+
/* @__PURE__ */ jsx8(Text7, { dimColor: true, children: "Enter to apply, Esc to dismiss, j/k to scroll" })
|
|
3003
3681
|
] }) })
|
|
3004
3682
|
] });
|
|
3005
3683
|
}
|
|
3006
3684
|
|
|
3007
3685
|
// src/components/jira-browser/JiraBrowserView.tsx
|
|
3008
|
-
import { useCallback as useCallback10, useEffect as
|
|
3686
|
+
import { useCallback as useCallback10, useEffect as useEffect13, useMemo as useMemo3, useRef as useRef7, useState as useState17 } from "react";
|
|
3009
3687
|
import { Box as Box12, useInput as useInput10 } from "ink";
|
|
3010
3688
|
|
|
3011
3689
|
// src/components/jira-browser/AddViewModal.tsx
|
|
3012
|
-
import { useState as
|
|
3013
|
-
import { Box as Box8, Text as
|
|
3690
|
+
import { useState as useState13 } from "react";
|
|
3691
|
+
import { Box as Box8, Text as Text9, useInput as useInput6 } from "ink";
|
|
3014
3692
|
|
|
3015
3693
|
// src/components/ui/TextInput.tsx
|
|
3016
|
-
import { Box as Box7, Text as
|
|
3017
|
-
import { jsx as
|
|
3694
|
+
import { Box as Box7, Text as Text8, useInput as useInput5 } from "ink";
|
|
3695
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3018
3696
|
function TextInput({ value, onChange, placeholder, isActive, mask }) {
|
|
3019
3697
|
useInput5(
|
|
3020
3698
|
(input, key) => {
|
|
@@ -3038,18 +3716,18 @@ function TextInput({ value, onChange, placeholder, isActive, mask }) {
|
|
|
3038
3716
|
);
|
|
3039
3717
|
const displayValue = mask ? "*".repeat(value.length) : value;
|
|
3040
3718
|
const showPlaceholder = value.length === 0 && placeholder;
|
|
3041
|
-
return /* @__PURE__ */
|
|
3042
|
-
showPlaceholder ? /* @__PURE__ */
|
|
3043
|
-
isActive && /* @__PURE__ */
|
|
3719
|
+
return /* @__PURE__ */ jsx9(Box7, { children: /* @__PURE__ */ jsxs7(Text8, { children: [
|
|
3720
|
+
showPlaceholder ? /* @__PURE__ */ jsx9(Text8, { dimColor: true, children: placeholder }) : /* @__PURE__ */ jsx9(Text8, { children: displayValue }),
|
|
3721
|
+
isActive && /* @__PURE__ */ jsx9(Text8, { backgroundColor: "yellow", children: " " })
|
|
3044
3722
|
] }) });
|
|
3045
3723
|
}
|
|
3046
3724
|
|
|
3047
3725
|
// src/components/jira-browser/AddViewModal.tsx
|
|
3048
|
-
import { jsx as
|
|
3726
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3049
3727
|
function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
3050
|
-
const [url, setUrl] =
|
|
3051
|
-
const [name, setName] =
|
|
3052
|
-
const [activeField, setActiveField] =
|
|
3728
|
+
const [url, setUrl] = useState13("");
|
|
3729
|
+
const [name, setName] = useState13("");
|
|
3730
|
+
const [activeField, setActiveField] = useState13("url");
|
|
3053
3731
|
const canSubmit = url.trim().length > 0;
|
|
3054
3732
|
useInput6(
|
|
3055
3733
|
(_input, key) => {
|
|
@@ -3069,14 +3747,14 @@ function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3069
3747
|
},
|
|
3070
3748
|
{ isActive: !loading }
|
|
3071
3749
|
);
|
|
3072
|
-
return /* @__PURE__ */
|
|
3073
|
-
/* @__PURE__ */
|
|
3074
|
-
/* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
error && /* @__PURE__ */
|
|
3077
|
-
/* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
3750
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1, children: [
|
|
3751
|
+
/* @__PURE__ */ jsx10(Text9, { bold: true, color: "yellow", children: "Add Jira View" }),
|
|
3752
|
+
/* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "Tab to switch fields, Enter to save, Esc to cancel" }),
|
|
3753
|
+
/* @__PURE__ */ jsx10(Box8, { marginTop: 1 }),
|
|
3754
|
+
error && /* @__PURE__ */ jsx10(Box8, { marginBottom: 1, children: /* @__PURE__ */ jsx10(Text9, { color: "red", children: error }) }),
|
|
3755
|
+
/* @__PURE__ */ jsxs8(Box8, { children: [
|
|
3756
|
+
/* @__PURE__ */ jsx10(Text9, { color: "blue", children: "URL: " }),
|
|
3757
|
+
/* @__PURE__ */ jsx10(
|
|
3080
3758
|
TextInput,
|
|
3081
3759
|
{
|
|
3082
3760
|
value: url,
|
|
@@ -3086,9 +3764,9 @@ function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3086
3764
|
}
|
|
3087
3765
|
)
|
|
3088
3766
|
] }),
|
|
3089
|
-
/* @__PURE__ */
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3767
|
+
/* @__PURE__ */ jsxs8(Box8, { marginTop: 1, children: [
|
|
3768
|
+
/* @__PURE__ */ jsx10(Text9, { color: "blue", children: "Name: " }),
|
|
3769
|
+
/* @__PURE__ */ jsx10(
|
|
3092
3770
|
TextInput,
|
|
3093
3771
|
{
|
|
3094
3772
|
value: name,
|
|
@@ -3098,33 +3776,34 @@ function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3098
3776
|
}
|
|
3099
3777
|
)
|
|
3100
3778
|
] }),
|
|
3101
|
-
loading && /* @__PURE__ */
|
|
3102
|
-
/* @__PURE__ */
|
|
3779
|
+
loading && /* @__PURE__ */ jsx10(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text9, { color: "yellow", children: "Validating view..." }) }),
|
|
3780
|
+
/* @__PURE__ */ jsx10(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text9, { dimColor: true, children: "Supports: filter URLs, JQL URLs, board URLs" }) })
|
|
3103
3781
|
] });
|
|
3104
3782
|
}
|
|
3105
3783
|
|
|
3106
3784
|
// src/components/jira-browser/JiraSavedViewBrowserBox.tsx
|
|
3107
3785
|
import open4 from "open";
|
|
3108
|
-
import { useCallback as useCallback9, useEffect as
|
|
3786
|
+
import { useCallback as useCallback9, useEffect as useEffect11, useMemo as useMemo2, useState as useState15 } from "react";
|
|
3109
3787
|
import { TitledBox as TitledBox4 } from "@mishieck/ink-titled-box";
|
|
3110
|
-
import { Box as Box10, Text as
|
|
3788
|
+
import { Box as Box10, Text as Text11, useInput as useInput8 } from "ink";
|
|
3111
3789
|
import { ScrollView as ScrollView6 } from "ink-scroll-view";
|
|
3112
|
-
import
|
|
3790
|
+
import Spinner2 from "ink-spinner";
|
|
3113
3791
|
|
|
3114
3792
|
// src/components/jira-browser/JiraIssueDetailView.tsx
|
|
3115
3793
|
import open3 from "open";
|
|
3116
|
-
import { useEffect as
|
|
3117
|
-
import { Box as Box9, Text as
|
|
3794
|
+
import { useEffect as useEffect10, useRef as useRef6, useState as useState14 } from "react";
|
|
3795
|
+
import { Box as Box9, Text as Text10, useInput as useInput7 } from "ink";
|
|
3118
3796
|
import { ScrollView as ScrollView5 } from "ink-scroll-view";
|
|
3119
3797
|
import SelectInput from "ink-select-input";
|
|
3120
|
-
import
|
|
3121
|
-
import { jsx as
|
|
3798
|
+
import Spinner from "ink-spinner";
|
|
3799
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3122
3800
|
function JiraIssueDetailView({
|
|
3123
3801
|
issueKey,
|
|
3124
3802
|
issueSummary,
|
|
3125
3803
|
auth,
|
|
3126
3804
|
myAccountId,
|
|
3127
3805
|
myDisplayName,
|
|
3806
|
+
onFetchCurrentUser,
|
|
3128
3807
|
isActive,
|
|
3129
3808
|
onClose,
|
|
3130
3809
|
onIssueUpdated,
|
|
@@ -3132,15 +3811,15 @@ function JiraIssueDetailView({
|
|
|
3132
3811
|
}) {
|
|
3133
3812
|
var _a, _b;
|
|
3134
3813
|
const scrollRef = useRef6(null);
|
|
3135
|
-
const [detail, setDetail] =
|
|
3136
|
-
const [loading, setLoading] =
|
|
3137
|
-
const [error, setError] =
|
|
3138
|
-
const [mode, setMode] =
|
|
3139
|
-
const [transitions, setTransitions] =
|
|
3140
|
-
const [transitionsLoading, setTransitionsLoading] =
|
|
3141
|
-
const [actionLoading, setActionLoading] =
|
|
3142
|
-
const [actionError, setActionError] =
|
|
3143
|
-
|
|
3814
|
+
const [detail, setDetail] = useState14(null);
|
|
3815
|
+
const [loading, setLoading] = useState14(true);
|
|
3816
|
+
const [error, setError] = useState14(null);
|
|
3817
|
+
const [mode, setMode] = useState14("normal");
|
|
3818
|
+
const [transitions, setTransitions] = useState14([]);
|
|
3819
|
+
const [transitionsLoading, setTransitionsLoading] = useState14(false);
|
|
3820
|
+
const [actionLoading, setActionLoading] = useState14(null);
|
|
3821
|
+
const [actionError, setActionError] = useState14(null);
|
|
3822
|
+
useEffect10(() => {
|
|
3144
3823
|
setLoading(true);
|
|
3145
3824
|
setError(null);
|
|
3146
3825
|
getIssueDetail(auth, issueKey).then((result) => {
|
|
@@ -3186,16 +3865,27 @@ function JiraIssueDetailView({
|
|
|
3186
3865
|
setActionLoading(null);
|
|
3187
3866
|
};
|
|
3188
3867
|
const handleAssignToMe = async () => {
|
|
3189
|
-
if (!myAccountId || !myDisplayName) return;
|
|
3190
3868
|
setActionLoading("Assigning...");
|
|
3191
3869
|
setActionError(null);
|
|
3192
|
-
|
|
3870
|
+
let accountId = myAccountId;
|
|
3871
|
+
let displayName = myDisplayName;
|
|
3872
|
+
if (!accountId || !displayName) {
|
|
3873
|
+
const user = await onFetchCurrentUser();
|
|
3874
|
+
if (!user) {
|
|
3875
|
+
setActionError("Failed to get current user");
|
|
3876
|
+
setActionLoading(null);
|
|
3877
|
+
return;
|
|
3878
|
+
}
|
|
3879
|
+
accountId = user.accountId;
|
|
3880
|
+
displayName = user.displayName;
|
|
3881
|
+
}
|
|
3882
|
+
const result = await assignIssue(auth, issueKey, accountId);
|
|
3193
3883
|
if (result.success) {
|
|
3194
|
-
const assignee = { accountId
|
|
3884
|
+
const assignee = { accountId, displayName };
|
|
3195
3885
|
setDetail((prev) => prev ? { ...prev, fields: { ...prev.fields, assignee } } : prev);
|
|
3196
3886
|
onIssueUpdated(issueKey, { assignee });
|
|
3197
|
-
duckEvents.emit("jira:assigned", { ticketKey: issueKey, assignee:
|
|
3198
|
-
logJiraAssigneeChanged(issueKey, issueSummary, "assigned",
|
|
3887
|
+
duckEvents.emit("jira:assigned", { ticketKey: issueKey, assignee: displayName });
|
|
3888
|
+
logJiraAssigneeChanged(issueKey, issueSummary, "assigned", displayName);
|
|
3199
3889
|
onLogUpdated == null ? void 0 : onLogUpdated();
|
|
3200
3890
|
} else {
|
|
3201
3891
|
setActionError(result.error);
|
|
@@ -3248,7 +3938,7 @@ function JiraIssueDetailView({
|
|
|
3248
3938
|
if (input === "s" && !actionLoading) {
|
|
3249
3939
|
openTransitionPicker();
|
|
3250
3940
|
}
|
|
3251
|
-
if (input === "a" && !actionLoading
|
|
3941
|
+
if (input === "a" && !actionLoading) {
|
|
3252
3942
|
handleAssignToMe();
|
|
3253
3943
|
}
|
|
3254
3944
|
if (input === "A" && !actionLoading) {
|
|
@@ -3261,44 +3951,44 @@ function JiraIssueDetailView({
|
|
|
3261
3951
|
const descriptionMd = (detail == null ? void 0 : detail.fields.description) ? adfToMarkdown(detail.fields.description) : null;
|
|
3262
3952
|
const comments = (detail == null ? void 0 : detail.fields.comment.comments) ?? [];
|
|
3263
3953
|
const totalComments = (detail == null ? void 0 : detail.fields.comment.total) ?? 0;
|
|
3264
|
-
return /* @__PURE__ */
|
|
3265
|
-
/* @__PURE__ */
|
|
3266
|
-
loading && /* @__PURE__ */
|
|
3267
|
-
/* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", flexGrow: 1, children: [
|
|
3955
|
+
/* @__PURE__ */ jsxs9(Box9, { flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
3956
|
+
loading && /* @__PURE__ */ jsx11(Box9, { paddingX: 1, children: /* @__PURE__ */ jsxs9(Text10, { color: "yellow", children: [
|
|
3957
|
+
/* @__PURE__ */ jsx11(Spinner, { type: "dots" }),
|
|
3268
3958
|
" Loading issue details..."
|
|
3269
3959
|
] }) }),
|
|
3270
|
-
error && /* @__PURE__ */
|
|
3271
|
-
!loading && !error && detail && /* @__PURE__ */
|
|
3272
|
-
/* @__PURE__ */
|
|
3273
|
-
/* @__PURE__ */
|
|
3274
|
-
/* @__PURE__ */
|
|
3960
|
+
error && /* @__PURE__ */ jsx11(Box9, { paddingX: 1, children: /* @__PURE__ */ jsx11(Text10, { color: "red", children: error }) }),
|
|
3961
|
+
!loading && !error && detail && /* @__PURE__ */ jsx11(ScrollView5, { ref: scrollRef, children: /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", paddingX: 1, children: [
|
|
3962
|
+
/* @__PURE__ */ jsxs9(Box9, { children: [
|
|
3963
|
+
/* @__PURE__ */ jsx11(Text10, { bold: true, color: "blue", children: detail.key }),
|
|
3964
|
+
/* @__PURE__ */ jsxs9(Text10, { bold: true, children: [
|
|
3275
3965
|
" ",
|
|
3276
3966
|
detail.fields.summary
|
|
3277
3967
|
] })
|
|
3278
3968
|
] }),
|
|
3279
|
-
/* @__PURE__ */
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
/* @__PURE__ */
|
|
3282
|
-
/* @__PURE__ */
|
|
3283
|
-
/* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3285
|
-
/* @__PURE__ */
|
|
3969
|
+
/* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
3970
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Status:" }),
|
|
3971
|
+
/* @__PURE__ */ jsx11(Text10, { color: statusColor, children: detail.fields.status.name }),
|
|
3972
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Assignee:" }),
|
|
3973
|
+
/* @__PURE__ */ jsx11(Text10, { children: ((_a = detail.fields.assignee) == null ? void 0 : _a.displayName) ?? "Unassigned" }),
|
|
3974
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Reporter:" }),
|
|
3975
|
+
/* @__PURE__ */ jsx11(Text10, { children: ((_b = detail.fields.reporter) == null ? void 0 : _b.displayName) ?? "Unknown" })
|
|
3286
3976
|
] }),
|
|
3287
|
-
/* @__PURE__ */
|
|
3288
|
-
/* @__PURE__ */
|
|
3289
|
-
/* @__PURE__ */
|
|
3290
|
-
descriptionMd ? /* @__PURE__ */
|
|
3977
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx11(Divider, {}) }),
|
|
3978
|
+
/* @__PURE__ */ jsxs9(Box9, { marginTop: 1, flexDirection: "column", children: [
|
|
3979
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Description:" }),
|
|
3980
|
+
descriptionMd ? /* @__PURE__ */ jsx11(Markdown, { children: descriptionMd }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, italic: true, children: "No description" })
|
|
3291
3981
|
] }),
|
|
3292
|
-
/* @__PURE__ */
|
|
3293
|
-
/* @__PURE__ */
|
|
3294
|
-
/* @__PURE__ */
|
|
3982
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx11(Divider, {}) }),
|
|
3983
|
+
/* @__PURE__ */ jsxs9(Box9, { marginTop: 1, flexDirection: "column", children: [
|
|
3984
|
+
/* @__PURE__ */ jsxs9(Text10, { dimColor: true, children: [
|
|
3295
3985
|
"Comments (",
|
|
3296
3986
|
totalComments,
|
|
3297
3987
|
"):"
|
|
3298
3988
|
] }),
|
|
3299
|
-
comments.length === 0 && /* @__PURE__ */
|
|
3300
|
-
comments.map((comment) => /* @__PURE__ */
|
|
3301
|
-
comments.length < totalComments && /* @__PURE__ */
|
|
3989
|
+
comments.length === 0 && /* @__PURE__ */ jsx11(Text10, { dimColor: true, italic: true, children: "No comments" }),
|
|
3990
|
+
comments.map((comment) => /* @__PURE__ */ jsx11(CommentBlock, { comment }, comment.id)),
|
|
3991
|
+
comments.length < totalComments && /* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsxs9(Text10, { dimColor: true, children: [
|
|
3302
3992
|
"Showing ",
|
|
3303
3993
|
comments.length,
|
|
3304
3994
|
" of ",
|
|
@@ -3308,40 +3998,40 @@ function JiraIssueDetailView({
|
|
|
3308
3998
|
] })
|
|
3309
3999
|
] }) })
|
|
3310
4000
|
] }),
|
|
3311
|
-
mode === "transitions" && /* @__PURE__ */
|
|
3312
|
-
/* @__PURE__ */
|
|
3313
|
-
/* @__PURE__ */
|
|
4001
|
+
mode === "transitions" && /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
|
|
4002
|
+
/* @__PURE__ */ jsx11(Text10, { bold: true, color: "yellow", children: "Change Status" }),
|
|
4003
|
+
/* @__PURE__ */ jsx11(
|
|
3314
4004
|
SelectInput,
|
|
3315
4005
|
{
|
|
3316
4006
|
items: transitions.map((t) => ({ label: t.name, value: t.id })),
|
|
3317
4007
|
onSelect: handleTransitionSelect
|
|
3318
4008
|
}
|
|
3319
4009
|
),
|
|
3320
|
-
/* @__PURE__ */
|
|
4010
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Esc to cancel" })
|
|
3321
4011
|
] }),
|
|
3322
|
-
/* @__PURE__ */
|
|
3323
|
-
actionLoading && /* @__PURE__ */
|
|
3324
|
-
/* @__PURE__ */
|
|
4012
|
+
/* @__PURE__ */ jsxs9(Box9, { paddingX: 1, flexDirection: "column", children: [
|
|
4013
|
+
actionLoading && /* @__PURE__ */ jsxs9(Text10, { color: "yellow", children: [
|
|
4014
|
+
/* @__PURE__ */ jsx11(Spinner, { type: "dots" }),
|
|
3325
4015
|
" ",
|
|
3326
4016
|
actionLoading
|
|
3327
4017
|
] }),
|
|
3328
|
-
actionError && /* @__PURE__ */
|
|
3329
|
-
transitionsLoading && /* @__PURE__ */
|
|
3330
|
-
/* @__PURE__ */
|
|
4018
|
+
actionError && /* @__PURE__ */ jsx11(Text10, { color: "red", children: actionError }),
|
|
4019
|
+
transitionsLoading && /* @__PURE__ */ jsxs9(Text10, { color: "yellow", children: [
|
|
4020
|
+
/* @__PURE__ */ jsx11(Spinner, { type: "dots" }),
|
|
3331
4021
|
" Loading transitions..."
|
|
3332
4022
|
] }),
|
|
3333
|
-
!actionLoading && !transitionsLoading && mode === "normal" && /* @__PURE__ */
|
|
4023
|
+
!actionLoading && !transitionsLoading && mode === "normal" && /* @__PURE__ */ jsx11(Text10, { dimColor: true, children: "Esc close \xB7 j/k scroll \xB7 s status \xB7 a assign \xB7 A unassign \xB7 o open \xB7 y copy" })
|
|
3334
4024
|
] })
|
|
3335
4025
|
] });
|
|
3336
4026
|
}
|
|
3337
4027
|
function CommentBlock({ comment }) {
|
|
3338
4028
|
const bodyMd = adfToMarkdown(comment.body);
|
|
3339
|
-
return /* @__PURE__ */
|
|
3340
|
-
/* @__PURE__ */
|
|
3341
|
-
/* @__PURE__ */
|
|
3342
|
-
/* @__PURE__ */
|
|
4029
|
+
return /* @__PURE__ */ jsxs9(Box9, { marginTop: 1, flexDirection: "column", children: [
|
|
4030
|
+
/* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
4031
|
+
/* @__PURE__ */ jsx11(Text10, { bold: true, children: comment.author.displayName }),
|
|
4032
|
+
/* @__PURE__ */ jsx11(Text10, { dimColor: true, children: timeAgo(comment.created) })
|
|
3343
4033
|
] }),
|
|
3344
|
-
bodyMd ? /* @__PURE__ */
|
|
4034
|
+
bodyMd ? /* @__PURE__ */ jsx11(Markdown, { children: bodyMd }) : /* @__PURE__ */ jsx11(Text10, { dimColor: true, italic: true, children: "Empty comment" })
|
|
3345
4035
|
] });
|
|
3346
4036
|
}
|
|
3347
4037
|
function getStatusColor(status) {
|
|
@@ -3352,7 +4042,7 @@ function getStatusColor(status) {
|
|
|
3352
4042
|
}
|
|
3353
4043
|
|
|
3354
4044
|
// src/components/jira-browser/JiraSavedViewBrowserBox.tsx
|
|
3355
|
-
import { Fragment as
|
|
4045
|
+
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3356
4046
|
function groupBySprint(issues) {
|
|
3357
4047
|
const groups = /* @__PURE__ */ new Map();
|
|
3358
4048
|
for (const issue of issues) {
|
|
@@ -3396,42 +4086,31 @@ function JiraSavedViewBrowserBox({
|
|
|
3396
4086
|
auth,
|
|
3397
4087
|
myAccountId,
|
|
3398
4088
|
myDisplayName,
|
|
4089
|
+
onFetchCurrentUser,
|
|
3399
4090
|
isActive,
|
|
3400
4091
|
onInputModeChange,
|
|
3401
4092
|
onLogUpdated
|
|
3402
4093
|
}) {
|
|
3403
|
-
const [issues, setIssues] =
|
|
3404
|
-
const [loading, setLoading] =
|
|
3405
|
-
const [error, setError] =
|
|
3406
|
-
const [total, setTotal] =
|
|
3407
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
3408
|
-
const [inputText, setInputText] =
|
|
3409
|
-
const [searchText, setSearchText] =
|
|
3410
|
-
const [isFiltering, setIsFiltering] =
|
|
3411
|
-
const [assigneeFilter, setAssigneeFilter] =
|
|
3412
|
-
const [detailIssue, setDetailIssue] =
|
|
3413
|
-
|
|
4094
|
+
const [issues, setIssues] = useState15([]);
|
|
4095
|
+
const [loading, setLoading] = useState15(false);
|
|
4096
|
+
const [error, setError] = useState15(null);
|
|
4097
|
+
const [total, setTotal] = useState15(0);
|
|
4098
|
+
const [highlightedIndex, setHighlightedIndex] = useState15(0);
|
|
4099
|
+
const [inputText, setInputText] = useState15("");
|
|
4100
|
+
const [searchText, setSearchText] = useState15("");
|
|
4101
|
+
const [isFiltering, setIsFiltering] = useState15(false);
|
|
4102
|
+
const [assigneeFilter, setAssigneeFilter] = useState15("all");
|
|
4103
|
+
const [detailIssue, setDetailIssue] = useState15(null);
|
|
4104
|
+
useEffect11(() => {
|
|
3414
4105
|
onInputModeChange == null ? void 0 : onInputModeChange(isFiltering || detailIssue !== null);
|
|
3415
4106
|
}, [isFiltering, detailIssue, onInputModeChange]);
|
|
3416
4107
|
const title = "[6] Issues";
|
|
3417
4108
|
const borderColor = isActive ? "yellow" : void 0;
|
|
3418
4109
|
const displayTitle = view ? `${title} - ${view.name}` : title;
|
|
3419
|
-
const filteredIssues = useMemo2(() => {
|
|
3420
|
-
if (assigneeFilter === "unassigned") {
|
|
3421
|
-
return issues.filter((issue) => !issue.fields.assignee);
|
|
3422
|
-
}
|
|
3423
|
-
if (assigneeFilter === "me" && myAccountId) {
|
|
3424
|
-
return issues.filter((issue) => {
|
|
3425
|
-
var _a;
|
|
3426
|
-
return ((_a = issue.fields.assignee) == null ? void 0 : _a.accountId) === myAccountId;
|
|
3427
|
-
});
|
|
3428
|
-
}
|
|
3429
|
-
return issues;
|
|
3430
|
-
}, [issues, assigneeFilter, myAccountId]);
|
|
3431
4110
|
const rows = useMemo2(() => {
|
|
3432
|
-
const groups = groupBySprint(
|
|
4111
|
+
const groups = groupBySprint(issues);
|
|
3433
4112
|
return buildRows(groups);
|
|
3434
|
-
}, [
|
|
4113
|
+
}, [issues]);
|
|
3435
4114
|
const navigableIndices = useMemo2(
|
|
3436
4115
|
() => rows.map((r, i) => r.type === "issue" ? i : -1).filter((i) => i >= 0),
|
|
3437
4116
|
[rows]
|
|
@@ -3446,14 +4125,19 @@ function JiraSavedViewBrowserBox({
|
|
|
3446
4125
|
}, [rows, navigableIndices, highlightedIndex]);
|
|
3447
4126
|
const hasMore = issues.length < total;
|
|
3448
4127
|
const doFetch = useCallback9(
|
|
3449
|
-
async (search, startAt = 0, append = false) => {
|
|
4128
|
+
async (search, filter, startAt = 0, append = false) => {
|
|
3450
4129
|
if (!view || !auth) return;
|
|
3451
4130
|
setLoading(true);
|
|
3452
4131
|
setError(null);
|
|
4132
|
+
if (!append) {
|
|
4133
|
+
setIssues([]);
|
|
4134
|
+
setTotal(0);
|
|
4135
|
+
}
|
|
3453
4136
|
const result = await fetchViewIssues(auth, view, {
|
|
3454
4137
|
startAt,
|
|
3455
4138
|
maxResults: 50,
|
|
3456
|
-
searchText: search || void 0
|
|
4139
|
+
searchText: search || void 0,
|
|
4140
|
+
assigneeFilter: filter === "all" ? void 0 : filter
|
|
3457
4141
|
});
|
|
3458
4142
|
if (result.success) {
|
|
3459
4143
|
setIssues((prev) => append ? [...prev, ...result.data.issues] : result.data.issues);
|
|
@@ -3470,11 +4154,12 @@ function JiraSavedViewBrowserBox({
|
|
|
3470
4154
|
},
|
|
3471
4155
|
[view, auth]
|
|
3472
4156
|
);
|
|
3473
|
-
|
|
4157
|
+
useEffect11(() => {
|
|
3474
4158
|
if (view && auth) {
|
|
3475
4159
|
setSearchText("");
|
|
3476
4160
|
setInputText("");
|
|
3477
|
-
|
|
4161
|
+
setAssigneeFilter("all");
|
|
4162
|
+
doFetch("", "all");
|
|
3478
4163
|
} else {
|
|
3479
4164
|
setIssues([]);
|
|
3480
4165
|
setTotal(0);
|
|
@@ -3518,7 +4203,7 @@ function JiraSavedViewBrowserBox({
|
|
|
3518
4203
|
const newSearch = inputText.trim();
|
|
3519
4204
|
if (newSearch !== searchText) {
|
|
3520
4205
|
setSearchText(newSearch);
|
|
3521
|
-
doFetch(newSearch);
|
|
4206
|
+
doFetch(newSearch, assigneeFilter);
|
|
3522
4207
|
}
|
|
3523
4208
|
return;
|
|
3524
4209
|
}
|
|
@@ -3561,31 +4246,33 @@ function JiraSavedViewBrowserBox({
|
|
|
3561
4246
|
return;
|
|
3562
4247
|
}
|
|
3563
4248
|
if (input === "u") {
|
|
3564
|
-
|
|
4249
|
+
const newFilter = assigneeFilter === "unassigned" ? "all" : "unassigned";
|
|
4250
|
+
setAssigneeFilter(newFilter);
|
|
4251
|
+
doFetch(searchText, newFilter);
|
|
3565
4252
|
setHighlightedIndex(0);
|
|
3566
4253
|
return;
|
|
3567
4254
|
}
|
|
3568
4255
|
if (input === "m") {
|
|
3569
|
-
|
|
4256
|
+
const newFilter = assigneeFilter === "me" ? "all" : "me";
|
|
4257
|
+
setAssigneeFilter(newFilter);
|
|
4258
|
+
doFetch(searchText, newFilter);
|
|
3570
4259
|
setHighlightedIndex(0);
|
|
3571
4260
|
return;
|
|
3572
4261
|
}
|
|
3573
4262
|
if (input === "x") {
|
|
3574
4263
|
setAssigneeFilter("all");
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
doFetch("");
|
|
3579
|
-
}
|
|
4264
|
+
setSearchText("");
|
|
4265
|
+
setInputText("");
|
|
4266
|
+
doFetch("", "all");
|
|
3580
4267
|
setHighlightedIndex(0);
|
|
3581
4268
|
return;
|
|
3582
4269
|
}
|
|
3583
4270
|
if (input === "l" && hasMore) {
|
|
3584
|
-
doFetch(searchText, issues.length, true);
|
|
4271
|
+
doFetch(searchText, assigneeFilter, issues.length, true);
|
|
3585
4272
|
return;
|
|
3586
4273
|
}
|
|
3587
4274
|
if (input === "r") {
|
|
3588
|
-
doFetch(searchText);
|
|
4275
|
+
doFetch(searchText, assigneeFilter);
|
|
3589
4276
|
}
|
|
3590
4277
|
},
|
|
3591
4278
|
{ isActive }
|
|
@@ -3594,7 +4281,7 @@ function JiraSavedViewBrowserBox({
|
|
|
3594
4281
|
if (assigneeFilter === "unassigned") filterParts.push("unassigned");
|
|
3595
4282
|
if (assigneeFilter === "me") filterParts.push("mine");
|
|
3596
4283
|
if (searchText) filterParts.push(`"${searchText}"`);
|
|
3597
|
-
return /* @__PURE__ */
|
|
4284
|
+
return /* @__PURE__ */ jsx12(TitledBox4, { borderStyle: "round", titles: [displayTitle], borderColor, flexGrow: 1, children: /* @__PURE__ */ jsx12(Box10, { flexDirection: "column", flexGrow: 1, children: detailIssue && auth ? /* @__PURE__ */ jsx12(
|
|
3598
4285
|
JiraIssueDetailView,
|
|
3599
4286
|
{
|
|
3600
4287
|
issueKey: detailIssue.key,
|
|
@@ -3602,61 +4289,61 @@ function JiraSavedViewBrowserBox({
|
|
|
3602
4289
|
auth,
|
|
3603
4290
|
myAccountId,
|
|
3604
4291
|
myDisplayName,
|
|
4292
|
+
onFetchCurrentUser,
|
|
3605
4293
|
isActive,
|
|
3606
4294
|
onClose: () => setDetailIssue(null),
|
|
3607
4295
|
onIssueUpdated: handleIssueUpdated,
|
|
3608
4296
|
onLogUpdated
|
|
3609
4297
|
}
|
|
3610
|
-
) : /* @__PURE__ */
|
|
3611
|
-
(isFiltering || hasActiveFilters) && /* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3613
|
-
isFiltering ? /* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3616
|
-
] }) : /* @__PURE__ */
|
|
3617
|
-
/* @__PURE__ */
|
|
3618
|
-
/* @__PURE__ */
|
|
4298
|
+
) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
4299
|
+
(isFiltering || hasActiveFilters) && /* @__PURE__ */ jsxs10(Box10, { paddingX: 1, children: [
|
|
4300
|
+
/* @__PURE__ */ jsx12(Text11, { color: "blue", children: "Search: " }),
|
|
4301
|
+
isFiltering ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
4302
|
+
/* @__PURE__ */ jsx12(Text11, { children: inputText }),
|
|
4303
|
+
/* @__PURE__ */ jsx12(Text11, { backgroundColor: "yellow", children: " " })
|
|
4304
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
4305
|
+
/* @__PURE__ */ jsx12(Text11, { children: filterParts.join(" + ") }),
|
|
4306
|
+
/* @__PURE__ */ jsxs10(Text11, { dimColor: true, children: [
|
|
3619
4307
|
" ",
|
|
3620
4308
|
"(",
|
|
3621
|
-
|
|
4309
|
+
issues.length,
|
|
3622
4310
|
"/",
|
|
3623
4311
|
total,
|
|
3624
4312
|
")"
|
|
3625
4313
|
] })
|
|
3626
4314
|
] })
|
|
3627
4315
|
] }),
|
|
3628
|
-
/* @__PURE__ */
|
|
3629
|
-
!view && /* @__PURE__ */
|
|
3630
|
-
view && loading && issues.length === 0 && /* @__PURE__ */
|
|
3631
|
-
/* @__PURE__ */
|
|
4316
|
+
/* @__PURE__ */ jsxs10(Box10, { flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
4317
|
+
!view && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Select a view to browse issues" }) }),
|
|
4318
|
+
view && loading && issues.length === 0 && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsxs10(Text11, { color: "yellow", children: [
|
|
4319
|
+
/* @__PURE__ */ jsx12(Spinner2, { type: "dots" }),
|
|
3632
4320
|
" Loading issues..."
|
|
3633
4321
|
] }) }),
|
|
3634
|
-
view && error && /* @__PURE__ */
|
|
3635
|
-
view && !loading && !error && issues.length === 0 && /* @__PURE__ */
|
|
3636
|
-
|
|
3637
|
-
rows.length > 0 && /* @__PURE__ */ jsx10(ScrollView6, { ref: scrollRef, children: rows.map((row, rowIdx) => {
|
|
4322
|
+
view && error && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsx12(Text11, { color: "red", children: error }) }),
|
|
4323
|
+
view && !loading && !error && issues.length === 0 && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: hasActiveFilters ? "No issues match filter" : "No issues found" }) }),
|
|
4324
|
+
rows.length > 0 && /* @__PURE__ */ jsx12(ScrollView6, { ref: scrollRef, children: rows.map((row, rowIdx) => {
|
|
3638
4325
|
if (row.type === "header") {
|
|
3639
4326
|
const stateLabel = row.state === "active" ? " (active)" : "";
|
|
3640
|
-
return /* @__PURE__ */
|
|
4327
|
+
return /* @__PURE__ */ jsx12(Box10, { paddingX: 1, marginTop: rowIdx > 0 ? 1 : 0, children: /* @__PURE__ */ jsxs10(Text11, { bold: true, color: "magenta", children: [
|
|
3641
4328
|
row.label,
|
|
3642
|
-
stateLabel && /* @__PURE__ */
|
|
4329
|
+
stateLabel && /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: stateLabel })
|
|
3643
4330
|
] }) }, `header-${row.label}`);
|
|
3644
4331
|
}
|
|
3645
4332
|
const navIdx = navigableIndices.indexOf(rowIdx);
|
|
3646
4333
|
const isHighlighted = navIdx === highlightedIndex;
|
|
3647
4334
|
const cursor = isHighlighted ? ">" : " ";
|
|
3648
4335
|
const statusColor = getStatusColor2(row.issue.fields.status.name);
|
|
3649
|
-
return /* @__PURE__ */
|
|
3650
|
-
/* @__PURE__ */
|
|
4336
|
+
return /* @__PURE__ */ jsxs10(Box10, { paddingX: 1, children: [
|
|
4337
|
+
/* @__PURE__ */ jsxs10(Text11, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
3651
4338
|
cursor,
|
|
3652
4339
|
" "
|
|
3653
4340
|
] }),
|
|
3654
|
-
/* @__PURE__ */
|
|
3655
|
-
/* @__PURE__ */
|
|
4341
|
+
/* @__PURE__ */ jsx12(Text11, { bold: true, color: "blue", children: row.issue.key }),
|
|
4342
|
+
/* @__PURE__ */ jsxs10(Text11, { children: [
|
|
3656
4343
|
" ",
|
|
3657
4344
|
row.issue.fields.summary
|
|
3658
4345
|
] }),
|
|
3659
|
-
/* @__PURE__ */
|
|
4346
|
+
/* @__PURE__ */ jsxs10(Text11, { color: statusColor, children: [
|
|
3660
4347
|
" [",
|
|
3661
4348
|
row.issue.fields.status.name,
|
|
3662
4349
|
"]"
|
|
@@ -3664,14 +4351,14 @@ function JiraSavedViewBrowserBox({
|
|
|
3664
4351
|
] }, row.issue.key);
|
|
3665
4352
|
}) })
|
|
3666
4353
|
] }),
|
|
3667
|
-
view && !loading && issues.length > 0 && /* @__PURE__ */
|
|
4354
|
+
view && !loading && issues.length > 0 && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsxs10(Text11, { dimColor: true, children: [
|
|
3668
4355
|
issues.length,
|
|
3669
4356
|
" of ",
|
|
3670
4357
|
total,
|
|
3671
4358
|
" loaded",
|
|
3672
4359
|
hasMore && " \xB7 l to load more"
|
|
3673
4360
|
] }) }),
|
|
3674
|
-
view && loading && issues.length > 0 && /* @__PURE__ */
|
|
4361
|
+
view && loading && issues.length > 0 && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Loading more..." }) })
|
|
3675
4362
|
] }) }) });
|
|
3676
4363
|
}
|
|
3677
4364
|
function getStatusColor2(status) {
|
|
@@ -3682,11 +4369,11 @@ function getStatusColor2(status) {
|
|
|
3682
4369
|
}
|
|
3683
4370
|
|
|
3684
4371
|
// src/components/jira-browser/JiraSavedViewsBox.tsx
|
|
3685
|
-
import { useEffect as
|
|
4372
|
+
import { useEffect as useEffect12, useState as useState16 } from "react";
|
|
3686
4373
|
import { TitledBox as TitledBox5 } from "@mishieck/ink-titled-box";
|
|
3687
|
-
import { Box as Box11, Text as
|
|
4374
|
+
import { Box as Box11, Text as Text12, useInput as useInput9 } from "ink";
|
|
3688
4375
|
import { ScrollView as ScrollView7 } from "ink-scroll-view";
|
|
3689
|
-
import { Fragment as
|
|
4376
|
+
import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3690
4377
|
function JiraSavedViewsBox({
|
|
3691
4378
|
views,
|
|
3692
4379
|
selectedViewId,
|
|
@@ -3700,9 +4387,9 @@ function JiraSavedViewsBox({
|
|
|
3700
4387
|
onInputModeChange
|
|
3701
4388
|
}) {
|
|
3702
4389
|
const scrollRef = useScrollToIndex(highlightedIndex);
|
|
3703
|
-
const [renaming, setRenaming] =
|
|
3704
|
-
const [renameValue, setRenameValue] =
|
|
3705
|
-
|
|
4390
|
+
const [renaming, setRenaming] = useState16(null);
|
|
4391
|
+
const [renameValue, setRenameValue] = useState16("");
|
|
4392
|
+
useEffect12(() => {
|
|
3706
4393
|
onInputModeChange == null ? void 0 : onInputModeChange(renaming !== null);
|
|
3707
4394
|
}, [renaming, onInputModeChange]);
|
|
3708
4395
|
const title = "[5] Views";
|
|
@@ -3755,23 +4442,23 @@ function JiraSavedViewsBox({
|
|
|
3755
4442
|
},
|
|
3756
4443
|
{ isActive }
|
|
3757
4444
|
);
|
|
3758
|
-
return /* @__PURE__ */
|
|
3759
|
-
views.length === 0 && /* @__PURE__ */
|
|
3760
|
-
views.length > 0 && /* @__PURE__ */
|
|
4445
|
+
return /* @__PURE__ */ jsx13(TitledBox5, { borderStyle: "round", titles: [title], borderColor, height: 5, children: /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
4446
|
+
views.length === 0 && /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: "No saved views" }),
|
|
4447
|
+
views.length > 0 && /* @__PURE__ */ jsx13(ScrollView7, { ref: scrollRef, children: views.map((view, idx) => {
|
|
3761
4448
|
const isHighlighted = isActive && idx === highlightedIndex;
|
|
3762
4449
|
const isSelected = view.id === selectedViewId;
|
|
3763
4450
|
const isRenaming = view.id === renaming;
|
|
3764
4451
|
const cursor = isHighlighted ? ">" : " ";
|
|
3765
4452
|
const nameColor = isSelected ? "green" : void 0;
|
|
3766
4453
|
const indicator = isSelected ? " *" : "";
|
|
3767
|
-
return /* @__PURE__ */
|
|
3768
|
-
/* @__PURE__ */
|
|
4454
|
+
return /* @__PURE__ */ jsxs11(Box11, { children: [
|
|
4455
|
+
/* @__PURE__ */ jsxs11(Text12, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
3769
4456
|
cursor,
|
|
3770
4457
|
" "
|
|
3771
4458
|
] }),
|
|
3772
|
-
isRenaming ? /* @__PURE__ */
|
|
3773
|
-
/* @__PURE__ */
|
|
3774
|
-
/* @__PURE__ */
|
|
4459
|
+
isRenaming ? /* @__PURE__ */ jsx13(TextInput, { value: renameValue, onChange: setRenameValue, isActive: true }) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
4460
|
+
/* @__PURE__ */ jsx13(Text12, { color: nameColor, children: view.name }),
|
|
4461
|
+
/* @__PURE__ */ jsx13(Text12, { dimColor: true, children: indicator })
|
|
3775
4462
|
] })
|
|
3776
4463
|
] }, view.id);
|
|
3777
4464
|
}) })
|
|
@@ -3779,7 +4466,7 @@ function JiraSavedViewsBox({
|
|
|
3779
4466
|
}
|
|
3780
4467
|
|
|
3781
4468
|
// src/components/jira-browser/JiraBrowserView.tsx
|
|
3782
|
-
import { jsx as
|
|
4469
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3783
4470
|
function JiraBrowserView({
|
|
3784
4471
|
isActive,
|
|
3785
4472
|
focusedBox,
|
|
@@ -3789,15 +4476,16 @@ function JiraBrowserView({
|
|
|
3789
4476
|
}) {
|
|
3790
4477
|
const repo = useGitRepo();
|
|
3791
4478
|
const modal = useModal();
|
|
3792
|
-
const [views, setViews] =
|
|
3793
|
-
const [selectedViewId, setSelectedViewId] =
|
|
3794
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
3795
|
-
const [addError, setAddError] =
|
|
3796
|
-
const [addLoading, setAddLoading] =
|
|
3797
|
-
const [myAccountId, setMyAccountId] =
|
|
3798
|
-
const [myDisplayName, setMyDisplayName] =
|
|
3799
|
-
const [inputModeActive, setInputModeActive] =
|
|
4479
|
+
const [views, setViews] = useState17([]);
|
|
4480
|
+
const [selectedViewId, setSelectedViewId] = useState17(null);
|
|
4481
|
+
const [highlightedIndex, setHighlightedIndex] = useState17(0);
|
|
4482
|
+
const [addError, setAddError] = useState17(void 0);
|
|
4483
|
+
const [addLoading, setAddLoading] = useState17(false);
|
|
4484
|
+
const [myAccountId, setMyAccountId] = useState17(null);
|
|
4485
|
+
const [myDisplayName, setMyDisplayName] = useState17(null);
|
|
4486
|
+
const [inputModeActive, setInputModeActive] = useState17(false);
|
|
3800
4487
|
const lastRepoRef = useRef7(null);
|
|
4488
|
+
const fetchingUserRef = useRef7(false);
|
|
3801
4489
|
const auth = useMemo3(() => {
|
|
3802
4490
|
if (!repo.repoPath || !isJiraConfigured(repo.repoPath)) return null;
|
|
3803
4491
|
const siteUrl = getJiraSiteUrl(repo.repoPath);
|
|
@@ -3806,7 +4494,7 @@ function JiraBrowserView({
|
|
|
3806
4494
|
return { siteUrl, email: creds.email, apiToken: creds.apiToken };
|
|
3807
4495
|
}, [repo.repoPath]);
|
|
3808
4496
|
const selectedView = useMemo3(() => views.find((v) => v.id === selectedViewId) ?? null, [views, selectedViewId]);
|
|
3809
|
-
|
|
4497
|
+
useEffect13(() => {
|
|
3810
4498
|
if (!repo.repoPath || repo.repoPath === lastRepoRef.current) return;
|
|
3811
4499
|
lastRepoRef.current = repo.repoPath;
|
|
3812
4500
|
const loaded = getSavedViews(repo.repoPath);
|
|
@@ -3815,22 +4503,25 @@ function JiraBrowserView({
|
|
|
3815
4503
|
setSelectedViewId(loaded[0].id);
|
|
3816
4504
|
}
|
|
3817
4505
|
}, [repo.repoPath]);
|
|
3818
|
-
|
|
3819
|
-
if (
|
|
3820
|
-
|
|
3821
|
-
return;
|
|
4506
|
+
const fetchCurrentUser = useCallback10(async () => {
|
|
4507
|
+
if (myAccountId && myDisplayName) {
|
|
4508
|
+
return { accountId: myAccountId, displayName: myDisplayName };
|
|
3822
4509
|
}
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
4510
|
+
if (!auth || fetchingUserRef.current) return null;
|
|
4511
|
+
fetchingUserRef.current = true;
|
|
4512
|
+
const result = await getCurrentUser(auth);
|
|
4513
|
+
fetchingUserRef.current = false;
|
|
4514
|
+
if (result.success) {
|
|
4515
|
+
setMyAccountId(result.data.accountId);
|
|
4516
|
+
setMyDisplayName(result.data.displayName);
|
|
4517
|
+
return { accountId: result.data.accountId, displayName: result.data.displayName };
|
|
4518
|
+
}
|
|
4519
|
+
return null;
|
|
4520
|
+
}, [auth, myAccountId, myDisplayName]);
|
|
4521
|
+
useEffect13(() => {
|
|
3831
4522
|
onModalChange == null ? void 0 : onModalChange(modal.isOpen || inputModeActive);
|
|
3832
4523
|
}, [modal.isOpen, inputModeActive, onModalChange]);
|
|
3833
|
-
|
|
4524
|
+
useEffect13(() => {
|
|
3834
4525
|
if (!isActive) modal.close();
|
|
3835
4526
|
}, [isActive, modal.close]);
|
|
3836
4527
|
const refreshViews = useCallback10(() => {
|
|
@@ -3889,10 +4580,10 @@ function JiraBrowserView({
|
|
|
3889
4580
|
if (input === "5") onFocusedBoxChange("saved-views");
|
|
3890
4581
|
if (input === "6") onFocusedBoxChange("browser");
|
|
3891
4582
|
},
|
|
3892
|
-
{ isActive: isActive && !modal.isOpen }
|
|
4583
|
+
{ isActive: isActive && !modal.isOpen && !inputModeActive }
|
|
3893
4584
|
);
|
|
3894
4585
|
if (modal.type === "add") {
|
|
3895
|
-
return /* @__PURE__ */
|
|
4586
|
+
return /* @__PURE__ */ jsx14(Box12, { flexDirection: "column", flexGrow: 1, children: /* @__PURE__ */ jsx14(
|
|
3896
4587
|
AddViewModal,
|
|
3897
4588
|
{
|
|
3898
4589
|
onSubmit: handleAddView,
|
|
@@ -3905,8 +4596,8 @@ function JiraBrowserView({
|
|
|
3905
4596
|
}
|
|
3906
4597
|
) });
|
|
3907
4598
|
}
|
|
3908
|
-
return /* @__PURE__ */
|
|
3909
|
-
/* @__PURE__ */
|
|
4599
|
+
return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", flexGrow: 1, children: [
|
|
4600
|
+
/* @__PURE__ */ jsx14(
|
|
3910
4601
|
JiraSavedViewsBox,
|
|
3911
4602
|
{
|
|
3912
4603
|
views,
|
|
@@ -3921,13 +4612,14 @@ function JiraBrowserView({
|
|
|
3921
4612
|
onInputModeChange: setInputModeActive
|
|
3922
4613
|
}
|
|
3923
4614
|
),
|
|
3924
|
-
/* @__PURE__ */
|
|
4615
|
+
/* @__PURE__ */ jsx14(
|
|
3925
4616
|
JiraSavedViewBrowserBox,
|
|
3926
4617
|
{
|
|
3927
4618
|
view: selectedView,
|
|
3928
4619
|
auth,
|
|
3929
4620
|
myAccountId,
|
|
3930
4621
|
myDisplayName,
|
|
4622
|
+
onFetchCurrentUser: fetchCurrentUser,
|
|
3931
4623
|
isActive: isActive && focusedBox === "browser",
|
|
3932
4624
|
onInputModeChange: setInputModeActive,
|
|
3933
4625
|
onLogUpdated
|
|
@@ -3938,14 +4630,14 @@ function JiraBrowserView({
|
|
|
3938
4630
|
|
|
3939
4631
|
// src/components/jira/JiraView.tsx
|
|
3940
4632
|
import open5 from "open";
|
|
3941
|
-
import { useEffect as
|
|
4633
|
+
import { useEffect as useEffect15, useRef as useRef8 } from "react";
|
|
3942
4634
|
|
|
3943
4635
|
// src/components/jira/LinkTicketModal.tsx
|
|
3944
|
-
import { useState as
|
|
3945
|
-
import { Box as Box13, Text as
|
|
3946
|
-
import { jsx as
|
|
4636
|
+
import { useState as useState18 } from "react";
|
|
4637
|
+
import { Box as Box13, Text as Text13, useInput as useInput11 } from "ink";
|
|
4638
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3947
4639
|
function LinkTicketModal({ onSubmit, onCancel, loading, error }) {
|
|
3948
|
-
const [ticketInput, setTicketInput] =
|
|
4640
|
+
const [ticketInput, setTicketInput] = useState18("");
|
|
3949
4641
|
const canSubmit = ticketInput.trim().length > 0;
|
|
3950
4642
|
useInput11(
|
|
3951
4643
|
(_input, key) => {
|
|
@@ -3960,35 +4652,35 @@ function LinkTicketModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3960
4652
|
},
|
|
3961
4653
|
{ isActive: !loading }
|
|
3962
4654
|
);
|
|
3963
|
-
return /* @__PURE__ */
|
|
3964
|
-
/* @__PURE__ */
|
|
3965
|
-
/* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
3967
|
-
error && /* @__PURE__ */
|
|
3968
|
-
/* @__PURE__ */
|
|
3969
|
-
/* @__PURE__ */
|
|
3970
|
-
/* @__PURE__ */
|
|
4655
|
+
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1, children: [
|
|
4656
|
+
/* @__PURE__ */ jsx15(Text13, { bold: true, color: "yellow", children: "Link Jira Ticket" }),
|
|
4657
|
+
/* @__PURE__ */ jsx15(Text13, { dimColor: true, children: "Type ticket ID, Enter to submit, Esc to cancel" }),
|
|
4658
|
+
/* @__PURE__ */ jsx15(Box13, { marginTop: 1 }),
|
|
4659
|
+
error && /* @__PURE__ */ jsx15(Box13, { marginBottom: 1, children: /* @__PURE__ */ jsx15(Text13, { color: "red", children: error }) }),
|
|
4660
|
+
/* @__PURE__ */ jsxs13(Box13, { children: [
|
|
4661
|
+
/* @__PURE__ */ jsx15(Text13, { color: "blue", children: "Ticket: " }),
|
|
4662
|
+
/* @__PURE__ */ jsx15(TextInput, { value: ticketInput, onChange: setTicketInput, placeholder: "PROJ-123", isActive: !loading })
|
|
3971
4663
|
] }),
|
|
3972
|
-
loading && /* @__PURE__ */
|
|
3973
|
-
/* @__PURE__ */
|
|
4664
|
+
loading && /* @__PURE__ */ jsx15(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text13, { color: "yellow", children: "Fetching ticket..." }) }),
|
|
4665
|
+
/* @__PURE__ */ jsx15(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text13, { dimColor: true, children: "Examples: PROJ-123 or https://company.atlassian.net/browse/PROJ-123" }) })
|
|
3974
4666
|
] });
|
|
3975
4667
|
}
|
|
3976
4668
|
|
|
3977
4669
|
// src/components/jira/JiraView.tsx
|
|
3978
4670
|
import { TitledBox as TitledBox6 } from "@mishieck/ink-titled-box";
|
|
3979
|
-
import { Box as Box17, Text as
|
|
4671
|
+
import { Box as Box17, Text as Text17, useInput as useInput14 } from "ink";
|
|
3980
4672
|
|
|
3981
4673
|
// src/components/jira/ChangeStatusModal.tsx
|
|
3982
|
-
import { useEffect as
|
|
3983
|
-
import { Box as Box14, Text as
|
|
4674
|
+
import { useEffect as useEffect14, useState as useState19 } from "react";
|
|
4675
|
+
import { Box as Box14, Text as Text14, useInput as useInput12 } from "ink";
|
|
3984
4676
|
import SelectInput2 from "ink-select-input";
|
|
3985
|
-
import { jsx as
|
|
4677
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3986
4678
|
function ChangeStatusModal({ repoPath, ticketKey, currentStatus, onComplete, onCancel }) {
|
|
3987
|
-
const [transitions, setTransitions] =
|
|
3988
|
-
const [loading, setLoading] =
|
|
3989
|
-
const [applying, setApplying] =
|
|
3990
|
-
const [error, setError] =
|
|
3991
|
-
|
|
4679
|
+
const [transitions, setTransitions] = useState19([]);
|
|
4680
|
+
const [loading, setLoading] = useState19(true);
|
|
4681
|
+
const [applying, setApplying] = useState19(false);
|
|
4682
|
+
const [error, setError] = useState19(null);
|
|
4683
|
+
useEffect14(() => {
|
|
3992
4684
|
const fetchTransitions = async () => {
|
|
3993
4685
|
const siteUrl = getJiraSiteUrl(repoPath);
|
|
3994
4686
|
const creds = getJiraCredentials(repoPath);
|
|
@@ -4050,23 +4742,23 @@ function ChangeStatusModal({ repoPath, ticketKey, currentStatus, onComplete, onC
|
|
|
4050
4742
|
0,
|
|
4051
4743
|
transitions.findIndex((t) => t.to.name === currentStatus)
|
|
4052
4744
|
);
|
|
4053
|
-
return /* @__PURE__ */
|
|
4054
|
-
/* @__PURE__ */
|
|
4745
|
+
return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1, children: [
|
|
4746
|
+
/* @__PURE__ */ jsxs14(Text14, { bold: true, color: "yellow", children: [
|
|
4055
4747
|
"Change Status: ",
|
|
4056
4748
|
ticketKey
|
|
4057
4749
|
] }),
|
|
4058
|
-
loading && /* @__PURE__ */
|
|
4059
|
-
error && /* @__PURE__ */
|
|
4060
|
-
!loading && !error && transitions.length === 0 && /* @__PURE__ */
|
|
4061
|
-
!loading && !error && transitions.length > 0 && !applying && /* @__PURE__ */
|
|
4062
|
-
applying && /* @__PURE__ */
|
|
4063
|
-
/* @__PURE__ */
|
|
4750
|
+
loading && /* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "Loading transitions..." }),
|
|
4751
|
+
error && /* @__PURE__ */ jsx16(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text14, { color: "red", children: error }) }),
|
|
4752
|
+
!loading && !error && transitions.length === 0 && /* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "No available transitions" }),
|
|
4753
|
+
!loading && !error && transitions.length > 0 && !applying && /* @__PURE__ */ jsx16(Box14, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx16(SelectInput2, { items, initialIndex, onSelect: handleSelect }) }),
|
|
4754
|
+
applying && /* @__PURE__ */ jsx16(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text14, { color: "yellow", children: "Updating status..." }) }),
|
|
4755
|
+
/* @__PURE__ */ jsx16(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "Esc to cancel" }) })
|
|
4064
4756
|
] });
|
|
4065
4757
|
}
|
|
4066
4758
|
|
|
4067
4759
|
// src/components/jira/ConfigureJiraSiteModal.tsx
|
|
4068
|
-
import { useState as
|
|
4069
|
-
import { Box as Box15, Text as
|
|
4760
|
+
import { useState as useState20 } from "react";
|
|
4761
|
+
import { Box as Box15, Text as Text15, useInput as useInput13 } from "ink";
|
|
4070
4762
|
import { ScrollView as ScrollView8 } from "ink-scroll-view";
|
|
4071
4763
|
|
|
4072
4764
|
// src/lib/editor.ts
|
|
@@ -4098,7 +4790,7 @@ function openInEditor(content, filename) {
|
|
|
4098
4790
|
}
|
|
4099
4791
|
|
|
4100
4792
|
// src/components/jira/ConfigureJiraSiteModal.tsx
|
|
4101
|
-
import { jsx as
|
|
4793
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4102
4794
|
var MAX_VISIBLE_ITEMS = 4;
|
|
4103
4795
|
function ConfigureJiraSiteModal({
|
|
4104
4796
|
initialSiteUrl,
|
|
@@ -4110,13 +4802,13 @@ function ConfigureJiraSiteModal({
|
|
|
4110
4802
|
error
|
|
4111
4803
|
}) {
|
|
4112
4804
|
const hasExisting = existingConfigs.length > 0;
|
|
4113
|
-
const [mode, setMode] =
|
|
4114
|
-
const [selectedExisting, setSelectedExisting] =
|
|
4805
|
+
const [mode, setMode] = useState20(hasExisting ? "choose" : "manual");
|
|
4806
|
+
const [selectedExisting, setSelectedExisting] = useState20(0);
|
|
4115
4807
|
const scrollRef = useScrollToIndex(selectedExisting);
|
|
4116
|
-
const [siteUrl, setSiteUrl] =
|
|
4117
|
-
const [email, setEmail] =
|
|
4118
|
-
const [apiToken, setApiToken] =
|
|
4119
|
-
const [selectedItem, setSelectedItem] =
|
|
4808
|
+
const [siteUrl, setSiteUrl] = useState20(initialSiteUrl ?? "");
|
|
4809
|
+
const [email, setEmail] = useState20(initialEmail ?? "");
|
|
4810
|
+
const [apiToken, setApiToken] = useState20("");
|
|
4811
|
+
const [selectedItem, setSelectedItem] = useState20("siteUrl");
|
|
4120
4812
|
const items = ["siteUrl", "email", "apiToken", "submit"];
|
|
4121
4813
|
const canSubmit = siteUrl.trim() && email.trim() && apiToken.trim();
|
|
4122
4814
|
const chooseItems = existingConfigs.length + 1;
|
|
@@ -4192,38 +4884,38 @@ function ConfigureJiraSiteModal({
|
|
|
4192
4884
|
const prefix = isSelected ? "> " : " ";
|
|
4193
4885
|
const color = isSelected ? "yellow" : void 0;
|
|
4194
4886
|
const displayValue = isSensitive && value ? "*".repeat(Math.min(value.length, 20)) : value;
|
|
4195
|
-
return /* @__PURE__ */
|
|
4196
|
-
/* @__PURE__ */
|
|
4887
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
4888
|
+
/* @__PURE__ */ jsxs15(Text15, { color, bold: isSelected, children: [
|
|
4197
4889
|
prefix,
|
|
4198
4890
|
label
|
|
4199
4891
|
] }),
|
|
4200
|
-
value !== void 0 && /* @__PURE__ */
|
|
4892
|
+
value !== void 0 && /* @__PURE__ */ jsx17(Box15, { marginLeft: 4, children: /* @__PURE__ */ jsx17(Text15, { dimColor: true, children: displayValue || "(empty - press Enter to edit)" }) })
|
|
4201
4893
|
] });
|
|
4202
4894
|
};
|
|
4203
4895
|
if (mode === "choose") {
|
|
4204
4896
|
const totalItems = existingConfigs.length + 1;
|
|
4205
4897
|
const listHeight = Math.min(totalItems * 2, MAX_VISIBLE_ITEMS * 2);
|
|
4206
|
-
return /* @__PURE__ */
|
|
4207
|
-
/* @__PURE__ */
|
|
4208
|
-
/* @__PURE__ */
|
|
4209
|
-
/* @__PURE__ */
|
|
4210
|
-
error && /* @__PURE__ */
|
|
4211
|
-
/* @__PURE__ */
|
|
4898
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, paddingY: 1, children: [
|
|
4899
|
+
/* @__PURE__ */ jsx17(Text15, { bold: true, color: "cyan", children: "Configure Jira Site" }),
|
|
4900
|
+
/* @__PURE__ */ jsx17(Text15, { dimColor: true, children: "Select an existing configuration or enter new credentials" }),
|
|
4901
|
+
/* @__PURE__ */ jsx17(Box15, { marginTop: 1 }),
|
|
4902
|
+
error && /* @__PURE__ */ jsx17(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx17(Text15, { color: "red", children: error }) }),
|
|
4903
|
+
/* @__PURE__ */ jsx17(Box15, { height: listHeight, overflow: "hidden", children: /* @__PURE__ */ jsxs15(ScrollView8, { ref: scrollRef, children: [
|
|
4212
4904
|
existingConfigs.map((config, idx) => {
|
|
4213
4905
|
const isSelected = selectedExisting === idx;
|
|
4214
|
-
return /* @__PURE__ */
|
|
4215
|
-
/* @__PURE__ */
|
|
4906
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
4907
|
+
/* @__PURE__ */ jsxs15(Text15, { color: isSelected ? "yellow" : void 0, bold: isSelected, children: [
|
|
4216
4908
|
isSelected ? "> " : " ",
|
|
4217
4909
|
config.siteUrl
|
|
4218
4910
|
] }),
|
|
4219
|
-
/* @__PURE__ */
|
|
4911
|
+
/* @__PURE__ */ jsxs15(Text15, { dimColor: true, children: [
|
|
4220
4912
|
" ",
|
|
4221
4913
|
config.email
|
|
4222
4914
|
] })
|
|
4223
4915
|
] }, config.siteUrl + config.email);
|
|
4224
4916
|
}),
|
|
4225
|
-
/* @__PURE__ */
|
|
4226
|
-
|
|
4917
|
+
/* @__PURE__ */ jsx17(Box15, { children: /* @__PURE__ */ jsxs15(
|
|
4918
|
+
Text15,
|
|
4227
4919
|
{
|
|
4228
4920
|
color: selectedExisting === existingConfigs.length ? "yellow" : void 0,
|
|
4229
4921
|
bold: selectedExisting === existingConfigs.length,
|
|
@@ -4234,44 +4926,44 @@ function ConfigureJiraSiteModal({
|
|
|
4234
4926
|
}
|
|
4235
4927
|
) })
|
|
4236
4928
|
] }) }),
|
|
4237
|
-
loading && /* @__PURE__ */
|
|
4929
|
+
loading && /* @__PURE__ */ jsx17(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text15, { color: "yellow", children: "Validating credentials..." }) })
|
|
4238
4930
|
] });
|
|
4239
4931
|
}
|
|
4240
|
-
return /* @__PURE__ */
|
|
4241
|
-
/* @__PURE__ */
|
|
4242
|
-
/* @__PURE__ */
|
|
4932
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, paddingY: 1, children: [
|
|
4933
|
+
/* @__PURE__ */ jsx17(Text15, { bold: true, color: "cyan", children: "Configure Jira Site" }),
|
|
4934
|
+
/* @__PURE__ */ jsxs15(Text15, { dimColor: true, children: [
|
|
4243
4935
|
"Up/Down to select, Enter to edit, Esc to ",
|
|
4244
4936
|
hasExisting ? "go back" : "cancel"
|
|
4245
4937
|
] }),
|
|
4246
|
-
/* @__PURE__ */
|
|
4247
|
-
error && /* @__PURE__ */
|
|
4938
|
+
/* @__PURE__ */ jsx17(Box15, { marginTop: 1 }),
|
|
4939
|
+
error && /* @__PURE__ */ jsx17(Box15, { marginBottom: 1, children: /* @__PURE__ */ jsx17(Text15, { color: "red", children: error }) }),
|
|
4248
4940
|
renderItem("siteUrl", "Site URL (e.g., https://company.atlassian.net)", siteUrl),
|
|
4249
|
-
/* @__PURE__ */
|
|
4941
|
+
/* @__PURE__ */ jsx17(Box15, { marginTop: 1 }),
|
|
4250
4942
|
renderItem("email", "Email", email),
|
|
4251
|
-
/* @__PURE__ */
|
|
4943
|
+
/* @__PURE__ */ jsx17(Box15, { marginTop: 1 }),
|
|
4252
4944
|
renderItem("apiToken", "API Token", apiToken, true),
|
|
4253
|
-
/* @__PURE__ */
|
|
4254
|
-
/* @__PURE__ */
|
|
4945
|
+
/* @__PURE__ */ jsx17(Box15, { marginTop: 1 }),
|
|
4946
|
+
/* @__PURE__ */ jsx17(Box15, { children: /* @__PURE__ */ jsxs15(Text15, { color: selectedItem === "submit" ? "green" : void 0, bold: selectedItem === "submit", children: [
|
|
4255
4947
|
selectedItem === "submit" ? "> " : " ",
|
|
4256
4948
|
canSubmit ? "[Save Configuration]" : "[Fill all fields first]"
|
|
4257
4949
|
] }) }),
|
|
4258
|
-
loading && /* @__PURE__ */
|
|
4259
|
-
/* @__PURE__ */
|
|
4950
|
+
loading && /* @__PURE__ */ jsx17(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text15, { color: "yellow", children: "Validating credentials..." }) }),
|
|
4951
|
+
/* @__PURE__ */ jsx17(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text15, { dimColor: true, children: "Get your API token from: https://id.atlassian.com/manage-profile/security/api-tokens" }) })
|
|
4260
4952
|
] });
|
|
4261
4953
|
}
|
|
4262
4954
|
|
|
4263
4955
|
// src/components/jira/TicketItem.tsx
|
|
4264
|
-
import { Box as Box16, Text as
|
|
4265
|
-
import { jsx as
|
|
4956
|
+
import { Box as Box16, Text as Text16 } from "ink";
|
|
4957
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4266
4958
|
function TicketItem({ ticketKey, summary, status, isHighlighted, isSelected }) {
|
|
4267
4959
|
const prefix = isHighlighted ? "> " : isSelected ? "\u25CF " : " ";
|
|
4268
4960
|
const textColor = isSelected ? "green" : void 0;
|
|
4269
|
-
return /* @__PURE__ */
|
|
4961
|
+
return /* @__PURE__ */ jsx18(Box16, { children: /* @__PURE__ */ jsxs16(Text16, { color: textColor, children: [
|
|
4270
4962
|
prefix,
|
|
4271
|
-
/* @__PURE__ */
|
|
4963
|
+
/* @__PURE__ */ jsx18(Text16, { bold: true, color: "blue", children: ticketKey }),
|
|
4272
4964
|
" ",
|
|
4273
4965
|
summary,
|
|
4274
|
-
status && /* @__PURE__ */
|
|
4966
|
+
status && /* @__PURE__ */ jsxs16(Text16, { dimColor: true, children: [
|
|
4275
4967
|
" [",
|
|
4276
4968
|
status,
|
|
4277
4969
|
"]"
|
|
@@ -4280,7 +4972,7 @@ function TicketItem({ ticketKey, summary, status, isHighlighted, isSelected }) {
|
|
|
4280
4972
|
}
|
|
4281
4973
|
|
|
4282
4974
|
// src/components/jira/JiraView.tsx
|
|
4283
|
-
import { jsx as
|
|
4975
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4284
4976
|
function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated }) {
|
|
4285
4977
|
const repo = useGitRepo();
|
|
4286
4978
|
const jira = useJiraTickets();
|
|
@@ -4288,7 +4980,7 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
4288
4980
|
const nav = useListNavigation({ items: jira.tickets });
|
|
4289
4981
|
const currentTicket = jira.tickets[nav.index] ?? null;
|
|
4290
4982
|
const lastInitRef = useRef8(null);
|
|
4291
|
-
|
|
4983
|
+
useEffect15(() => {
|
|
4292
4984
|
if (repo.loading || !repo.repoPath || !repo.currentBranch) return;
|
|
4293
4985
|
const current = { branch: repo.currentBranch };
|
|
4294
4986
|
const last = lastInitRef.current;
|
|
@@ -4296,17 +4988,17 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
4296
4988
|
lastInitRef.current = current;
|
|
4297
4989
|
jira.initializeJiraState(repo.repoPath, repo.currentBranch, repo.currentRepoSlug);
|
|
4298
4990
|
}, [repo.loading, repo.repoPath, repo.currentBranch, repo.currentRepoSlug, jira.initializeJiraState]);
|
|
4299
|
-
|
|
4991
|
+
useEffect15(() => {
|
|
4300
4992
|
if (isActive) {
|
|
4301
4993
|
repo.refreshBranch();
|
|
4302
4994
|
} else {
|
|
4303
4995
|
modal.close();
|
|
4304
4996
|
}
|
|
4305
4997
|
}, [isActive, repo.refreshBranch, modal.close]);
|
|
4306
|
-
|
|
4998
|
+
useEffect15(() => {
|
|
4307
4999
|
onModalChange == null ? void 0 : onModalChange(modal.isOpen);
|
|
4308
5000
|
}, [modal.isOpen, onModalChange]);
|
|
4309
|
-
|
|
5001
|
+
useEffect15(() => {
|
|
4310
5002
|
onJiraStateChange == null ? void 0 : onJiraStateChange(jira.jiraState);
|
|
4311
5003
|
}, [jira.jiraState, onJiraStateChange]);
|
|
4312
5004
|
const handleConfigureSubmit = async (siteUrl, email, apiToken) => {
|
|
@@ -4378,13 +5070,13 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
4378
5070
|
{ isActive: isActive && !modal.isOpen }
|
|
4379
5071
|
);
|
|
4380
5072
|
if (repo.isRepo === false) {
|
|
4381
|
-
return /* @__PURE__ */
|
|
5073
|
+
return /* @__PURE__ */ jsx19(TitledBox6, { borderStyle: "round", titles: ["Jira"], flexShrink: 0, children: /* @__PURE__ */ jsx19(Text17, { color: "red", children: "Not a git repository" }) });
|
|
4382
5074
|
}
|
|
4383
5075
|
if (modal.type === "configure") {
|
|
4384
5076
|
const siteUrl = repo.repoPath ? getJiraSiteUrl(repo.repoPath) : void 0;
|
|
4385
5077
|
const creds = repo.repoPath ? getJiraCredentials(repo.repoPath) : { email: null, apiToken: null };
|
|
4386
5078
|
const existingConfigs = getExistingJiraConfigs(repo.repoPath ?? void 0);
|
|
4387
|
-
return /* @__PURE__ */
|
|
5079
|
+
return /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx19(
|
|
4388
5080
|
ConfigureJiraSiteModal,
|
|
4389
5081
|
{
|
|
4390
5082
|
initialSiteUrl: siteUrl ?? void 0,
|
|
@@ -4401,7 +5093,7 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
4401
5093
|
) });
|
|
4402
5094
|
}
|
|
4403
5095
|
if (modal.type === "link") {
|
|
4404
|
-
return /* @__PURE__ */
|
|
5096
|
+
return /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx19(
|
|
4405
5097
|
LinkTicketModal,
|
|
4406
5098
|
{
|
|
4407
5099
|
onSubmit: handleLinkSubmit,
|
|
@@ -4415,7 +5107,7 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
4415
5107
|
) });
|
|
4416
5108
|
}
|
|
4417
5109
|
if (modal.type === "status" && repo.repoPath && repo.currentBranch && currentTicket) {
|
|
4418
|
-
return /* @__PURE__ */
|
|
5110
|
+
return /* @__PURE__ */ jsx19(Box17, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx19(
|
|
4419
5111
|
ChangeStatusModal,
|
|
4420
5112
|
{
|
|
4421
5113
|
repoPath: repo.repoPath,
|
|
@@ -4428,10 +5120,10 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
4428
5120
|
}
|
|
4429
5121
|
const title = "[4] Jira";
|
|
4430
5122
|
const borderColor = isActive ? "yellow" : void 0;
|
|
4431
|
-
return /* @__PURE__ */
|
|
4432
|
-
jira.jiraState === "not_configured" && /* @__PURE__ */
|
|
4433
|
-
jira.jiraState === "no_tickets" && /* @__PURE__ */
|
|
4434
|
-
jira.jiraState === "has_tickets" && jira.tickets.map((ticket, idx) => /* @__PURE__ */
|
|
5123
|
+
return /* @__PURE__ */ jsx19(TitledBox6, { borderStyle: "round", titles: [title], borderColor, flexShrink: 0, children: /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", paddingX: 1, children: [
|
|
5124
|
+
jira.jiraState === "not_configured" && /* @__PURE__ */ jsx19(Text17, { dimColor: true, children: "No Jira site configured" }),
|
|
5125
|
+
jira.jiraState === "no_tickets" && /* @__PURE__ */ jsx19(Text17, { dimColor: true, children: "No tickets linked to this branch" }),
|
|
5126
|
+
jira.jiraState === "has_tickets" && jira.tickets.map((ticket, idx) => /* @__PURE__ */ jsx19(
|
|
4435
5127
|
TicketItem,
|
|
4436
5128
|
{
|
|
4437
5129
|
ticketKey: ticket.key,
|
|
@@ -4445,23 +5137,22 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
4445
5137
|
}
|
|
4446
5138
|
|
|
4447
5139
|
// src/components/logs/LogsView.tsx
|
|
4448
|
-
import { useEffect as
|
|
5140
|
+
import { useEffect as useEffect17 } from "react";
|
|
4449
5141
|
import { Box as Box20, useInput as useInput17 } from "ink";
|
|
4450
5142
|
|
|
4451
5143
|
// src/components/logs/LogViewerBox.tsx
|
|
4452
|
-
import { useEffect as
|
|
5144
|
+
import { useEffect as useEffect16, useRef as useRef9, useState as useState21 } from "react";
|
|
4453
5145
|
import { TitledBox as TitledBox7 } from "@mishieck/ink-titled-box";
|
|
4454
|
-
import { Box as Box18, Text as
|
|
5146
|
+
import { Box as Box18, Text as Text18, useInput as useInput15 } from "ink";
|
|
4455
5147
|
import { ScrollView as ScrollView9 } from "ink-scroll-view";
|
|
4456
|
-
import Spinner4 from "ink-spinner";
|
|
4457
5148
|
import TextInput2 from "ink-text-input";
|
|
4458
|
-
import { jsx as
|
|
5149
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4459
5150
|
function LogViewerBox({ date, content, isActive, onRefresh, onLogCreated }) {
|
|
4460
5151
|
const scrollRef = useRef9(null);
|
|
4461
|
-
const [isInputMode, setIsInputMode] =
|
|
4462
|
-
const [inputValue, setInputValue] =
|
|
4463
|
-
const [isGeneratingStandup, setIsGeneratingStandup] =
|
|
4464
|
-
const [standupResult, setStandupResult] =
|
|
5152
|
+
const [isInputMode, setIsInputMode] = useState21(false);
|
|
5153
|
+
const [inputValue, setInputValue] = useState21("");
|
|
5154
|
+
const [isGeneratingStandup, setIsGeneratingStandup] = useState21(false);
|
|
5155
|
+
const [standupResult, setStandupResult] = useState21(null);
|
|
4465
5156
|
const claudeProcessRef = useRef9(null);
|
|
4466
5157
|
const title = "[6] Log Content";
|
|
4467
5158
|
const borderColor = isActive ? "yellow" : void 0;
|
|
@@ -4513,9 +5204,9 @@ function LogViewerBox({ date, content, isActive, onRefresh, onLogCreated }) {
|
|
|
4513
5204
|
if (input === "c" && date && content && !isGeneratingStandup) {
|
|
4514
5205
|
setIsGeneratingStandup(true);
|
|
4515
5206
|
setStandupResult(null);
|
|
4516
|
-
const
|
|
4517
|
-
claudeProcessRef.current =
|
|
4518
|
-
|
|
5207
|
+
const process3 = generateStandupNotes(content);
|
|
5208
|
+
claudeProcessRef.current = process3;
|
|
5209
|
+
process3.promise.then((result) => {
|
|
4519
5210
|
claudeProcessRef.current = null;
|
|
4520
5211
|
setIsGeneratingStandup(false);
|
|
4521
5212
|
if (result.success) {
|
|
@@ -4528,7 +5219,7 @@ function LogViewerBox({ date, content, isActive, onRefresh, onLogCreated }) {
|
|
|
4528
5219
|
},
|
|
4529
5220
|
{ isActive }
|
|
4530
5221
|
);
|
|
4531
|
-
|
|
5222
|
+
useEffect16(() => {
|
|
4532
5223
|
return () => {
|
|
4533
5224
|
var _a;
|
|
4534
5225
|
(_a = claudeProcessRef.current) == null ? void 0 : _a.cancel();
|
|
@@ -4551,14 +5242,14 @@ ${value.trim()}
|
|
|
4551
5242
|
setIsInputMode(false);
|
|
4552
5243
|
onRefresh();
|
|
4553
5244
|
};
|
|
4554
|
-
return /* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
!date && /* @__PURE__ */
|
|
4557
|
-
date && content === null && /* @__PURE__ */
|
|
4558
|
-
date && content !== null && content.trim() === "" && /* @__PURE__ */
|
|
4559
|
-
date && content && content.trim() !== "" && /* @__PURE__ */
|
|
5245
|
+
return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", flexGrow: 1, children: [
|
|
5246
|
+
/* @__PURE__ */ jsx20(TitledBox7, { borderStyle: "round", titles: [displayTitle], borderColor, flexGrow: 1, children: /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", flexGrow: 1, children: /* @__PURE__ */ jsx20(ScrollView9, { ref: scrollRef, children: /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", paddingX: 1, children: [
|
|
5247
|
+
!date && /* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "Select a log file to view" }),
|
|
5248
|
+
date && content === null && /* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "Log file not found" }),
|
|
5249
|
+
date && content !== null && content.trim() === "" && /* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "Empty log file" }),
|
|
5250
|
+
date && content && content.trim() !== "" && /* @__PURE__ */ jsx20(Markdown, { children: content })
|
|
4560
5251
|
] }) }) }) }),
|
|
4561
|
-
isInputMode && /* @__PURE__ */
|
|
5252
|
+
isInputMode && /* @__PURE__ */ jsx20(TitledBox7, { borderStyle: "round", titles: ["Add Entry"], borderColor: "yellow", children: /* @__PURE__ */ jsx20(Box18, { paddingX: 1, children: /* @__PURE__ */ jsx20(
|
|
4562
5253
|
TextInput2,
|
|
4563
5254
|
{
|
|
4564
5255
|
value: inputValue,
|
|
@@ -4566,22 +5257,19 @@ ${value.trim()}
|
|
|
4566
5257
|
onSubmit: handleInputSubmit
|
|
4567
5258
|
}
|
|
4568
5259
|
) }) }),
|
|
4569
|
-
isGeneratingStandup && /* @__PURE__ */
|
|
4570
|
-
/* @__PURE__ */
|
|
4571
|
-
|
|
4572
|
-
" Generating standup notes..."
|
|
4573
|
-
] }),
|
|
4574
|
-
/* @__PURE__ */ jsx18(Text16, { dimColor: true, children: "Press Esc to cancel" })
|
|
5260
|
+
isGeneratingStandup && /* @__PURE__ */ jsx20(TitledBox7, { borderStyle: "round", titles: ["Standup Notes"], borderColor: "yellow", children: /* @__PURE__ */ jsxs18(Box18, { paddingX: 1, flexDirection: "column", children: [
|
|
5261
|
+
/* @__PURE__ */ jsx20(AnimatedText, { name: "radar", config: { baseColor: "#CC6600" }, children: "Generating standup notes with Claude..." }),
|
|
5262
|
+
/* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "Press Esc to cancel" })
|
|
4575
5263
|
] }) }),
|
|
4576
|
-
standupResult && /* @__PURE__ */
|
|
5264
|
+
standupResult && /* @__PURE__ */ jsx20(
|
|
4577
5265
|
TitledBox7,
|
|
4578
5266
|
{
|
|
4579
5267
|
borderStyle: "round",
|
|
4580
5268
|
titles: ["Standup Notes"],
|
|
4581
5269
|
borderColor: standupResult.type === "error" ? "red" : "green",
|
|
4582
|
-
children: /* @__PURE__ */
|
|
4583
|
-
standupResult.type === "error" ? /* @__PURE__ */
|
|
4584
|
-
/* @__PURE__ */
|
|
5270
|
+
children: /* @__PURE__ */ jsxs18(Box18, { paddingX: 1, flexDirection: "column", children: [
|
|
5271
|
+
standupResult.type === "error" ? /* @__PURE__ */ jsx20(Text18, { color: "red", children: standupResult.message }) : /* @__PURE__ */ jsx20(Markdown, { children: standupResult.message }),
|
|
5272
|
+
/* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "Press Esc to dismiss" })
|
|
4585
5273
|
] })
|
|
4586
5274
|
}
|
|
4587
5275
|
)
|
|
@@ -4590,9 +5278,9 @@ ${value.trim()}
|
|
|
4590
5278
|
|
|
4591
5279
|
// src/components/logs/LogsHistoryBox.tsx
|
|
4592
5280
|
import { TitledBox as TitledBox8 } from "@mishieck/ink-titled-box";
|
|
4593
|
-
import { Box as Box19, Text as
|
|
5281
|
+
import { Box as Box19, Text as Text19, useInput as useInput16 } from "ink";
|
|
4594
5282
|
import { ScrollView as ScrollView10 } from "ink-scroll-view";
|
|
4595
|
-
import { jsx as
|
|
5283
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4596
5284
|
function LogsHistoryBox({
|
|
4597
5285
|
logFiles,
|
|
4598
5286
|
selectedDate,
|
|
@@ -4622,31 +5310,31 @@ function LogsHistoryBox({
|
|
|
4622
5310
|
},
|
|
4623
5311
|
{ isActive }
|
|
4624
5312
|
);
|
|
4625
|
-
return /* @__PURE__ */
|
|
4626
|
-
logFiles.length === 0 && /* @__PURE__ */
|
|
4627
|
-
logFiles.length > 0 && /* @__PURE__ */
|
|
5313
|
+
return /* @__PURE__ */ jsx21(TitledBox8, { borderStyle: "round", titles: [title], borderColor, height: 5, children: /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
5314
|
+
logFiles.length === 0 && /* @__PURE__ */ jsx21(Text19, { dimColor: true, children: "No logs yet" }),
|
|
5315
|
+
logFiles.length > 0 && /* @__PURE__ */ jsx21(ScrollView10, { ref: scrollRef, children: logFiles.map((file, idx) => {
|
|
4628
5316
|
const isHighlighted = idx === highlightedIndex;
|
|
4629
5317
|
const isSelected = file.date === selectedDate;
|
|
4630
5318
|
const cursor = isHighlighted ? ">" : " ";
|
|
4631
5319
|
const indicator = isSelected ? " *" : "";
|
|
4632
|
-
return /* @__PURE__ */
|
|
4633
|
-
/* @__PURE__ */
|
|
5320
|
+
return /* @__PURE__ */ jsxs19(Box19, { children: [
|
|
5321
|
+
/* @__PURE__ */ jsxs19(Text19, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
4634
5322
|
cursor,
|
|
4635
5323
|
" "
|
|
4636
5324
|
] }),
|
|
4637
|
-
/* @__PURE__ */
|
|
4638
|
-
file.isToday && /* @__PURE__ */
|
|
4639
|
-
/* @__PURE__ */
|
|
5325
|
+
/* @__PURE__ */ jsx21(Text19, { color: file.isToday ? "green" : void 0, bold: file.isToday, children: file.date }),
|
|
5326
|
+
file.isToday && /* @__PURE__ */ jsx21(Text19, { color: "green", children: " (today)" }),
|
|
5327
|
+
/* @__PURE__ */ jsx21(Text19, { dimColor: true, children: indicator })
|
|
4640
5328
|
] }, file.date);
|
|
4641
5329
|
}) })
|
|
4642
5330
|
] }) });
|
|
4643
5331
|
}
|
|
4644
5332
|
|
|
4645
5333
|
// src/components/logs/LogsView.tsx
|
|
4646
|
-
import { jsx as
|
|
5334
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4647
5335
|
function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
4648
5336
|
const logs = useLogs();
|
|
4649
|
-
|
|
5337
|
+
useEffect17(() => {
|
|
4650
5338
|
if (refreshKey !== void 0 && refreshKey > 0) {
|
|
4651
5339
|
logs.handleExternalLogUpdate();
|
|
4652
5340
|
}
|
|
@@ -4658,8 +5346,8 @@ function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
|
4658
5346
|
},
|
|
4659
5347
|
{ isActive }
|
|
4660
5348
|
);
|
|
4661
|
-
return /* @__PURE__ */
|
|
4662
|
-
/* @__PURE__ */
|
|
5349
|
+
return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", flexGrow: 1, children: [
|
|
5350
|
+
/* @__PURE__ */ jsx22(
|
|
4663
5351
|
LogsHistoryBox,
|
|
4664
5352
|
{
|
|
4665
5353
|
logFiles: logs.logFiles,
|
|
@@ -4670,7 +5358,7 @@ function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
|
4670
5358
|
isActive: isActive && focusedBox === "history"
|
|
4671
5359
|
}
|
|
4672
5360
|
),
|
|
4673
|
-
/* @__PURE__ */
|
|
5361
|
+
/* @__PURE__ */ jsx22(
|
|
4674
5362
|
LogViewerBox,
|
|
4675
5363
|
{
|
|
4676
5364
|
date: logs.selectedDate,
|
|
@@ -4684,8 +5372,8 @@ function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
|
4684
5372
|
}
|
|
4685
5373
|
|
|
4686
5374
|
// src/components/ui/KeybindingsBar.tsx
|
|
4687
|
-
import { Box as Box21, Text as
|
|
4688
|
-
import { jsx as
|
|
5375
|
+
import { Box as Box21, Text as Text20 } from "ink";
|
|
5376
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4689
5377
|
var globalBindings = [
|
|
4690
5378
|
{ key: "1-4", label: "Focus" },
|
|
4691
5379
|
{ key: "Tab", label: "Switch Tab" },
|
|
@@ -4696,14 +5384,14 @@ var modalBindings = [{ key: "Esc", label: "Cancel" }];
|
|
|
4696
5384
|
var DUCK_ASCII = "<(')___";
|
|
4697
5385
|
function KeybindingsBar({ contextBindings = [], modalOpen = false, duck }) {
|
|
4698
5386
|
const allBindings = modalOpen ? [...contextBindings, ...modalBindings] : [...contextBindings, ...globalBindings];
|
|
4699
|
-
return /* @__PURE__ */
|
|
4700
|
-
allBindings.map((binding) => /* @__PURE__ */
|
|
4701
|
-
/* @__PURE__ */
|
|
4702
|
-
/* @__PURE__ */
|
|
5387
|
+
return /* @__PURE__ */ jsxs21(Box21, { flexShrink: 0, paddingX: 1, gap: 2, children: [
|
|
5388
|
+
allBindings.map((binding) => /* @__PURE__ */ jsxs21(Box21, { gap: 1, children: [
|
|
5389
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, color: binding.color ?? "yellow", children: binding.key }),
|
|
5390
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: binding.label })
|
|
4703
5391
|
] }, binding.key)),
|
|
4704
|
-
(duck == null ? void 0 : duck.visible) && /* @__PURE__ */
|
|
4705
|
-
/* @__PURE__ */
|
|
4706
|
-
/* @__PURE__ */
|
|
5392
|
+
(duck == null ? void 0 : duck.visible) && /* @__PURE__ */ jsxs21(Box21, { flexGrow: 1, justifyContent: "flex-end", gap: 1, children: [
|
|
5393
|
+
/* @__PURE__ */ jsx23(Text20, { children: DUCK_ASCII }),
|
|
5394
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: duck.message })
|
|
4707
5395
|
] })
|
|
4708
5396
|
] });
|
|
4709
5397
|
}
|
|
@@ -4731,6 +5419,23 @@ var GITHUB_KEYBINDINGS = {
|
|
|
4731
5419
|
]
|
|
4732
5420
|
};
|
|
4733
5421
|
|
|
5422
|
+
// src/constants/jira.ts
|
|
5423
|
+
var JIRA_KEYBINDINGS = {
|
|
5424
|
+
not_configured: [{ key: "c", label: "Configure Jira" }],
|
|
5425
|
+
no_tickets: [
|
|
5426
|
+
{ key: "l", label: "Link Ticket" },
|
|
5427
|
+
{ key: "r", label: "Remove Config", color: "red" }
|
|
5428
|
+
],
|
|
5429
|
+
has_tickets: [
|
|
5430
|
+
{ key: "l", label: "Link" },
|
|
5431
|
+
{ key: "s", label: "Status" },
|
|
5432
|
+
{ key: "d", label: "Unlink", color: "red" },
|
|
5433
|
+
{ key: "o", label: "Open", color: "green" },
|
|
5434
|
+
{ key: "y", label: "Copy Link" },
|
|
5435
|
+
{ key: "r", label: "Remove Config", color: "red" }
|
|
5436
|
+
]
|
|
5437
|
+
};
|
|
5438
|
+
|
|
4734
5439
|
// src/constants/jira-browser.ts
|
|
4735
5440
|
var JIRA_BROWSER_KEYBINDINGS = {
|
|
4736
5441
|
"saved-views": [
|
|
@@ -4752,23 +5457,6 @@ var JIRA_BROWSER_KEYBINDINGS = {
|
|
|
4752
5457
|
]
|
|
4753
5458
|
};
|
|
4754
5459
|
|
|
4755
|
-
// src/constants/jira.ts
|
|
4756
|
-
var JIRA_KEYBINDINGS = {
|
|
4757
|
-
not_configured: [{ key: "c", label: "Configure Jira" }],
|
|
4758
|
-
no_tickets: [
|
|
4759
|
-
{ key: "l", label: "Link Ticket" },
|
|
4760
|
-
{ key: "r", label: "Remove Config", color: "red" }
|
|
4761
|
-
],
|
|
4762
|
-
has_tickets: [
|
|
4763
|
-
{ key: "l", label: "Link" },
|
|
4764
|
-
{ key: "s", label: "Status" },
|
|
4765
|
-
{ key: "d", label: "Unlink", color: "red" },
|
|
4766
|
-
{ key: "o", label: "Open", color: "green" },
|
|
4767
|
-
{ key: "y", label: "Copy Link" },
|
|
4768
|
-
{ key: "r", label: "Remove Config", color: "red" }
|
|
4769
|
-
]
|
|
4770
|
-
};
|
|
4771
|
-
|
|
4772
5460
|
// src/constants/logs.ts
|
|
4773
5461
|
var LOGS_KEYBINDINGS = {
|
|
4774
5462
|
history: [{ key: "Space", label: "Select" }],
|
|
@@ -4800,19 +5488,19 @@ function computeKeybindings(focusedView, state) {
|
|
|
4800
5488
|
}
|
|
4801
5489
|
|
|
4802
5490
|
// src/app.tsx
|
|
4803
|
-
import { jsx as
|
|
5491
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4804
5492
|
function App() {
|
|
4805
5493
|
const { exit } = useApp();
|
|
4806
|
-
const [focusedView, setFocusedView] =
|
|
4807
|
-
const [modalOpen, setModalOpen] =
|
|
4808
|
-
const [logRefreshKey, setLogRefreshKey] =
|
|
4809
|
-
const [activeTab, setActiveTab] =
|
|
5494
|
+
const [focusedView, setFocusedView] = useState22("github");
|
|
5495
|
+
const [modalOpen, setModalOpen] = useState22(false);
|
|
5496
|
+
const [logRefreshKey, setLogRefreshKey] = useState22(0);
|
|
5497
|
+
const [activeTab, setActiveTab] = useState22("logs");
|
|
4810
5498
|
const duck = useRubberDuck();
|
|
4811
|
-
const [githubFocusedBox, setGithubFocusedBox] =
|
|
4812
|
-
const [jiraState, setJiraState] =
|
|
4813
|
-
const [logsFocusedBox, setLogsFocusedBox] =
|
|
4814
|
-
const [jiraBrowserFocusedBox, setJiraBrowserFocusedBox] =
|
|
4815
|
-
const [jiraBrowserModalOpen, setJiraBrowserModalOpen] =
|
|
5499
|
+
const [githubFocusedBox, setGithubFocusedBox] = useState22("remotes");
|
|
5500
|
+
const [jiraState, setJiraState] = useState22("not_configured");
|
|
5501
|
+
const [logsFocusedBox, setLogsFocusedBox] = useState22("history");
|
|
5502
|
+
const [jiraBrowserFocusedBox, setJiraBrowserFocusedBox] = useState22("saved-views");
|
|
5503
|
+
const [jiraBrowserModalOpen, setJiraBrowserModalOpen] = useState22(false);
|
|
4816
5504
|
const keybindings = useMemo4(
|
|
4817
5505
|
() => computeKeybindings(focusedView, {
|
|
4818
5506
|
github: { focusedBox: githubFocusedBox },
|
|
@@ -4865,17 +5553,17 @@ function App() {
|
|
|
4865
5553
|
},
|
|
4866
5554
|
{ isActive: !anyModalOpen }
|
|
4867
5555
|
);
|
|
4868
|
-
return /* @__PURE__ */
|
|
4869
|
-
/* @__PURE__ */
|
|
4870
|
-
/* @__PURE__ */
|
|
4871
|
-
/* @__PURE__ */
|
|
4872
|
-
/* @__PURE__ */
|
|
4873
|
-
COLUMN2_TABS.map((tab) => /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ jsxs22(Box22, { flexGrow: 1, flexDirection: "column", overflow: "hidden", children: [
|
|
5557
|
+
/* @__PURE__ */ jsxs22(Box22, { height: 1, flexDirection: "row", columnGap: 1, children: [
|
|
5558
|
+
/* @__PURE__ */ jsx24(Box22, { flexGrow: 1, paddingX: 1, flexBasis: 0, children: /* @__PURE__ */ jsx24(Text21, { color: "gray", children: "Current branch" }) }),
|
|
5559
|
+
/* @__PURE__ */ jsxs22(Box22, { flexGrow: 1, gap: 1, flexBasis: 0, children: [
|
|
5560
|
+
/* @__PURE__ */ jsx24(Text21, { color: "gray", children: "Dashboards" }),
|
|
5561
|
+
COLUMN2_TABS.map((tab) => /* @__PURE__ */ jsx24(Text21, { bold: true, dimColor: activeTab !== tab.id, children: tab.label }, tab.id))
|
|
4874
5562
|
] })
|
|
4875
5563
|
] }),
|
|
4876
|
-
/* @__PURE__ */
|
|
4877
|
-
/* @__PURE__ */
|
|
4878
|
-
/* @__PURE__ */
|
|
5564
|
+
/* @__PURE__ */ jsxs22(Box22, { flexGrow: 1, flexDirection: "row", columnGap: 1, children: [
|
|
5565
|
+
/* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", flexGrow: 1, flexBasis: 0, children: [
|
|
5566
|
+
/* @__PURE__ */ jsx24(
|
|
4879
5567
|
GitHubView,
|
|
4880
5568
|
{
|
|
4881
5569
|
isActive: focusedView === "github",
|
|
@@ -4883,7 +5571,7 @@ function App() {
|
|
|
4883
5571
|
onLogUpdated: handleLogUpdated
|
|
4884
5572
|
}
|
|
4885
5573
|
),
|
|
4886
|
-
/* @__PURE__ */
|
|
5574
|
+
/* @__PURE__ */ jsx24(
|
|
4887
5575
|
JiraView,
|
|
4888
5576
|
{
|
|
4889
5577
|
isActive: focusedView === "jira",
|
|
@@ -4893,8 +5581,8 @@ function App() {
|
|
|
4893
5581
|
}
|
|
4894
5582
|
)
|
|
4895
5583
|
] }),
|
|
4896
|
-
/* @__PURE__ */
|
|
4897
|
-
activeTab === "logs" && /* @__PURE__ */
|
|
5584
|
+
/* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", flexGrow: 1, flexBasis: 0, children: [
|
|
5585
|
+
activeTab === "logs" && /* @__PURE__ */ jsx24(
|
|
4898
5586
|
LogsView,
|
|
4899
5587
|
{
|
|
4900
5588
|
isActive: focusedView === "logs",
|
|
@@ -4903,7 +5591,7 @@ function App() {
|
|
|
4903
5591
|
onFocusedBoxChange: setLogsFocusedBox
|
|
4904
5592
|
}
|
|
4905
5593
|
),
|
|
4906
|
-
activeTab === "jira-browser" && /* @__PURE__ */
|
|
5594
|
+
activeTab === "jira-browser" && /* @__PURE__ */ jsx24(
|
|
4907
5595
|
JiraBrowserView,
|
|
4908
5596
|
{
|
|
4909
5597
|
isActive: focusedView === "jira-browser",
|
|
@@ -4915,7 +5603,7 @@ function App() {
|
|
|
4915
5603
|
)
|
|
4916
5604
|
] })
|
|
4917
5605
|
] }),
|
|
4918
|
-
/* @__PURE__ */
|
|
5606
|
+
/* @__PURE__ */ jsx24(
|
|
4919
5607
|
KeybindingsBar,
|
|
4920
5608
|
{
|
|
4921
5609
|
contextBindings: keybindings,
|
|
@@ -4930,31 +5618,31 @@ function App() {
|
|
|
4930
5618
|
import { render as inkRender } from "ink";
|
|
4931
5619
|
|
|
4932
5620
|
// src/lib/Screen.tsx
|
|
4933
|
-
import { useCallback as useCallback12, useEffect as
|
|
5621
|
+
import { useCallback as useCallback12, useEffect as useEffect18, useState as useState23 } from "react";
|
|
4934
5622
|
import { Box as Box23, useStdout as useStdout2 } from "ink";
|
|
4935
|
-
import { jsx as
|
|
5623
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4936
5624
|
function Screen({ children }) {
|
|
4937
5625
|
const { stdout } = useStdout2();
|
|
4938
5626
|
const getSize = useCallback12(() => ({ height: stdout.rows, width: stdout.columns }), [stdout]);
|
|
4939
|
-
const [size, setSize] =
|
|
4940
|
-
|
|
5627
|
+
const [size, setSize] = useState23(getSize);
|
|
5628
|
+
useEffect18(() => {
|
|
4941
5629
|
const onResize = () => setSize(getSize());
|
|
4942
5630
|
stdout.on("resize", onResize);
|
|
4943
5631
|
return () => {
|
|
4944
5632
|
stdout.off("resize", onResize);
|
|
4945
5633
|
};
|
|
4946
5634
|
}, [stdout, getSize]);
|
|
4947
|
-
return /* @__PURE__ */
|
|
5635
|
+
return /* @__PURE__ */ jsx25(Box23, { height: size.height, width: size.width, children });
|
|
4948
5636
|
}
|
|
4949
5637
|
|
|
4950
5638
|
// src/lib/render.tsx
|
|
4951
|
-
import { jsx as
|
|
5639
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
4952
5640
|
var ENTER_ALT_BUFFER = "\x1B[?1049h";
|
|
4953
5641
|
var EXIT_ALT_BUFFER = "\x1B[?1049l";
|
|
4954
5642
|
var CLEAR_SCREEN = "\x1B[2J\x1B[H";
|
|
4955
5643
|
function render(node, options) {
|
|
4956
5644
|
process.stdout.write(ENTER_ALT_BUFFER + CLEAR_SCREEN);
|
|
4957
|
-
const element = /* @__PURE__ */
|
|
5645
|
+
const element = /* @__PURE__ */ jsx26(Screen, { children: node });
|
|
4958
5646
|
const instance = inkRender(element, options);
|
|
4959
5647
|
setImmediate(() => instance.rerender(element));
|
|
4960
5648
|
const cleanup = () => process.stdout.write(EXIT_ALT_BUFFER);
|
|
@@ -4975,7 +5663,7 @@ function render(node, options) {
|
|
|
4975
5663
|
}
|
|
4976
5664
|
|
|
4977
5665
|
// src/cli.tsx
|
|
4978
|
-
import { jsx as
|
|
5666
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4979
5667
|
var cli = meow(
|
|
4980
5668
|
`
|
|
4981
5669
|
Usage
|
|
@@ -5008,4 +5696,4 @@ if (cli.flags.cwd) {
|
|
|
5008
5696
|
process.exit(1);
|
|
5009
5697
|
}
|
|
5010
5698
|
}
|
|
5011
|
-
render(/* @__PURE__ */
|
|
5699
|
+
render(/* @__PURE__ */ jsx27(App, {}));
|