clairo 3.0.0 → 3.1.0
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/README.md +1 -1
- package/dist/cli.js +339 -256
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# clairo
|
|
2
2
|
|
|
3
|
-
dashboard tui for github PRs, jira tickets, and daily logs.
|
|
3
|
+
an opinionated dashboard tui for github PRs, jira tickets, and daily logs.
|
|
4
4
|
|
|
5
5
|
<img width="1728" height="1056" alt="clairo" src="https://private-user-images.githubusercontent.com/89874389/548183415-7bf63805-c7fd-4741-bb44-6f9449ba6de3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzA4MDkyMDAsIm5iZiI6MTc3MDgwODkwMCwicGF0aCI6Ii84OTg3NDM4OS81NDgxODM0MTUtN2JmNjM4MDUtYzdmZC00NzQxLWJiNDQtNmY5NDQ5YmE2ZGUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMjExVDExMjE0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk1NjZkMWVjMzliZWEyY2FhYjQ0NTBmMjQ0OTI3OWFmYjIwZjQ0ZmE5YzAzZjc5MDdlMGY1ODRjMWY5MWQ4YzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ha4J9yh-xRAYGuDCMbqPgwEtjjY3qvni9dHGhUR-JRI" />
|
|
6
6
|
|
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import meow from "meow";
|
|
|
5
5
|
|
|
6
6
|
// src/app.tsx
|
|
7
7
|
import { useCallback as useCallback12, useMemo as useMemo4, useState as useState23 } from "react";
|
|
8
|
-
import { Box as
|
|
8
|
+
import { Box as Box24, Text as Text23, useApp, useInput as useInput19 } from "ink";
|
|
9
9
|
|
|
10
10
|
// src/components/github/GitHubView.tsx
|
|
11
11
|
import { useCallback as useCallback8, useEffect as useEffect9, useRef as useRef5, useState as useState12 } from "react";
|
|
@@ -2511,6 +2511,45 @@ var REACTION_MESSAGES = {
|
|
|
2511
2511
|
{ template: "{ticketKey} is in {assignee}'s hands now.", requires: ["ticketKey", "assignee"] },
|
|
2512
2512
|
{ template: "{assignee}: you own {ticketKey}. No takebacks.", requires: ["ticketKey", "assignee"] }
|
|
2513
2513
|
],
|
|
2514
|
+
"pr:checkout": [
|
|
2515
|
+
"Branch switched!",
|
|
2516
|
+
"Checked out!",
|
|
2517
|
+
"New branch, who dis?",
|
|
2518
|
+
"*lands on a new branch*",
|
|
2519
|
+
"Context switch complete.",
|
|
2520
|
+
"Off to a new adventure!",
|
|
2521
|
+
"*hops to a different branch*",
|
|
2522
|
+
"The code is fresh here.",
|
|
2523
|
+
"New branch energy.",
|
|
2524
|
+
"Branch hopping like a pro.",
|
|
2525
|
+
"Let's see what we're working with.",
|
|
2526
|
+
"*settles into the new branch*",
|
|
2527
|
+
"Ready to review locally.",
|
|
2528
|
+
"Local checkout achieved.",
|
|
2529
|
+
{ template: "Checked out PR #{prNumber}!", requires: ["prNumber"] },
|
|
2530
|
+
{ template: "#{prNumber} is now local. Dive in!", requires: ["prNumber"] },
|
|
2531
|
+
{ template: '"{prTitle}" checked out. Time to explore.', requires: ["prTitle"] },
|
|
2532
|
+
{ template: "#{prNumber}: now on your machine.", requires: ["prNumber"] },
|
|
2533
|
+
{ template: "Landed on #{prNumber}. Looking good.", requires: ["prNumber"] },
|
|
2534
|
+
{ template: '"{prTitle}" is ready for local testing.', requires: ["prTitle"] },
|
|
2535
|
+
{ template: "#{prNumber} checked out. Your terminal, your rules.", requires: ["prNumber"] }
|
|
2536
|
+
],
|
|
2537
|
+
"pr:filtered": [
|
|
2538
|
+
"Narrowing it down!",
|
|
2539
|
+
"Filtered!",
|
|
2540
|
+
"Less noise, more signal.",
|
|
2541
|
+
"*puts on reading glasses*",
|
|
2542
|
+
"Search complete.",
|
|
2543
|
+
"The results are in.",
|
|
2544
|
+
"*sorts through the PRs*",
|
|
2545
|
+
"Finding what matters.",
|
|
2546
|
+
"Filtered to perfection.",
|
|
2547
|
+
"Focus mode: engaged.",
|
|
2548
|
+
"*adjusts the lens*",
|
|
2549
|
+
"The haystack just got smaller.",
|
|
2550
|
+
"Precision browsing.",
|
|
2551
|
+
"Now we can see clearly."
|
|
2552
|
+
],
|
|
2514
2553
|
"jira:unassigned": [
|
|
2515
2554
|
"Unassigned!",
|
|
2516
2555
|
"Free agent!",
|
|
@@ -3687,7 +3726,7 @@ ${body}`;
|
|
|
3687
3726
|
|
|
3688
3727
|
// src/components/jira-browser/JiraBrowserView.tsx
|
|
3689
3728
|
import { useCallback as useCallback10, useEffect as useEffect13, useMemo as useMemo3, useRef as useRef7, useState as useState17 } from "react";
|
|
3690
|
-
import { Box as
|
|
3729
|
+
import { Box as Box13, useInput as useInput10 } from "ink";
|
|
3691
3730
|
|
|
3692
3731
|
// src/components/jira-browser/AddViewModal.tsx
|
|
3693
3732
|
import { useState as useState13 } from "react";
|
|
@@ -3787,19 +3826,57 @@ function AddViewModal({ onSubmit, onCancel, loading, error }) {
|
|
|
3787
3826
|
// src/components/jira-browser/JiraSavedViewBrowserBox.tsx
|
|
3788
3827
|
import open4 from "open";
|
|
3789
3828
|
import { useCallback as useCallback9, useEffect as useEffect11, useMemo as useMemo2, useState as useState15 } from "react";
|
|
3790
|
-
import {
|
|
3791
|
-
import { Box as Box10, Text as Text11, useInput as useInput8 } from "ink";
|
|
3829
|
+
import { Box as Box11, Text as Text12, useInput as useInput8 } from "ink";
|
|
3792
3830
|
import { ScrollView as ScrollView6 } from "ink-scroll-view";
|
|
3793
3831
|
import Spinner3 from "ink-spinner";
|
|
3794
3832
|
|
|
3833
|
+
// src/components/ui/TitledBox.tsx
|
|
3834
|
+
import { Box as Box9, Text as Text10, useStdout as useStdout2 } from "ink";
|
|
3835
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3836
|
+
function TitledBox4({ title, borderColor, scrollRatio = null, fillColor = "#CC6600", children }) {
|
|
3837
|
+
const { stdout } = useStdout2();
|
|
3838
|
+
const terminalWidth = (stdout == null ? void 0 : stdout.columns) ?? 80;
|
|
3839
|
+
const columnWidth = Math.floor(terminalWidth / 2);
|
|
3840
|
+
const titlePart = `\u256D ${title} `;
|
|
3841
|
+
const totalDashes = Math.max(0, columnWidth - titlePart.length - 1);
|
|
3842
|
+
const topBorder = scrollRatio !== null && scrollRatio >= 0 ? /* @__PURE__ */ jsxs9(Text10, { children: [
|
|
3843
|
+
/* @__PURE__ */ jsx11(Text10, { color: borderColor, children: titlePart }),
|
|
3844
|
+
/* @__PURE__ */ jsx11(Text10, { color: fillColor, children: "\u2500".repeat(Math.round(scrollRatio * totalDashes)) }),
|
|
3845
|
+
/* @__PURE__ */ jsxs9(Text10, { color: borderColor, children: [
|
|
3846
|
+
"\u2500".repeat(totalDashes - Math.round(scrollRatio * totalDashes)),
|
|
3847
|
+
"\u256E"
|
|
3848
|
+
] })
|
|
3849
|
+
] }) : /* @__PURE__ */ jsxs9(Text10, { color: borderColor, children: [
|
|
3850
|
+
titlePart,
|
|
3851
|
+
"\u2500".repeat(totalDashes),
|
|
3852
|
+
"\u256E"
|
|
3853
|
+
] });
|
|
3854
|
+
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", flexGrow: 1, children: [
|
|
3855
|
+
topBorder,
|
|
3856
|
+
/* @__PURE__ */ jsx11(
|
|
3857
|
+
Box9,
|
|
3858
|
+
{
|
|
3859
|
+
flexDirection: "column",
|
|
3860
|
+
flexGrow: 1,
|
|
3861
|
+
flexBasis: 0,
|
|
3862
|
+
overflow: "hidden",
|
|
3863
|
+
borderStyle: "round",
|
|
3864
|
+
borderTop: false,
|
|
3865
|
+
borderColor,
|
|
3866
|
+
children
|
|
3867
|
+
}
|
|
3868
|
+
)
|
|
3869
|
+
] });
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3795
3872
|
// src/components/jira-browser/JiraIssueDetailView.tsx
|
|
3796
3873
|
import open3 from "open";
|
|
3797
3874
|
import { useEffect as useEffect10, useRef as useRef6, useState as useState14 } from "react";
|
|
3798
|
-
import { Box as
|
|
3875
|
+
import { Box as Box10, Text as Text11, useInput as useInput7 } from "ink";
|
|
3799
3876
|
import { ScrollView as ScrollView5 } from "ink-scroll-view";
|
|
3800
3877
|
import SelectInput from "ink-select-input";
|
|
3801
3878
|
import Spinner2 from "ink-spinner";
|
|
3802
|
-
import { jsx as
|
|
3879
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3803
3880
|
function JiraIssueDetailView({
|
|
3804
3881
|
issueKey,
|
|
3805
3882
|
issueSummary,
|
|
@@ -3954,44 +4031,44 @@ function JiraIssueDetailView({
|
|
|
3954
4031
|
const descriptionMd = (detail == null ? void 0 : detail.fields.description) ? adfToMarkdown(detail.fields.description) : null;
|
|
3955
4032
|
const comments = (detail == null ? void 0 : detail.fields.comment.comments) ?? [];
|
|
3956
4033
|
const totalComments = (detail == null ? void 0 : detail.fields.comment.total) ?? 0;
|
|
3957
|
-
return /* @__PURE__ */
|
|
3958
|
-
/* @__PURE__ */
|
|
3959
|
-
loading && /* @__PURE__ */
|
|
3960
|
-
/* @__PURE__ */
|
|
4034
|
+
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", flexGrow: 1, children: [
|
|
4035
|
+
/* @__PURE__ */ jsxs10(Box10, { flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
4036
|
+
loading && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsxs10(Text11, { color: "yellow", children: [
|
|
4037
|
+
/* @__PURE__ */ jsx12(Spinner2, { type: "dots" }),
|
|
3961
4038
|
" Loading issue details..."
|
|
3962
4039
|
] }) }),
|
|
3963
|
-
error && /* @__PURE__ */
|
|
3964
|
-
!loading && !error && detail && /* @__PURE__ */
|
|
3965
|
-
/* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
3967
|
-
/* @__PURE__ */
|
|
4040
|
+
error && /* @__PURE__ */ jsx12(Box10, { paddingX: 1, children: /* @__PURE__ */ jsx12(Text11, { color: "red", children: error }) }),
|
|
4041
|
+
!loading && !error && detail && /* @__PURE__ */ jsx12(ScrollView5, { ref: scrollRef, children: /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 1, children: [
|
|
4042
|
+
/* @__PURE__ */ jsxs10(Box10, { children: [
|
|
4043
|
+
/* @__PURE__ */ jsx12(Text11, { bold: true, color: "blue", children: detail.key }),
|
|
4044
|
+
/* @__PURE__ */ jsxs10(Text11, { bold: true, children: [
|
|
3968
4045
|
" ",
|
|
3969
4046
|
detail.fields.summary
|
|
3970
4047
|
] })
|
|
3971
4048
|
] }),
|
|
3972
|
-
/* @__PURE__ */
|
|
3973
|
-
/* @__PURE__ */
|
|
3974
|
-
/* @__PURE__ */
|
|
3975
|
-
/* @__PURE__ */
|
|
3976
|
-
/* @__PURE__ */
|
|
3977
|
-
/* @__PURE__ */
|
|
3978
|
-
/* @__PURE__ */
|
|
4049
|
+
/* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
|
|
4050
|
+
/* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Status:" }),
|
|
4051
|
+
/* @__PURE__ */ jsx12(Text11, { color: statusColor, children: detail.fields.status.name }),
|
|
4052
|
+
/* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Assignee:" }),
|
|
4053
|
+
/* @__PURE__ */ jsx12(Text11, { children: ((_a = detail.fields.assignee) == null ? void 0 : _a.displayName) ?? "Unassigned" }),
|
|
4054
|
+
/* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Reporter:" }),
|
|
4055
|
+
/* @__PURE__ */ jsx12(Text11, { children: ((_b = detail.fields.reporter) == null ? void 0 : _b.displayName) ?? "Unknown" })
|
|
3979
4056
|
] }),
|
|
3980
|
-
/* @__PURE__ */
|
|
3981
|
-
/* @__PURE__ */
|
|
3982
|
-
/* @__PURE__ */
|
|
3983
|
-
descriptionMd ? /* @__PURE__ */
|
|
4057
|
+
/* @__PURE__ */ jsx12(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx12(Divider, {}) }),
|
|
4058
|
+
/* @__PURE__ */ jsxs10(Box10, { marginTop: 1, flexDirection: "column", children: [
|
|
4059
|
+
/* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Description:" }),
|
|
4060
|
+
descriptionMd ? /* @__PURE__ */ jsx12(Markdown, { children: descriptionMd }) : /* @__PURE__ */ jsx12(Text11, { dimColor: true, italic: true, children: "No description" })
|
|
3984
4061
|
] }),
|
|
3985
|
-
/* @__PURE__ */
|
|
3986
|
-
/* @__PURE__ */
|
|
3987
|
-
/* @__PURE__ */
|
|
4062
|
+
/* @__PURE__ */ jsx12(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx12(Divider, {}) }),
|
|
4063
|
+
/* @__PURE__ */ jsxs10(Box10, { marginTop: 1, flexDirection: "column", children: [
|
|
4064
|
+
/* @__PURE__ */ jsxs10(Text11, { dimColor: true, children: [
|
|
3988
4065
|
"Comments (",
|
|
3989
4066
|
totalComments,
|
|
3990
4067
|
"):"
|
|
3991
4068
|
] }),
|
|
3992
|
-
comments.length === 0 && /* @__PURE__ */
|
|
3993
|
-
comments.map((comment) => /* @__PURE__ */
|
|
3994
|
-
comments.length < totalComments && /* @__PURE__ */
|
|
4069
|
+
comments.length === 0 && /* @__PURE__ */ jsx12(Text11, { dimColor: true, italic: true, children: "No comments" }),
|
|
4070
|
+
comments.map((comment) => /* @__PURE__ */ jsx12(CommentBlock, { comment }, comment.id)),
|
|
4071
|
+
comments.length < totalComments && /* @__PURE__ */ jsx12(Box10, { marginTop: 1, children: /* @__PURE__ */ jsxs10(Text11, { dimColor: true, children: [
|
|
3995
4072
|
"Showing ",
|
|
3996
4073
|
comments.length,
|
|
3997
4074
|
" of ",
|
|
@@ -4001,40 +4078,40 @@ function JiraIssueDetailView({
|
|
|
4001
4078
|
] })
|
|
4002
4079
|
] }) })
|
|
4003
4080
|
] }),
|
|
4004
|
-
mode === "transitions" && /* @__PURE__ */
|
|
4005
|
-
/* @__PURE__ */
|
|
4006
|
-
/* @__PURE__ */
|
|
4081
|
+
mode === "transitions" && /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [
|
|
4082
|
+
/* @__PURE__ */ jsx12(Text11, { bold: true, color: "yellow", children: "Change Status" }),
|
|
4083
|
+
/* @__PURE__ */ jsx12(
|
|
4007
4084
|
SelectInput,
|
|
4008
4085
|
{
|
|
4009
4086
|
items: transitions.map((t) => ({ label: t.name, value: t.id })),
|
|
4010
4087
|
onSelect: handleTransitionSelect
|
|
4011
4088
|
}
|
|
4012
4089
|
),
|
|
4013
|
-
/* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Esc to cancel" })
|
|
4014
4091
|
] }),
|
|
4015
|
-
/* @__PURE__ */
|
|
4016
|
-
actionLoading && /* @__PURE__ */
|
|
4017
|
-
/* @__PURE__ */
|
|
4092
|
+
/* @__PURE__ */ jsxs10(Box10, { paddingX: 1, flexDirection: "column", children: [
|
|
4093
|
+
actionLoading && /* @__PURE__ */ jsxs10(Text11, { color: "yellow", children: [
|
|
4094
|
+
/* @__PURE__ */ jsx12(Spinner2, { type: "dots" }),
|
|
4018
4095
|
" ",
|
|
4019
4096
|
actionLoading
|
|
4020
4097
|
] }),
|
|
4021
|
-
actionError && /* @__PURE__ */
|
|
4022
|
-
transitionsLoading && /* @__PURE__ */
|
|
4023
|
-
/* @__PURE__ */
|
|
4098
|
+
actionError && /* @__PURE__ */ jsx12(Text11, { color: "red", children: actionError }),
|
|
4099
|
+
transitionsLoading && /* @__PURE__ */ jsxs10(Text11, { color: "yellow", children: [
|
|
4100
|
+
/* @__PURE__ */ jsx12(Spinner2, { type: "dots" }),
|
|
4024
4101
|
" Loading transitions..."
|
|
4025
4102
|
] }),
|
|
4026
|
-
!actionLoading && !transitionsLoading && mode === "normal" && /* @__PURE__ */
|
|
4103
|
+
!actionLoading && !transitionsLoading && mode === "normal" && /* @__PURE__ */ jsx12(Text11, { dimColor: true, children: "Esc close \xB7 j/k scroll \xB7 s status \xB7 a assign \xB7 A unassign \xB7 o open \xB7 y copy" })
|
|
4027
4104
|
] })
|
|
4028
4105
|
] });
|
|
4029
4106
|
}
|
|
4030
4107
|
function CommentBlock({ comment }) {
|
|
4031
4108
|
const bodyMd = adfToMarkdown(comment.body);
|
|
4032
|
-
return /* @__PURE__ */
|
|
4033
|
-
/* @__PURE__ */
|
|
4034
|
-
/* @__PURE__ */
|
|
4035
|
-
/* @__PURE__ */
|
|
4109
|
+
return /* @__PURE__ */ jsxs10(Box10, { marginTop: 1, flexDirection: "column", children: [
|
|
4110
|
+
/* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
|
|
4111
|
+
/* @__PURE__ */ jsx12(Text11, { bold: true, children: comment.author.displayName }),
|
|
4112
|
+
/* @__PURE__ */ jsx12(Text11, { dimColor: true, children: timeAgo(comment.created) })
|
|
4036
4113
|
] }),
|
|
4037
|
-
bodyMd ? /* @__PURE__ */
|
|
4114
|
+
bodyMd ? /* @__PURE__ */ jsx12(Markdown, { children: bodyMd }) : /* @__PURE__ */ jsx12(Text11, { dimColor: true, italic: true, children: "Empty comment" })
|
|
4038
4115
|
] });
|
|
4039
4116
|
}
|
|
4040
4117
|
function getStatusColor(status) {
|
|
@@ -4045,7 +4122,7 @@ function getStatusColor(status) {
|
|
|
4045
4122
|
}
|
|
4046
4123
|
|
|
4047
4124
|
// src/components/jira-browser/JiraSavedViewBrowserBox.tsx
|
|
4048
|
-
import { Fragment as Fragment3, jsx as
|
|
4125
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4049
4126
|
function groupBySprint(issues) {
|
|
4050
4127
|
const groups = /* @__PURE__ */ new Map();
|
|
4051
4128
|
for (const issue of issues) {
|
|
@@ -4280,11 +4357,12 @@ function JiraSavedViewBrowserBox({
|
|
|
4280
4357
|
},
|
|
4281
4358
|
{ isActive }
|
|
4282
4359
|
);
|
|
4360
|
+
const scrollRatio = isActive && !detailIssue && navigableIndices.length > 1 ? highlightedIndex / (navigableIndices.length - 1) : null;
|
|
4283
4361
|
const filterParts = [];
|
|
4284
4362
|
if (assigneeFilter === "unassigned") filterParts.push("unassigned");
|
|
4285
4363
|
if (assigneeFilter === "me") filterParts.push("mine");
|
|
4286
4364
|
if (searchText) filterParts.push(`"${searchText}"`);
|
|
4287
|
-
return /* @__PURE__ */
|
|
4365
|
+
return /* @__PURE__ */ jsx13(TitledBox4, { title: displayTitle, borderColor, scrollRatio, children: /* @__PURE__ */ jsx13(Box11, { flexDirection: "column", flexGrow: 1, children: detailIssue && auth ? /* @__PURE__ */ jsx13(
|
|
4288
4366
|
JiraIssueDetailView,
|
|
4289
4367
|
{
|
|
4290
4368
|
issueKey: detailIssue.key,
|
|
@@ -4298,15 +4376,15 @@ function JiraSavedViewBrowserBox({
|
|
|
4298
4376
|
onIssueUpdated: handleIssueUpdated,
|
|
4299
4377
|
onLogUpdated
|
|
4300
4378
|
}
|
|
4301
|
-
) : /* @__PURE__ */
|
|
4302
|
-
(isFiltering || hasActiveFilters) && /* @__PURE__ */
|
|
4303
|
-
/* @__PURE__ */
|
|
4304
|
-
isFiltering ? /* @__PURE__ */
|
|
4305
|
-
/* @__PURE__ */
|
|
4306
|
-
/* @__PURE__ */
|
|
4307
|
-
] }) : /* @__PURE__ */
|
|
4308
|
-
/* @__PURE__ */
|
|
4309
|
-
/* @__PURE__ */
|
|
4379
|
+
) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
4380
|
+
(isFiltering || hasActiveFilters) && /* @__PURE__ */ jsxs11(Box11, { paddingX: 1, children: [
|
|
4381
|
+
/* @__PURE__ */ jsx13(Text12, { color: "blue", children: "Search: " }),
|
|
4382
|
+
isFiltering ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
4383
|
+
/* @__PURE__ */ jsx13(Text12, { children: inputText }),
|
|
4384
|
+
/* @__PURE__ */ jsx13(Text12, { backgroundColor: "yellow", children: " " })
|
|
4385
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
4386
|
+
/* @__PURE__ */ jsx13(Text12, { children: filterParts.join(" + ") }),
|
|
4387
|
+
/* @__PURE__ */ jsxs11(Text12, { dimColor: true, children: [
|
|
4310
4388
|
" ",
|
|
4311
4389
|
"(",
|
|
4312
4390
|
issues.length,
|
|
@@ -4316,37 +4394,37 @@ function JiraSavedViewBrowserBox({
|
|
|
4316
4394
|
] })
|
|
4317
4395
|
] })
|
|
4318
4396
|
] }),
|
|
4319
|
-
/* @__PURE__ */
|
|
4320
|
-
!view && /* @__PURE__ */
|
|
4321
|
-
view && loading && issues.length === 0 && /* @__PURE__ */
|
|
4322
|
-
/* @__PURE__ */
|
|
4397
|
+
/* @__PURE__ */ jsxs11(Box11, { flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
4398
|
+
!view && /* @__PURE__ */ jsx13(Box11, { paddingX: 1, children: /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: "Select a view to browse issues" }) }),
|
|
4399
|
+
view && loading && issues.length === 0 && /* @__PURE__ */ jsx13(Box11, { paddingX: 1, children: /* @__PURE__ */ jsxs11(Text12, { color: "yellow", children: [
|
|
4400
|
+
/* @__PURE__ */ jsx13(Spinner3, { type: "dots" }),
|
|
4323
4401
|
" Loading issues..."
|
|
4324
4402
|
] }) }),
|
|
4325
|
-
view && error && /* @__PURE__ */
|
|
4326
|
-
view && !loading && !error && issues.length === 0 && /* @__PURE__ */
|
|
4327
|
-
rows.length > 0 && /* @__PURE__ */
|
|
4403
|
+
view && error && /* @__PURE__ */ jsx13(Box11, { paddingX: 1, children: /* @__PURE__ */ jsx13(Text12, { color: "red", children: error }) }),
|
|
4404
|
+
view && !loading && !error && issues.length === 0 && /* @__PURE__ */ jsx13(Box11, { paddingX: 1, children: /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: hasActiveFilters ? "No issues match filter" : "No issues found" }) }),
|
|
4405
|
+
rows.length > 0 && /* @__PURE__ */ jsx13(ScrollView6, { ref: scrollRef, children: rows.map((row, rowIdx) => {
|
|
4328
4406
|
if (row.type === "header") {
|
|
4329
4407
|
const stateLabel = row.state === "active" ? " (active)" : "";
|
|
4330
|
-
return /* @__PURE__ */
|
|
4408
|
+
return /* @__PURE__ */ jsx13(Box11, { paddingX: 1, marginTop: rowIdx > 0 ? 1 : 0, children: /* @__PURE__ */ jsxs11(Text12, { bold: true, color: "magenta", children: [
|
|
4331
4409
|
row.label,
|
|
4332
|
-
stateLabel && /* @__PURE__ */
|
|
4410
|
+
stateLabel && /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: stateLabel })
|
|
4333
4411
|
] }) }, `header-${row.label}`);
|
|
4334
4412
|
}
|
|
4335
4413
|
const navIdx = navigableIndices.indexOf(rowIdx);
|
|
4336
4414
|
const isHighlighted = navIdx === highlightedIndex;
|
|
4337
4415
|
const cursor = isHighlighted ? ">" : " ";
|
|
4338
4416
|
const statusColor = getStatusColor2(row.issue.fields.status.name);
|
|
4339
|
-
return /* @__PURE__ */
|
|
4340
|
-
/* @__PURE__ */
|
|
4417
|
+
return /* @__PURE__ */ jsxs11(Box11, { paddingX: 1, children: [
|
|
4418
|
+
/* @__PURE__ */ jsxs11(Text12, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
4341
4419
|
cursor,
|
|
4342
4420
|
" "
|
|
4343
4421
|
] }),
|
|
4344
|
-
/* @__PURE__ */
|
|
4345
|
-
/* @__PURE__ */
|
|
4422
|
+
/* @__PURE__ */ jsx13(Text12, { bold: true, color: "blue", children: row.issue.key }),
|
|
4423
|
+
/* @__PURE__ */ jsxs11(Text12, { children: [
|
|
4346
4424
|
" ",
|
|
4347
4425
|
row.issue.fields.summary
|
|
4348
4426
|
] }),
|
|
4349
|
-
/* @__PURE__ */
|
|
4427
|
+
/* @__PURE__ */ jsxs11(Text12, { color: statusColor, children: [
|
|
4350
4428
|
" [",
|
|
4351
4429
|
row.issue.fields.status.name,
|
|
4352
4430
|
"]"
|
|
@@ -4354,14 +4432,14 @@ function JiraSavedViewBrowserBox({
|
|
|
4354
4432
|
] }, row.issue.key);
|
|
4355
4433
|
}) })
|
|
4356
4434
|
] }),
|
|
4357
|
-
view && !loading && issues.length > 0 && /* @__PURE__ */
|
|
4435
|
+
view && !loading && issues.length > 0 && /* @__PURE__ */ jsx13(Box11, { paddingX: 1, children: /* @__PURE__ */ jsxs11(Text12, { dimColor: true, children: [
|
|
4358
4436
|
issues.length,
|
|
4359
4437
|
" of ",
|
|
4360
4438
|
total,
|
|
4361
4439
|
" loaded",
|
|
4362
4440
|
hasMore && " \xB7 l to load more"
|
|
4363
4441
|
] }) }),
|
|
4364
|
-
view && loading && issues.length > 0 && /* @__PURE__ */
|
|
4442
|
+
view && loading && issues.length > 0 && /* @__PURE__ */ jsx13(Box11, { paddingX: 1, children: /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: "Loading more..." }) })
|
|
4365
4443
|
] }) }) });
|
|
4366
4444
|
}
|
|
4367
4445
|
function getStatusColor2(status) {
|
|
@@ -4374,9 +4452,9 @@ function getStatusColor2(status) {
|
|
|
4374
4452
|
// src/components/jira-browser/JiraSavedViewsBox.tsx
|
|
4375
4453
|
import { useEffect as useEffect12, useState as useState16 } from "react";
|
|
4376
4454
|
import { TitledBox as TitledBox5 } from "@mishieck/ink-titled-box";
|
|
4377
|
-
import { Box as
|
|
4455
|
+
import { Box as Box12, Text as Text13, useInput as useInput9 } from "ink";
|
|
4378
4456
|
import { ScrollView as ScrollView7 } from "ink-scroll-view";
|
|
4379
|
-
import { Fragment as Fragment4, jsx as
|
|
4457
|
+
import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4380
4458
|
function JiraSavedViewsBox({
|
|
4381
4459
|
views,
|
|
4382
4460
|
selectedViewId,
|
|
@@ -4445,23 +4523,23 @@ function JiraSavedViewsBox({
|
|
|
4445
4523
|
},
|
|
4446
4524
|
{ isActive }
|
|
4447
4525
|
);
|
|
4448
|
-
return /* @__PURE__ */
|
|
4449
|
-
views.length === 0 && /* @__PURE__ */
|
|
4450
|
-
views.length > 0 && /* @__PURE__ */
|
|
4526
|
+
return /* @__PURE__ */ jsx14(TitledBox5, { borderStyle: "round", titles: [title], borderColor, height: 5, children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
4527
|
+
views.length === 0 && /* @__PURE__ */ jsx14(Text13, { dimColor: true, children: "No saved views" }),
|
|
4528
|
+
views.length > 0 && /* @__PURE__ */ jsx14(ScrollView7, { ref: scrollRef, children: views.map((view, idx) => {
|
|
4451
4529
|
const isHighlighted = isActive && idx === highlightedIndex;
|
|
4452
4530
|
const isSelected = view.id === selectedViewId;
|
|
4453
4531
|
const isRenaming = view.id === renaming;
|
|
4454
4532
|
const cursor = isHighlighted ? ">" : " ";
|
|
4455
4533
|
const nameColor = isSelected ? "green" : void 0;
|
|
4456
4534
|
const indicator = isSelected ? " *" : "";
|
|
4457
|
-
return /* @__PURE__ */
|
|
4458
|
-
/* @__PURE__ */
|
|
4535
|
+
return /* @__PURE__ */ jsxs12(Box12, { children: [
|
|
4536
|
+
/* @__PURE__ */ jsxs12(Text13, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
4459
4537
|
cursor,
|
|
4460
4538
|
" "
|
|
4461
4539
|
] }),
|
|
4462
|
-
isRenaming ? /* @__PURE__ */
|
|
4463
|
-
/* @__PURE__ */
|
|
4464
|
-
/* @__PURE__ */
|
|
4540
|
+
isRenaming ? /* @__PURE__ */ jsx14(TextInput, { value: renameValue, onChange: setRenameValue, isActive: true }) : /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
4541
|
+
/* @__PURE__ */ jsx14(Text13, { color: nameColor, children: view.name }),
|
|
4542
|
+
/* @__PURE__ */ jsx14(Text13, { dimColor: true, children: indicator })
|
|
4465
4543
|
] })
|
|
4466
4544
|
] }, view.id);
|
|
4467
4545
|
}) })
|
|
@@ -4469,7 +4547,7 @@ function JiraSavedViewsBox({
|
|
|
4469
4547
|
}
|
|
4470
4548
|
|
|
4471
4549
|
// src/components/jira-browser/JiraBrowserView.tsx
|
|
4472
|
-
import { jsx as
|
|
4550
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4473
4551
|
function JiraBrowserView({
|
|
4474
4552
|
isActive,
|
|
4475
4553
|
focusedBox,
|
|
@@ -4586,7 +4664,7 @@ function JiraBrowserView({
|
|
|
4586
4664
|
{ isActive: isActive && !modal.isOpen && !inputModeActive }
|
|
4587
4665
|
);
|
|
4588
4666
|
if (modal.type === "add") {
|
|
4589
|
-
return /* @__PURE__ */
|
|
4667
|
+
return /* @__PURE__ */ jsx15(Box13, { flexDirection: "column", flexGrow: 1, children: /* @__PURE__ */ jsx15(
|
|
4590
4668
|
AddViewModal,
|
|
4591
4669
|
{
|
|
4592
4670
|
onSubmit: handleAddView,
|
|
@@ -4599,8 +4677,8 @@ function JiraBrowserView({
|
|
|
4599
4677
|
}
|
|
4600
4678
|
) });
|
|
4601
4679
|
}
|
|
4602
|
-
return /* @__PURE__ */
|
|
4603
|
-
/* @__PURE__ */
|
|
4680
|
+
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", flexGrow: 1, children: [
|
|
4681
|
+
/* @__PURE__ */ jsx15(
|
|
4604
4682
|
JiraSavedViewsBox,
|
|
4605
4683
|
{
|
|
4606
4684
|
views,
|
|
@@ -4615,7 +4693,7 @@ function JiraBrowserView({
|
|
|
4615
4693
|
onInputModeChange: setInputModeActive
|
|
4616
4694
|
}
|
|
4617
4695
|
),
|
|
4618
|
-
/* @__PURE__ */
|
|
4696
|
+
/* @__PURE__ */ jsx15(
|
|
4619
4697
|
JiraSavedViewBrowserBox,
|
|
4620
4698
|
{
|
|
4621
4699
|
view: selectedView,
|
|
@@ -4637,8 +4715,8 @@ import { useEffect as useEffect15, useRef as useRef8 } from "react";
|
|
|
4637
4715
|
|
|
4638
4716
|
// src/components/jira/LinkTicketModal.tsx
|
|
4639
4717
|
import { useState as useState18 } from "react";
|
|
4640
|
-
import { Box as
|
|
4641
|
-
import { jsx as
|
|
4718
|
+
import { Box as Box14, Text as Text14, useInput as useInput11 } from "ink";
|
|
4719
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4642
4720
|
function LinkTicketModal({ onSubmit, onCancel, loading, error }) {
|
|
4643
4721
|
const [ticketInput, setTicketInput] = useState18("");
|
|
4644
4722
|
const canSubmit = ticketInput.trim().length > 0;
|
|
@@ -4655,29 +4733,29 @@ function LinkTicketModal({ onSubmit, onCancel, loading, error }) {
|
|
|
4655
4733
|
},
|
|
4656
4734
|
{ isActive: !loading }
|
|
4657
4735
|
);
|
|
4658
|
-
return /* @__PURE__ */
|
|
4659
|
-
/* @__PURE__ */
|
|
4660
|
-
/* @__PURE__ */
|
|
4661
|
-
/* @__PURE__ */
|
|
4662
|
-
error && /* @__PURE__ */
|
|
4663
|
-
/* @__PURE__ */
|
|
4664
|
-
/* @__PURE__ */
|
|
4665
|
-
/* @__PURE__ */
|
|
4736
|
+
return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1, children: [
|
|
4737
|
+
/* @__PURE__ */ jsx16(Text14, { bold: true, color: "yellow", children: "Link Jira Ticket" }),
|
|
4738
|
+
/* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "Type ticket ID, Enter to submit, Esc to cancel" }),
|
|
4739
|
+
/* @__PURE__ */ jsx16(Box14, { marginTop: 1 }),
|
|
4740
|
+
error && /* @__PURE__ */ jsx16(Box14, { marginBottom: 1, children: /* @__PURE__ */ jsx16(Text14, { color: "red", children: error }) }),
|
|
4741
|
+
/* @__PURE__ */ jsxs14(Box14, { children: [
|
|
4742
|
+
/* @__PURE__ */ jsx16(Text14, { color: "blue", children: "Ticket: " }),
|
|
4743
|
+
/* @__PURE__ */ jsx16(TextInput, { value: ticketInput, onChange: setTicketInput, placeholder: "PROJ-123", isActive: !loading })
|
|
4666
4744
|
] }),
|
|
4667
|
-
loading && /* @__PURE__ */
|
|
4668
|
-
/* @__PURE__ */
|
|
4745
|
+
loading && /* @__PURE__ */ jsx16(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text14, { color: "yellow", children: "Fetching ticket..." }) }),
|
|
4746
|
+
/* @__PURE__ */ jsx16(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "Examples: PROJ-123 or https://company.atlassian.net/browse/PROJ-123" }) })
|
|
4669
4747
|
] });
|
|
4670
4748
|
}
|
|
4671
4749
|
|
|
4672
4750
|
// src/components/jira/JiraView.tsx
|
|
4673
4751
|
import { TitledBox as TitledBox6 } from "@mishieck/ink-titled-box";
|
|
4674
|
-
import { Box as
|
|
4752
|
+
import { Box as Box18, Text as Text18, useInput as useInput14 } from "ink";
|
|
4675
4753
|
|
|
4676
4754
|
// src/components/jira/ChangeStatusModal.tsx
|
|
4677
4755
|
import { useEffect as useEffect14, useState as useState19 } from "react";
|
|
4678
|
-
import { Box as
|
|
4756
|
+
import { Box as Box15, Text as Text15, useInput as useInput12 } from "ink";
|
|
4679
4757
|
import SelectInput2 from "ink-select-input";
|
|
4680
|
-
import { jsx as
|
|
4758
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4681
4759
|
function ChangeStatusModal({ repoPath, ticketKey, currentStatus, onComplete, onCancel }) {
|
|
4682
4760
|
const [transitions, setTransitions] = useState19([]);
|
|
4683
4761
|
const [loading, setLoading] = useState19(true);
|
|
@@ -4745,23 +4823,23 @@ function ChangeStatusModal({ repoPath, ticketKey, currentStatus, onComplete, onC
|
|
|
4745
4823
|
0,
|
|
4746
4824
|
transitions.findIndex((t) => t.to.name === currentStatus)
|
|
4747
4825
|
);
|
|
4748
|
-
return /* @__PURE__ */
|
|
4749
|
-
/* @__PURE__ */
|
|
4826
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", borderStyle: "round", borderColor: "yellow", paddingX: 1, paddingY: 1, children: [
|
|
4827
|
+
/* @__PURE__ */ jsxs15(Text15, { bold: true, color: "yellow", children: [
|
|
4750
4828
|
"Change Status: ",
|
|
4751
4829
|
ticketKey
|
|
4752
4830
|
] }),
|
|
4753
|
-
loading && /* @__PURE__ */
|
|
4754
|
-
error && /* @__PURE__ */
|
|
4755
|
-
!loading && !error && transitions.length === 0 && /* @__PURE__ */
|
|
4756
|
-
!loading && !error && transitions.length > 0 && !applying && /* @__PURE__ */
|
|
4757
|
-
applying && /* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */
|
|
4831
|
+
loading && /* @__PURE__ */ jsx17(Text15, { dimColor: true, children: "Loading transitions..." }),
|
|
4832
|
+
error && /* @__PURE__ */ jsx17(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text15, { color: "red", children: error }) }),
|
|
4833
|
+
!loading && !error && transitions.length === 0 && /* @__PURE__ */ jsx17(Text15, { dimColor: true, children: "No available transitions" }),
|
|
4834
|
+
!loading && !error && transitions.length > 0 && !applying && /* @__PURE__ */ jsx17(Box15, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx17(SelectInput2, { items, initialIndex, onSelect: handleSelect }) }),
|
|
4835
|
+
applying && /* @__PURE__ */ jsx17(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text15, { color: "yellow", children: "Updating status..." }) }),
|
|
4836
|
+
/* @__PURE__ */ jsx17(Box15, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text15, { dimColor: true, children: "Esc to cancel" }) })
|
|
4759
4837
|
] });
|
|
4760
4838
|
}
|
|
4761
4839
|
|
|
4762
4840
|
// src/components/jira/ConfigureJiraSiteModal.tsx
|
|
4763
4841
|
import { useState as useState20 } from "react";
|
|
4764
|
-
import { Box as
|
|
4842
|
+
import { Box as Box16, Text as Text16, useInput as useInput13 } from "ink";
|
|
4765
4843
|
import { ScrollView as ScrollView8 } from "ink-scroll-view";
|
|
4766
4844
|
|
|
4767
4845
|
// src/lib/editor.ts
|
|
@@ -4793,7 +4871,7 @@ function openInEditor(content, filename) {
|
|
|
4793
4871
|
}
|
|
4794
4872
|
|
|
4795
4873
|
// src/components/jira/ConfigureJiraSiteModal.tsx
|
|
4796
|
-
import { jsx as
|
|
4874
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4797
4875
|
var MAX_VISIBLE_ITEMS = 4;
|
|
4798
4876
|
function ConfigureJiraSiteModal({
|
|
4799
4877
|
initialSiteUrl,
|
|
@@ -4887,38 +4965,38 @@ function ConfigureJiraSiteModal({
|
|
|
4887
4965
|
const prefix = isSelected ? "> " : " ";
|
|
4888
4966
|
const color = isSelected ? "yellow" : void 0;
|
|
4889
4967
|
const displayValue = isSensitive && value ? "*".repeat(Math.min(value.length, 20)) : value;
|
|
4890
|
-
return /* @__PURE__ */
|
|
4891
|
-
/* @__PURE__ */
|
|
4968
|
+
return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", children: [
|
|
4969
|
+
/* @__PURE__ */ jsxs16(Text16, { color, bold: isSelected, children: [
|
|
4892
4970
|
prefix,
|
|
4893
4971
|
label
|
|
4894
4972
|
] }),
|
|
4895
|
-
value !== void 0 && /* @__PURE__ */
|
|
4973
|
+
value !== void 0 && /* @__PURE__ */ jsx18(Box16, { marginLeft: 4, children: /* @__PURE__ */ jsx18(Text16, { dimColor: true, children: displayValue || "(empty - press Enter to edit)" }) })
|
|
4896
4974
|
] });
|
|
4897
4975
|
};
|
|
4898
4976
|
if (mode === "choose") {
|
|
4899
4977
|
const totalItems = existingConfigs.length + 1;
|
|
4900
4978
|
const listHeight = Math.min(totalItems * 2, MAX_VISIBLE_ITEMS * 2);
|
|
4901
|
-
return /* @__PURE__ */
|
|
4902
|
-
/* @__PURE__ */
|
|
4903
|
-
/* @__PURE__ */
|
|
4904
|
-
/* @__PURE__ */
|
|
4905
|
-
error && /* @__PURE__ */
|
|
4906
|
-
/* @__PURE__ */
|
|
4979
|
+
return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, paddingY: 1, children: [
|
|
4980
|
+
/* @__PURE__ */ jsx18(Text16, { bold: true, color: "cyan", children: "Configure Jira Site" }),
|
|
4981
|
+
/* @__PURE__ */ jsx18(Text16, { dimColor: true, children: "Select an existing configuration or enter new credentials" }),
|
|
4982
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1 }),
|
|
4983
|
+
error && /* @__PURE__ */ jsx18(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsx18(Text16, { color: "red", children: error }) }),
|
|
4984
|
+
/* @__PURE__ */ jsx18(Box16, { height: listHeight, overflow: "hidden", children: /* @__PURE__ */ jsxs16(ScrollView8, { ref: scrollRef, children: [
|
|
4907
4985
|
existingConfigs.map((config, idx) => {
|
|
4908
4986
|
const isSelected = selectedExisting === idx;
|
|
4909
|
-
return /* @__PURE__ */
|
|
4910
|
-
/* @__PURE__ */
|
|
4987
|
+
return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", children: [
|
|
4988
|
+
/* @__PURE__ */ jsxs16(Text16, { color: isSelected ? "yellow" : void 0, bold: isSelected, children: [
|
|
4911
4989
|
isSelected ? "> " : " ",
|
|
4912
4990
|
config.siteUrl
|
|
4913
4991
|
] }),
|
|
4914
|
-
/* @__PURE__ */
|
|
4992
|
+
/* @__PURE__ */ jsxs16(Text16, { dimColor: true, children: [
|
|
4915
4993
|
" ",
|
|
4916
4994
|
config.email
|
|
4917
4995
|
] })
|
|
4918
4996
|
] }, config.siteUrl + config.email);
|
|
4919
4997
|
}),
|
|
4920
|
-
/* @__PURE__ */
|
|
4921
|
-
|
|
4998
|
+
/* @__PURE__ */ jsx18(Box16, { children: /* @__PURE__ */ jsxs16(
|
|
4999
|
+
Text16,
|
|
4922
5000
|
{
|
|
4923
5001
|
color: selectedExisting === existingConfigs.length ? "yellow" : void 0,
|
|
4924
5002
|
bold: selectedExisting === existingConfigs.length,
|
|
@@ -4929,44 +5007,44 @@ function ConfigureJiraSiteModal({
|
|
|
4929
5007
|
}
|
|
4930
5008
|
) })
|
|
4931
5009
|
] }) }),
|
|
4932
|
-
loading && /* @__PURE__ */
|
|
5010
|
+
loading && /* @__PURE__ */ jsx18(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text16, { color: "yellow", children: "Validating credentials..." }) })
|
|
4933
5011
|
] });
|
|
4934
5012
|
}
|
|
4935
|
-
return /* @__PURE__ */
|
|
4936
|
-
/* @__PURE__ */
|
|
4937
|
-
/* @__PURE__ */
|
|
5013
|
+
return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, paddingY: 1, children: [
|
|
5014
|
+
/* @__PURE__ */ jsx18(Text16, { bold: true, color: "cyan", children: "Configure Jira Site" }),
|
|
5015
|
+
/* @__PURE__ */ jsxs16(Text16, { dimColor: true, children: [
|
|
4938
5016
|
"Up/Down to select, Enter to edit, Esc to ",
|
|
4939
5017
|
hasExisting ? "go back" : "cancel"
|
|
4940
5018
|
] }),
|
|
4941
|
-
/* @__PURE__ */
|
|
4942
|
-
error && /* @__PURE__ */
|
|
5019
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1 }),
|
|
5020
|
+
error && /* @__PURE__ */ jsx18(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsx18(Text16, { color: "red", children: error }) }),
|
|
4943
5021
|
renderItem("siteUrl", "Site URL (e.g., https://company.atlassian.net)", siteUrl),
|
|
4944
|
-
/* @__PURE__ */
|
|
5022
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1 }),
|
|
4945
5023
|
renderItem("email", "Email", email),
|
|
4946
|
-
/* @__PURE__ */
|
|
5024
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1 }),
|
|
4947
5025
|
renderItem("apiToken", "API Token", apiToken, true),
|
|
4948
|
-
/* @__PURE__ */
|
|
4949
|
-
/* @__PURE__ */
|
|
5026
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1 }),
|
|
5027
|
+
/* @__PURE__ */ jsx18(Box16, { children: /* @__PURE__ */ jsxs16(Text16, { color: selectedItem === "submit" ? "green" : void 0, bold: selectedItem === "submit", children: [
|
|
4950
5028
|
selectedItem === "submit" ? "> " : " ",
|
|
4951
5029
|
canSubmit ? "[Save Configuration]" : "[Fill all fields first]"
|
|
4952
5030
|
] }) }),
|
|
4953
|
-
loading && /* @__PURE__ */
|
|
4954
|
-
/* @__PURE__ */
|
|
5031
|
+
loading && /* @__PURE__ */ jsx18(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text16, { color: "yellow", children: "Validating credentials..." }) }),
|
|
5032
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text16, { dimColor: true, children: "Get your API token from: https://id.atlassian.com/manage-profile/security/api-tokens" }) })
|
|
4955
5033
|
] });
|
|
4956
5034
|
}
|
|
4957
5035
|
|
|
4958
5036
|
// src/components/jira/TicketItem.tsx
|
|
4959
|
-
import { Box as
|
|
4960
|
-
import { jsx as
|
|
5037
|
+
import { Box as Box17, Text as Text17 } from "ink";
|
|
5038
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4961
5039
|
function TicketItem({ ticketKey, summary, status, isHighlighted, isSelected }) {
|
|
4962
5040
|
const prefix = isHighlighted ? "> " : isSelected ? "\u25CF " : " ";
|
|
4963
5041
|
const textColor = isSelected ? "green" : void 0;
|
|
4964
|
-
return /* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ jsx19(Box17, { children: /* @__PURE__ */ jsxs17(Text17, { color: textColor, children: [
|
|
4965
5043
|
prefix,
|
|
4966
|
-
/* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ jsx19(Text17, { bold: true, color: "blue", children: ticketKey }),
|
|
4967
5045
|
" ",
|
|
4968
5046
|
summary,
|
|
4969
|
-
status && /* @__PURE__ */
|
|
5047
|
+
status && /* @__PURE__ */ jsxs17(Text17, { dimColor: true, children: [
|
|
4970
5048
|
" [",
|
|
4971
5049
|
status,
|
|
4972
5050
|
"]"
|
|
@@ -4975,7 +5053,7 @@ function TicketItem({ ticketKey, summary, status, isHighlighted, isSelected }) {
|
|
|
4975
5053
|
}
|
|
4976
5054
|
|
|
4977
5055
|
// src/components/jira/JiraView.tsx
|
|
4978
|
-
import { jsx as
|
|
5056
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4979
5057
|
function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated }) {
|
|
4980
5058
|
const repo = useGitRepo();
|
|
4981
5059
|
const jira = useJiraTickets();
|
|
@@ -5073,13 +5151,13 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
5073
5151
|
{ isActive: isActive && !modal.isOpen }
|
|
5074
5152
|
);
|
|
5075
5153
|
if (repo.isRepo === false) {
|
|
5076
|
-
return /* @__PURE__ */
|
|
5154
|
+
return /* @__PURE__ */ jsx20(TitledBox6, { borderStyle: "round", titles: ["Jira"], flexShrink: 0, children: /* @__PURE__ */ jsx20(Text18, { color: "red", children: "Not a git repository" }) });
|
|
5077
5155
|
}
|
|
5078
5156
|
if (modal.type === "configure") {
|
|
5079
5157
|
const siteUrl = repo.repoPath ? getJiraSiteUrl(repo.repoPath) : void 0;
|
|
5080
5158
|
const creds = repo.repoPath ? getJiraCredentials(repo.repoPath) : { email: null, apiToken: null };
|
|
5081
5159
|
const existingConfigs = getExistingJiraConfigs(repo.repoPath ?? void 0);
|
|
5082
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx20(
|
|
5083
5161
|
ConfigureJiraSiteModal,
|
|
5084
5162
|
{
|
|
5085
5163
|
initialSiteUrl: siteUrl ?? void 0,
|
|
@@ -5096,7 +5174,7 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
5096
5174
|
) });
|
|
5097
5175
|
}
|
|
5098
5176
|
if (modal.type === "link") {
|
|
5099
|
-
return /* @__PURE__ */
|
|
5177
|
+
return /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx20(
|
|
5100
5178
|
LinkTicketModal,
|
|
5101
5179
|
{
|
|
5102
5180
|
onSubmit: handleLinkSubmit,
|
|
@@ -5110,7 +5188,7 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
5110
5188
|
) });
|
|
5111
5189
|
}
|
|
5112
5190
|
if (modal.type === "status" && repo.repoPath && repo.currentBranch && currentTicket) {
|
|
5113
|
-
return /* @__PURE__ */
|
|
5191
|
+
return /* @__PURE__ */ jsx20(Box18, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ jsx20(
|
|
5114
5192
|
ChangeStatusModal,
|
|
5115
5193
|
{
|
|
5116
5194
|
repoPath: repo.repoPath,
|
|
@@ -5123,10 +5201,10 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
5123
5201
|
}
|
|
5124
5202
|
const title = "[4] Jira";
|
|
5125
5203
|
const borderColor = isActive ? "yellow" : void 0;
|
|
5126
|
-
return /* @__PURE__ */
|
|
5127
|
-
jira.jiraState === "not_configured" && /* @__PURE__ */
|
|
5128
|
-
jira.jiraState === "no_tickets" && /* @__PURE__ */
|
|
5129
|
-
jira.jiraState === "has_tickets" && jira.tickets.map((ticket, idx) => /* @__PURE__ */
|
|
5204
|
+
return /* @__PURE__ */ jsx20(TitledBox6, { borderStyle: "round", titles: [title], borderColor, flexShrink: 0, children: /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", paddingX: 1, children: [
|
|
5205
|
+
jira.jiraState === "not_configured" && /* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "No Jira site configured" }),
|
|
5206
|
+
jira.jiraState === "no_tickets" && /* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "No tickets linked to this branch" }),
|
|
5207
|
+
jira.jiraState === "has_tickets" && jira.tickets.map((ticket, idx) => /* @__PURE__ */ jsx20(
|
|
5130
5208
|
TicketItem,
|
|
5131
5209
|
{
|
|
5132
5210
|
ticketKey: ticket.key,
|
|
@@ -5141,15 +5219,15 @@ function JiraView({ isActive, onModalChange, onJiraStateChange, onLogUpdated })
|
|
|
5141
5219
|
|
|
5142
5220
|
// src/components/logs/LogsView.tsx
|
|
5143
5221
|
import { useEffect as useEffect17 } from "react";
|
|
5144
|
-
import { Box as
|
|
5222
|
+
import { Box as Box21, useInput as useInput17 } from "ink";
|
|
5145
5223
|
|
|
5146
5224
|
// src/components/logs/LogViewerBox.tsx
|
|
5147
5225
|
import { useEffect as useEffect16, useRef as useRef9, useState as useState21 } from "react";
|
|
5148
5226
|
import { TitledBox as TitledBox7 } from "@mishieck/ink-titled-box";
|
|
5149
|
-
import { Box as
|
|
5227
|
+
import { Box as Box19, Text as Text19, useInput as useInput15 } from "ink";
|
|
5150
5228
|
import { ScrollView as ScrollView9 } from "ink-scroll-view";
|
|
5151
5229
|
import TextInput2 from "ink-text-input";
|
|
5152
|
-
import { jsx as
|
|
5230
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5153
5231
|
function LogViewerBox({ date, content, isActive, onRefresh, onLogCreated }) {
|
|
5154
5232
|
const scrollRef = useRef9(null);
|
|
5155
5233
|
const [isInputMode, setIsInputMode] = useState21(false);
|
|
@@ -5245,14 +5323,14 @@ ${value.trim()}
|
|
|
5245
5323
|
setIsInputMode(false);
|
|
5246
5324
|
onRefresh();
|
|
5247
5325
|
};
|
|
5248
|
-
return /* @__PURE__ */
|
|
5249
|
-
/* @__PURE__ */
|
|
5250
|
-
!date && /* @__PURE__ */
|
|
5251
|
-
date && content === null && /* @__PURE__ */
|
|
5252
|
-
date && content !== null && content.trim() === "" && /* @__PURE__ */
|
|
5253
|
-
date && content && content.trim() !== "" && /* @__PURE__ */
|
|
5326
|
+
return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", flexGrow: 1, children: [
|
|
5327
|
+
/* @__PURE__ */ jsx21(TitledBox7, { borderStyle: "round", titles: [displayTitle], borderColor, flexGrow: 1, children: /* @__PURE__ */ jsx21(Box19, { flexDirection: "column", flexGrow: 1, children: /* @__PURE__ */ jsx21(ScrollView9, { ref: scrollRef, children: /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", paddingX: 1, children: [
|
|
5328
|
+
!date && /* @__PURE__ */ jsx21(Text19, { dimColor: true, children: "Select a log file to view" }),
|
|
5329
|
+
date && content === null && /* @__PURE__ */ jsx21(Text19, { dimColor: true, children: "Log file not found" }),
|
|
5330
|
+
date && content !== null && content.trim() === "" && /* @__PURE__ */ jsx21(Text19, { dimColor: true, children: "Empty log file" }),
|
|
5331
|
+
date && content && content.trim() !== "" && /* @__PURE__ */ jsx21(Markdown, { children: content })
|
|
5254
5332
|
] }) }) }) }),
|
|
5255
|
-
isInputMode && /* @__PURE__ */
|
|
5333
|
+
isInputMode && /* @__PURE__ */ jsx21(TitledBox7, { borderStyle: "round", titles: ["Add Entry"], borderColor: "yellow", children: /* @__PURE__ */ jsx21(Box19, { paddingX: 1, children: /* @__PURE__ */ jsx21(
|
|
5256
5334
|
TextInput2,
|
|
5257
5335
|
{
|
|
5258
5336
|
value: inputValue,
|
|
@@ -5260,19 +5338,19 @@ ${value.trim()}
|
|
|
5260
5338
|
onSubmit: handleInputSubmit
|
|
5261
5339
|
}
|
|
5262
5340
|
) }) }),
|
|
5263
|
-
isGeneratingStandup && /* @__PURE__ */
|
|
5264
|
-
/* @__PURE__ */
|
|
5265
|
-
/* @__PURE__ */
|
|
5341
|
+
isGeneratingStandup && /* @__PURE__ */ jsx21(TitledBox7, { borderStyle: "round", titles: ["Standup Notes"], borderColor: "yellow", children: /* @__PURE__ */ jsxs19(Box19, { paddingX: 1, flexDirection: "column", children: [
|
|
5342
|
+
/* @__PURE__ */ jsx21(AnimatedText, { name: "radar", config: { baseColor: "#CC6600" }, children: "Generating standup notes with Claude..." }),
|
|
5343
|
+
/* @__PURE__ */ jsx21(Text19, { dimColor: true, children: "Press Esc to cancel" })
|
|
5266
5344
|
] }) }),
|
|
5267
|
-
standupResult && /* @__PURE__ */
|
|
5345
|
+
standupResult && /* @__PURE__ */ jsx21(
|
|
5268
5346
|
TitledBox7,
|
|
5269
5347
|
{
|
|
5270
5348
|
borderStyle: "round",
|
|
5271
5349
|
titles: ["Standup Notes"],
|
|
5272
5350
|
borderColor: standupResult.type === "error" ? "red" : "green",
|
|
5273
|
-
children: /* @__PURE__ */
|
|
5274
|
-
standupResult.type === "error" ? /* @__PURE__ */
|
|
5275
|
-
/* @__PURE__ */
|
|
5351
|
+
children: /* @__PURE__ */ jsxs19(Box19, { paddingX: 1, flexDirection: "column", children: [
|
|
5352
|
+
standupResult.type === "error" ? /* @__PURE__ */ jsx21(Text19, { color: "red", children: standupResult.message }) : /* @__PURE__ */ jsx21(Markdown, { children: standupResult.message }),
|
|
5353
|
+
/* @__PURE__ */ jsx21(Text19, { dimColor: true, children: "Press Esc to dismiss" })
|
|
5276
5354
|
] })
|
|
5277
5355
|
}
|
|
5278
5356
|
)
|
|
@@ -5281,9 +5359,9 @@ ${value.trim()}
|
|
|
5281
5359
|
|
|
5282
5360
|
// src/components/logs/LogsHistoryBox.tsx
|
|
5283
5361
|
import { TitledBox as TitledBox8 } from "@mishieck/ink-titled-box";
|
|
5284
|
-
import { Box as
|
|
5362
|
+
import { Box as Box20, Text as Text20, useInput as useInput16 } from "ink";
|
|
5285
5363
|
import { ScrollView as ScrollView10 } from "ink-scroll-view";
|
|
5286
|
-
import { jsx as
|
|
5364
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5287
5365
|
function LogsHistoryBox({
|
|
5288
5366
|
logFiles,
|
|
5289
5367
|
selectedDate,
|
|
@@ -5313,28 +5391,28 @@ function LogsHistoryBox({
|
|
|
5313
5391
|
},
|
|
5314
5392
|
{ isActive }
|
|
5315
5393
|
);
|
|
5316
|
-
return /* @__PURE__ */
|
|
5317
|
-
logFiles.length === 0 && /* @__PURE__ */
|
|
5318
|
-
logFiles.length > 0 && /* @__PURE__ */
|
|
5394
|
+
return /* @__PURE__ */ jsx22(TitledBox8, { borderStyle: "round", titles: [title], borderColor, height: 5, children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
5395
|
+
logFiles.length === 0 && /* @__PURE__ */ jsx22(Text20, { dimColor: true, children: "No logs yet" }),
|
|
5396
|
+
logFiles.length > 0 && /* @__PURE__ */ jsx22(ScrollView10, { ref: scrollRef, children: logFiles.map((file, idx) => {
|
|
5319
5397
|
const isHighlighted = idx === highlightedIndex;
|
|
5320
5398
|
const isSelected = file.date === selectedDate;
|
|
5321
5399
|
const cursor = isHighlighted ? ">" : " ";
|
|
5322
5400
|
const indicator = isSelected ? " *" : "";
|
|
5323
|
-
return /* @__PURE__ */
|
|
5324
|
-
/* @__PURE__ */
|
|
5401
|
+
return /* @__PURE__ */ jsxs20(Box20, { children: [
|
|
5402
|
+
/* @__PURE__ */ jsxs20(Text20, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
5325
5403
|
cursor,
|
|
5326
5404
|
" "
|
|
5327
5405
|
] }),
|
|
5328
|
-
/* @__PURE__ */
|
|
5329
|
-
file.isToday && /* @__PURE__ */
|
|
5330
|
-
/* @__PURE__ */
|
|
5406
|
+
/* @__PURE__ */ jsx22(Text20, { color: file.isToday ? "green" : void 0, bold: file.isToday, children: file.date }),
|
|
5407
|
+
file.isToday && /* @__PURE__ */ jsx22(Text20, { color: "green", children: " (today)" }),
|
|
5408
|
+
/* @__PURE__ */ jsx22(Text20, { dimColor: true, children: indicator })
|
|
5331
5409
|
] }, file.date);
|
|
5332
5410
|
}) })
|
|
5333
5411
|
] }) });
|
|
5334
5412
|
}
|
|
5335
5413
|
|
|
5336
5414
|
// src/components/logs/LogsView.tsx
|
|
5337
|
-
import { jsx as
|
|
5415
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5338
5416
|
function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
5339
5417
|
const logs = useLogs();
|
|
5340
5418
|
useEffect17(() => {
|
|
@@ -5349,8 +5427,8 @@ function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
|
5349
5427
|
},
|
|
5350
5428
|
{ isActive }
|
|
5351
5429
|
);
|
|
5352
|
-
return /* @__PURE__ */
|
|
5353
|
-
/* @__PURE__ */
|
|
5430
|
+
return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", flexGrow: 1, children: [
|
|
5431
|
+
/* @__PURE__ */ jsx23(
|
|
5354
5432
|
LogsHistoryBox,
|
|
5355
5433
|
{
|
|
5356
5434
|
logFiles: logs.logFiles,
|
|
@@ -5361,7 +5439,7 @@ function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
|
5361
5439
|
isActive: isActive && focusedBox === "history"
|
|
5362
5440
|
}
|
|
5363
5441
|
),
|
|
5364
|
-
/* @__PURE__ */
|
|
5442
|
+
/* @__PURE__ */ jsx23(
|
|
5365
5443
|
LogViewerBox,
|
|
5366
5444
|
{
|
|
5367
5445
|
date: logs.selectedDate,
|
|
@@ -5377,8 +5455,7 @@ function LogsView({ isActive, refreshKey, focusedBox, onFocusedBoxChange }) {
|
|
|
5377
5455
|
// src/components/pull-requests/AllPullRequestsView.tsx
|
|
5378
5456
|
import open6 from "open";
|
|
5379
5457
|
import { useCallback as useCallback11, useEffect as useEffect18, useState as useState22 } from "react";
|
|
5380
|
-
import {
|
|
5381
|
-
import { Box as Box21, Text as Text20, useInput as useInput18 } from "ink";
|
|
5458
|
+
import { Box as Box22, Text as Text21, useInput as useInput18 } from "ink";
|
|
5382
5459
|
import { ScrollView as ScrollView11 } from "ink-scroll-view";
|
|
5383
5460
|
import Spinner4 from "ink-spinner";
|
|
5384
5461
|
|
|
@@ -5433,7 +5510,7 @@ async function checkoutPR(prNumber, repo) {
|
|
|
5433
5510
|
}
|
|
5434
5511
|
|
|
5435
5512
|
// src/components/pull-requests/AllPullRequestsView.tsx
|
|
5436
|
-
import { Fragment as Fragment5, jsx as
|
|
5513
|
+
import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5437
5514
|
var STATE_CYCLE = ["open", "closed", "all"];
|
|
5438
5515
|
function computeOverallCheck(checks) {
|
|
5439
5516
|
if (!checks || checks.length === 0) return null;
|
|
@@ -5542,6 +5619,7 @@ function AllPullRequestsView({ isActive, onModalChange }) {
|
|
|
5542
5619
|
setSearchText(newSearch);
|
|
5543
5620
|
setLimit(30);
|
|
5544
5621
|
doFetch(stateFilter, newSearch);
|
|
5622
|
+
duckEvents.emit("pr:filtered");
|
|
5545
5623
|
}
|
|
5546
5624
|
return;
|
|
5547
5625
|
}
|
|
@@ -5569,6 +5647,7 @@ function AllPullRequestsView({ isActive, onModalChange }) {
|
|
|
5569
5647
|
setStateFilter(newState);
|
|
5570
5648
|
setLimit(30);
|
|
5571
5649
|
doFetch(newState, searchText);
|
|
5650
|
+
duckEvents.emit("pr:filtered");
|
|
5572
5651
|
return;
|
|
5573
5652
|
}
|
|
5574
5653
|
if (input === "x") {
|
|
@@ -5618,6 +5697,7 @@ function AllPullRequestsView({ isActive, onModalChange }) {
|
|
|
5618
5697
|
setCheckoutLoading(false);
|
|
5619
5698
|
if (result.success) {
|
|
5620
5699
|
setCheckoutResult({ success: true, message: `Checked out #${detailPR.number}` });
|
|
5700
|
+
duckEvents.emit("pr:checkout", { prNumber: detailPR.number, prTitle: detailPR.title });
|
|
5621
5701
|
repo.refreshBranch();
|
|
5622
5702
|
} else {
|
|
5623
5703
|
setCheckoutResult({ success: false, message: result.error });
|
|
@@ -5631,6 +5711,7 @@ function AllPullRequestsView({ isActive, onModalChange }) {
|
|
|
5631
5711
|
if (stateFilter !== "open") filterParts.push(stateFilter);
|
|
5632
5712
|
if (searchText) filterParts.push(`"${searchText}"`);
|
|
5633
5713
|
const borderColor = isActive ? "yellow" : void 0;
|
|
5714
|
+
const scrollRatio = isActive && prs.length > 1 ? highlightedIndex / (prs.length - 1) : null;
|
|
5634
5715
|
const stateColor = (pr) => {
|
|
5635
5716
|
const display = resolveMergeDisplay({
|
|
5636
5717
|
state: pr.state,
|
|
@@ -5646,8 +5727,8 @@ function AllPullRequestsView({ isActive, onModalChange }) {
|
|
|
5646
5727
|
return "Open";
|
|
5647
5728
|
};
|
|
5648
5729
|
if (detailPR) {
|
|
5649
|
-
return /* @__PURE__ */
|
|
5650
|
-
/* @__PURE__ */
|
|
5730
|
+
return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", flexGrow: 1, children: [
|
|
5731
|
+
/* @__PURE__ */ jsx24(
|
|
5651
5732
|
PRDetailsBox,
|
|
5652
5733
|
{
|
|
5653
5734
|
pr: prDetails,
|
|
@@ -5657,88 +5738,90 @@ function AllPullRequestsView({ isActive, onModalChange }) {
|
|
|
5657
5738
|
title: "[5] Pull Requests"
|
|
5658
5739
|
}
|
|
5659
5740
|
),
|
|
5660
|
-
checkoutLoading ? /* @__PURE__ */
|
|
5741
|
+
checkoutLoading ? /* @__PURE__ */ jsxs22(Text21, { color: "yellow", children: [
|
|
5661
5742
|
" ",
|
|
5662
|
-
/* @__PURE__ */
|
|
5743
|
+
/* @__PURE__ */ jsx24(Spinner4, { type: "dots" }),
|
|
5663
5744
|
" Checking out..."
|
|
5664
|
-
] }) : checkoutResult ? /* @__PURE__ */
|
|
5745
|
+
] }) : checkoutResult ? /* @__PURE__ */ jsxs22(Text21, { color: checkoutResult.success ? "green" : "red", children: [
|
|
5665
5746
|
" ",
|
|
5666
5747
|
checkoutResult.message
|
|
5667
|
-
] }) : /* @__PURE__ */
|
|
5748
|
+
] }) : /* @__PURE__ */ jsx24(Text21, { dimColor: true, children: " Esc back \xB7 j/k scroll \xB7 o open \xB7 y copy \xB7 c checkout" })
|
|
5668
5749
|
] });
|
|
5669
5750
|
}
|
|
5670
|
-
return /* @__PURE__ */
|
|
5671
|
-
(isSearching || hasActiveFilters) && /* @__PURE__ */
|
|
5672
|
-
/* @__PURE__ */
|
|
5673
|
-
isSearching ? /* @__PURE__ */
|
|
5674
|
-
/* @__PURE__ */
|
|
5675
|
-
/* @__PURE__ */
|
|
5676
|
-
] }) : /* @__PURE__ */
|
|
5677
|
-
/* @__PURE__ */
|
|
5678
|
-
/* @__PURE__ */
|
|
5751
|
+
return /* @__PURE__ */ jsx24(TitledBox4, { title: "[5] Pull Requests", borderColor, scrollRatio, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", paddingX: 1, flexGrow: 1, flexBasis: 0, overflow: "hidden", children: [
|
|
5752
|
+
(isSearching || hasActiveFilters) && /* @__PURE__ */ jsxs22(Box22, { children: [
|
|
5753
|
+
/* @__PURE__ */ jsx24(Text21, { color: "blue", children: "Filter: " }),
|
|
5754
|
+
isSearching ? /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
5755
|
+
/* @__PURE__ */ jsx24(Text21, { children: inputText }),
|
|
5756
|
+
/* @__PURE__ */ jsx24(Text21, { backgroundColor: "yellow", children: " " })
|
|
5757
|
+
] }) : /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
5758
|
+
/* @__PURE__ */ jsx24(Text21, { children: filterParts.join(" + ") }),
|
|
5759
|
+
/* @__PURE__ */ jsxs22(Text21, { dimColor: true, children: [
|
|
5679
5760
|
" (",
|
|
5680
5761
|
prs.length,
|
|
5681
5762
|
")"
|
|
5682
5763
|
] })
|
|
5683
5764
|
] })
|
|
5684
5765
|
] }),
|
|
5685
|
-
loading && /* @__PURE__ */
|
|
5686
|
-
/* @__PURE__ */
|
|
5687
|
-
" Loading PRs
|
|
5766
|
+
loading && /* @__PURE__ */ jsxs22(Text21, { color: "yellow", children: [
|
|
5767
|
+
/* @__PURE__ */ jsx24(Spinner4, { type: "dots" }),
|
|
5768
|
+
" Loading PRs 1-",
|
|
5769
|
+
limit,
|
|
5770
|
+
"..."
|
|
5688
5771
|
] }),
|
|
5689
|
-
error && /* @__PURE__ */
|
|
5690
|
-
!loading && !error && prs.length === 0 && /* @__PURE__ */
|
|
5691
|
-
!loading && !error && prs.length > 0 && /* @__PURE__ */
|
|
5772
|
+
error && /* @__PURE__ */ jsx24(Text21, { color: "red", children: error }),
|
|
5773
|
+
!loading && !error && prs.length === 0 && /* @__PURE__ */ jsx24(Text21, { dimColor: true, children: hasActiveFilters ? "No PRs match filter" : "No open PRs" }),
|
|
5774
|
+
!loading && !error && prs.length > 0 && /* @__PURE__ */ jsx24(Box22, { flexGrow: 1, flexBasis: 0, overflow: "hidden", children: /* @__PURE__ */ jsx24(ScrollView11, { ref: scrollRef, children: prs.map((pr, idx) => {
|
|
5692
5775
|
const isHighlighted = isActive && idx === highlightedIndex;
|
|
5693
5776
|
const cursor = isHighlighted ? ">" : " ";
|
|
5694
5777
|
const review = resolveReviewDisplay(pr.reviewDecision);
|
|
5695
5778
|
const overallCheck = computeOverallCheck(pr.statusCheckRollup);
|
|
5696
|
-
return /* @__PURE__ */
|
|
5697
|
-
/* @__PURE__ */
|
|
5698
|
-
/* @__PURE__ */
|
|
5779
|
+
return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", children: [
|
|
5780
|
+
/* @__PURE__ */ jsxs22(Box22, { children: [
|
|
5781
|
+
/* @__PURE__ */ jsxs22(Text21, { color: isHighlighted ? "yellow" : void 0, children: [
|
|
5699
5782
|
cursor,
|
|
5700
5783
|
" "
|
|
5701
5784
|
] }),
|
|
5702
|
-
/* @__PURE__ */
|
|
5785
|
+
/* @__PURE__ */ jsxs22(Text21, { children: [
|
|
5703
5786
|
"#",
|
|
5704
5787
|
pr.number
|
|
5705
5788
|
] }),
|
|
5706
|
-
/* @__PURE__ */
|
|
5789
|
+
/* @__PURE__ */ jsxs22(Text21, { children: [
|
|
5707
5790
|
" ",
|
|
5708
5791
|
pr.title,
|
|
5709
5792
|
" "
|
|
5710
5793
|
] }),
|
|
5711
|
-
(pr.state !== "OPEN" || pr.isDraft) && /* @__PURE__ */
|
|
5794
|
+
(pr.state !== "OPEN" || pr.isDraft) && /* @__PURE__ */ jsxs22(Text21, { color: stateColor(pr), children: [
|
|
5712
5795
|
"[",
|
|
5713
5796
|
stateLabel(pr),
|
|
5714
5797
|
"]"
|
|
5715
5798
|
] })
|
|
5716
5799
|
] }),
|
|
5717
|
-
/* @__PURE__ */
|
|
5718
|
-
/* @__PURE__ */
|
|
5719
|
-
/* @__PURE__ */
|
|
5800
|
+
/* @__PURE__ */ jsxs22(Box22, { children: [
|
|
5801
|
+
/* @__PURE__ */ jsx24(Text21, { children: " " }),
|
|
5802
|
+
/* @__PURE__ */ jsxs22(Text21, { dimColor: true, children: [
|
|
5720
5803
|
" ",
|
|
5721
5804
|
pr.author.login,
|
|
5722
5805
|
" \xB7 ",
|
|
5723
5806
|
timeAgo(pr.createdAt)
|
|
5724
5807
|
] }),
|
|
5725
|
-
pr.reviewDecision && /* @__PURE__ */
|
|
5808
|
+
pr.reviewDecision && /* @__PURE__ */ jsxs22(Text21, { dimColor: true, children: [
|
|
5726
5809
|
" \xB7 ",
|
|
5727
5810
|
review.text
|
|
5728
5811
|
] }),
|
|
5729
|
-
overallCheck && /* @__PURE__ */
|
|
5812
|
+
overallCheck && /* @__PURE__ */ jsxs22(Text21, { color: CHECK_COLORS[overallCheck], children: [
|
|
5730
5813
|
" ",
|
|
5731
5814
|
CHECK_ICONS[overallCheck]
|
|
5732
5815
|
] })
|
|
5733
5816
|
] })
|
|
5734
5817
|
] }, pr.number);
|
|
5735
|
-
}) })
|
|
5736
|
-
] }) })
|
|
5818
|
+
}) }) })
|
|
5819
|
+
] }) });
|
|
5737
5820
|
}
|
|
5738
5821
|
|
|
5739
5822
|
// src/components/ui/KeybindingsBar.tsx
|
|
5740
|
-
import { Box as
|
|
5741
|
-
import { jsx as
|
|
5823
|
+
import { Box as Box23, Text as Text22 } from "ink";
|
|
5824
|
+
import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5742
5825
|
var globalBindings = [
|
|
5743
5826
|
{ key: "1-4", label: "Focus" },
|
|
5744
5827
|
{ key: "Tab", label: "Switch Tab" },
|
|
@@ -5749,14 +5832,14 @@ var modalBindings = [{ key: "Esc", label: "Cancel" }];
|
|
|
5749
5832
|
var DUCK_ASCII = "<(')___";
|
|
5750
5833
|
function KeybindingsBar({ contextBindings = [], modalOpen = false, duck }) {
|
|
5751
5834
|
const allBindings = modalOpen ? [...contextBindings, ...modalBindings] : [...contextBindings, ...globalBindings];
|
|
5752
|
-
return /* @__PURE__ */
|
|
5753
|
-
allBindings.map((binding) => /* @__PURE__ */
|
|
5754
|
-
/* @__PURE__ */
|
|
5755
|
-
/* @__PURE__ */
|
|
5835
|
+
return /* @__PURE__ */ jsxs23(Box23, { flexShrink: 0, paddingX: 1, gap: 2, children: [
|
|
5836
|
+
allBindings.map((binding) => /* @__PURE__ */ jsxs23(Box23, { gap: 1, children: [
|
|
5837
|
+
/* @__PURE__ */ jsx25(Text22, { bold: true, color: binding.color ?? "yellow", children: binding.key }),
|
|
5838
|
+
/* @__PURE__ */ jsx25(Text22, { dimColor: true, children: binding.label })
|
|
5756
5839
|
] }, binding.key)),
|
|
5757
|
-
(duck == null ? void 0 : duck.visible) && /* @__PURE__ */
|
|
5758
|
-
/* @__PURE__ */
|
|
5759
|
-
/* @__PURE__ */
|
|
5840
|
+
(duck == null ? void 0 : duck.visible) && /* @__PURE__ */ jsxs23(Box23, { flexGrow: 1, justifyContent: "flex-end", gap: 1, children: [
|
|
5841
|
+
/* @__PURE__ */ jsx25(Text22, { children: DUCK_ASCII }),
|
|
5842
|
+
/* @__PURE__ */ jsx25(Text22, { dimColor: true, children: duck.message })
|
|
5760
5843
|
] })
|
|
5761
5844
|
] });
|
|
5762
5845
|
}
|
|
@@ -5869,7 +5952,7 @@ function computeKeybindings(focusedView, state) {
|
|
|
5869
5952
|
}
|
|
5870
5953
|
|
|
5871
5954
|
// src/app.tsx
|
|
5872
|
-
import { jsx as
|
|
5955
|
+
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5873
5956
|
function App() {
|
|
5874
5957
|
const { exit } = useApp();
|
|
5875
5958
|
const [focusedView, setFocusedView] = useState23("github");
|
|
@@ -5945,17 +6028,17 @@ function App() {
|
|
|
5945
6028
|
},
|
|
5946
6029
|
{ isActive: !anyModalOpen }
|
|
5947
6030
|
);
|
|
5948
|
-
return /* @__PURE__ */
|
|
5949
|
-
/* @__PURE__ */
|
|
5950
|
-
/* @__PURE__ */
|
|
5951
|
-
/* @__PURE__ */
|
|
5952
|
-
/* @__PURE__ */
|
|
5953
|
-
COLUMN2_TABS.map((tab) => /* @__PURE__ */
|
|
6031
|
+
return /* @__PURE__ */ jsxs24(Box24, { flexGrow: 1, flexDirection: "column", overflow: "hidden", children: [
|
|
6032
|
+
/* @__PURE__ */ jsxs24(Box24, { height: 1, flexDirection: "row", columnGap: 1, children: [
|
|
6033
|
+
/* @__PURE__ */ jsx26(Box24, { flexGrow: 1, paddingX: 1, flexBasis: 0, children: /* @__PURE__ */ jsx26(Text23, { color: "gray", children: "Current branch" }) }),
|
|
6034
|
+
/* @__PURE__ */ jsxs24(Box24, { flexGrow: 1, gap: 1, flexBasis: 0, children: [
|
|
6035
|
+
/* @__PURE__ */ jsx26(Text23, { color: "gray", children: "Dashboards" }),
|
|
6036
|
+
COLUMN2_TABS.map((tab) => /* @__PURE__ */ jsx26(Text23, { bold: true, dimColor: activeTab !== tab.id, children: tab.label }, tab.id))
|
|
5954
6037
|
] })
|
|
5955
6038
|
] }),
|
|
5956
|
-
/* @__PURE__ */
|
|
5957
|
-
/* @__PURE__ */
|
|
5958
|
-
/* @__PURE__ */
|
|
6039
|
+
/* @__PURE__ */ jsxs24(Box24, { flexGrow: 1, flexDirection: "row", columnGap: 1, children: [
|
|
6040
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", flexGrow: 1, flexBasis: 0, children: [
|
|
6041
|
+
/* @__PURE__ */ jsx26(
|
|
5959
6042
|
GitHubView,
|
|
5960
6043
|
{
|
|
5961
6044
|
isActive: focusedView === "github",
|
|
@@ -5963,7 +6046,7 @@ function App() {
|
|
|
5963
6046
|
onLogUpdated: handleLogUpdated
|
|
5964
6047
|
}
|
|
5965
6048
|
),
|
|
5966
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsx26(
|
|
5967
6050
|
JiraView,
|
|
5968
6051
|
{
|
|
5969
6052
|
isActive: focusedView === "jira",
|
|
@@ -5973,8 +6056,8 @@ function App() {
|
|
|
5973
6056
|
}
|
|
5974
6057
|
)
|
|
5975
6058
|
] }),
|
|
5976
|
-
/* @__PURE__ */
|
|
5977
|
-
activeTab === "logs" && /* @__PURE__ */
|
|
6059
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", flexGrow: 1, flexBasis: 0, children: [
|
|
6060
|
+
activeTab === "logs" && /* @__PURE__ */ jsx26(
|
|
5978
6061
|
LogsView,
|
|
5979
6062
|
{
|
|
5980
6063
|
isActive: focusedView === "logs",
|
|
@@ -5983,7 +6066,7 @@ function App() {
|
|
|
5983
6066
|
onFocusedBoxChange: setLogsFocusedBox
|
|
5984
6067
|
}
|
|
5985
6068
|
),
|
|
5986
|
-
activeTab === "jira-browser" && /* @__PURE__ */
|
|
6069
|
+
activeTab === "jira-browser" && /* @__PURE__ */ jsx26(
|
|
5987
6070
|
JiraBrowserView,
|
|
5988
6071
|
{
|
|
5989
6072
|
isActive: focusedView === "jira-browser",
|
|
@@ -5993,10 +6076,10 @@ function App() {
|
|
|
5993
6076
|
onLogUpdated: handleLogUpdated
|
|
5994
6077
|
}
|
|
5995
6078
|
),
|
|
5996
|
-
activeTab === "pull-requests" && /* @__PURE__ */
|
|
6079
|
+
activeTab === "pull-requests" && /* @__PURE__ */ jsx26(AllPullRequestsView, { isActive: focusedView === "pull-requests", onModalChange: setPullRequestsModalOpen })
|
|
5997
6080
|
] })
|
|
5998
6081
|
] }),
|
|
5999
|
-
/* @__PURE__ */
|
|
6082
|
+
/* @__PURE__ */ jsx26(
|
|
6000
6083
|
KeybindingsBar,
|
|
6001
6084
|
{
|
|
6002
6085
|
contextBindings: keybindings,
|
|
@@ -6012,10 +6095,10 @@ import { render as inkRender } from "ink";
|
|
|
6012
6095
|
|
|
6013
6096
|
// src/lib/Screen.tsx
|
|
6014
6097
|
import { useCallback as useCallback13, useEffect as useEffect19, useState as useState24 } from "react";
|
|
6015
|
-
import { Box as
|
|
6016
|
-
import { jsx as
|
|
6098
|
+
import { Box as Box25, useStdout as useStdout3 } from "ink";
|
|
6099
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
6017
6100
|
function Screen({ children }) {
|
|
6018
|
-
const { stdout } =
|
|
6101
|
+
const { stdout } = useStdout3();
|
|
6019
6102
|
const getSize = useCallback13(() => ({ height: stdout.rows, width: stdout.columns }), [stdout]);
|
|
6020
6103
|
const [size, setSize] = useState24(getSize);
|
|
6021
6104
|
useEffect19(() => {
|
|
@@ -6025,17 +6108,17 @@ function Screen({ children }) {
|
|
|
6025
6108
|
stdout.off("resize", onResize);
|
|
6026
6109
|
};
|
|
6027
6110
|
}, [stdout, getSize]);
|
|
6028
|
-
return /* @__PURE__ */
|
|
6111
|
+
return /* @__PURE__ */ jsx27(Box25, { height: size.height, width: size.width, children });
|
|
6029
6112
|
}
|
|
6030
6113
|
|
|
6031
6114
|
// src/lib/render.tsx
|
|
6032
|
-
import { jsx as
|
|
6115
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
6033
6116
|
var ENTER_ALT_BUFFER = "\x1B[?1049h";
|
|
6034
6117
|
var EXIT_ALT_BUFFER = "\x1B[?1049l";
|
|
6035
6118
|
var CLEAR_SCREEN = "\x1B[2J\x1B[H";
|
|
6036
6119
|
function render(node, options) {
|
|
6037
6120
|
process.stdout.write(ENTER_ALT_BUFFER + CLEAR_SCREEN);
|
|
6038
|
-
const element = /* @__PURE__ */
|
|
6121
|
+
const element = /* @__PURE__ */ jsx28(Screen, { children: node });
|
|
6039
6122
|
const instance = inkRender(element, options);
|
|
6040
6123
|
setImmediate(() => instance.rerender(element));
|
|
6041
6124
|
const cleanup = () => process.stdout.write(EXIT_ALT_BUFFER);
|
|
@@ -6056,7 +6139,7 @@ function render(node, options) {
|
|
|
6056
6139
|
}
|
|
6057
6140
|
|
|
6058
6141
|
// src/cli.tsx
|
|
6059
|
-
import { jsx as
|
|
6142
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
6060
6143
|
var cli = meow(
|
|
6061
6144
|
`
|
|
6062
6145
|
Usage
|
|
@@ -6089,4 +6172,4 @@ if (cli.flags.cwd) {
|
|
|
6089
6172
|
process.exit(1);
|
|
6090
6173
|
}
|
|
6091
6174
|
}
|
|
6092
|
-
render(/* @__PURE__ */
|
|
6175
|
+
render(/* @__PURE__ */ jsx29(App, {}));
|