clairo 1.2.1 → 1.2.3
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 +28 -15
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -192,7 +192,7 @@ function timeAgo(dateStr) {
|
|
|
192
192
|
}
|
|
193
193
|
function resolveCheckStatus(check) {
|
|
194
194
|
const conclusion = check.conclusion ?? check.state;
|
|
195
|
-
if (conclusion === "SUCCESS"
|
|
195
|
+
if (conclusion === "SUCCESS") return "success";
|
|
196
196
|
if (conclusion === "FAILURE" || conclusion === "ERROR") return "failure";
|
|
197
197
|
if (conclusion === "SKIPPED" || conclusion === "NEUTRAL") return "skipped";
|
|
198
198
|
if (conclusion === "PENDING" || check.status === "IN_PROGRESS" || check.status === "QUEUED" || check.status === "WAITING")
|
|
@@ -209,18 +209,19 @@ var CHECK_ICONS = { success: "\u2713", failure: "\u2717", pending: "\u25CF", ski
|
|
|
209
209
|
var CHECK_SORT_ORDER = { failure: 0, pending: 1, skipped: 2, success: 3 };
|
|
210
210
|
function resolveReviewDisplay(reviewDecision) {
|
|
211
211
|
const status = reviewDecision ?? "PENDING";
|
|
212
|
-
if (status === "APPROVED") return { text:
|
|
213
|
-
if (status === "CHANGES_REQUESTED") return { text:
|
|
214
|
-
return { text:
|
|
212
|
+
if (status === "APPROVED") return { text: "Approved", color: "green" };
|
|
213
|
+
if (status === "CHANGES_REQUESTED") return { text: "Changes Requested", color: "red" };
|
|
214
|
+
if (status === "REVIEW_REQUIRED") return { text: "Review Required", color: "yellow" };
|
|
215
|
+
return { text: "Pending", color: "yellow" };
|
|
215
216
|
}
|
|
216
217
|
function resolveMergeDisplay(pr) {
|
|
217
|
-
if (!pr) return { text: "
|
|
218
|
-
if (pr.state === "MERGED") return { text: "
|
|
219
|
-
if (pr.state === "CLOSED") return { text: "
|
|
220
|
-
if (pr.isDraft) return { text: "
|
|
221
|
-
if (pr.mergeable === "MERGEABLE") return { text: "
|
|
222
|
-
if (pr.mergeable === "CONFLICTING") return { text: "
|
|
223
|
-
return { text:
|
|
218
|
+
if (!pr) return { text: "Unknown", color: "yellow" };
|
|
219
|
+
if (pr.state === "MERGED") return { text: "Merged", color: "magenta" };
|
|
220
|
+
if (pr.state === "CLOSED") return { text: "Closed", color: "red" };
|
|
221
|
+
if (pr.isDraft) return { text: "Draft", color: "yellow" };
|
|
222
|
+
if (pr.mergeable === "MERGEABLE") return { text: "Open", color: "green" };
|
|
223
|
+
if (pr.mergeable === "CONFLICTING") return { text: "Conflicts", color: "red" };
|
|
224
|
+
return { text: "Unknown", color: "yellow" };
|
|
224
225
|
}
|
|
225
226
|
async function isGhInstalled() {
|
|
226
227
|
try {
|
|
@@ -723,7 +724,7 @@ function generatePRContent() {
|
|
|
723
724
|
|
|
724
725
|
Rules:
|
|
725
726
|
- "title": a concise PR title in imperative mood, under 72 characters
|
|
726
|
-
- "body": a markdown PR description
|
|
727
|
+
- "body": a markdown PR description focusing on the motivation and what the PR achieves at a high level. Keep it concise \u2014 a short paragraph or two is ideal. Use bullet points only when there are genuinely distinct changes worth calling out separately. For larger PRs, organize with markdown sections (## headings) to break up the description.
|
|
727
728
|
- Do not include any text outside the JSON object
|
|
728
729
|
- Do not add any "Co-Authored-By" or attribution lines`;
|
|
729
730
|
return runClaudePrompt(prompt);
|
|
@@ -1338,7 +1339,11 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1338
1339
|
pr.deletions
|
|
1339
1340
|
] })
|
|
1340
1341
|
] }),
|
|
1341
|
-
(((_c = pr.labels) == null ? void 0 : _c.length) ?? 0) > 0 && /* @__PURE__ */ jsx3(
|
|
1342
|
+
(((_c = pr.labels) == null ? void 0 : _c.length) ?? 0) > 0 && /* @__PURE__ */ jsx3(Box3, { gap: 1, children: pr.labels.map((l) => /* @__PURE__ */ jsxs2(Box3, { children: [
|
|
1343
|
+
/* @__PURE__ */ jsx3(Text2, { color: "gray", children: "\uE0B6" }),
|
|
1344
|
+
/* @__PURE__ */ jsx3(Text2, { color: "black", backgroundColor: "gray", children: l.name }),
|
|
1345
|
+
/* @__PURE__ */ jsx3(Text2, { color: "gray", children: "\uE0B4" })
|
|
1346
|
+
] }, l.name)) }),
|
|
1342
1347
|
/* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(Divider, {}) }),
|
|
1343
1348
|
(((_d = pr.assignees) == null ? void 0 : _d.length) ?? 0) > 0 && /* @__PURE__ */ jsxs2(Box3, { marginTop: 1, children: [
|
|
1344
1349
|
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: "Assignees: " }),
|
|
@@ -1409,6 +1414,7 @@ import { useState as useState10 } from "react";
|
|
|
1409
1414
|
import { TitledBox } from "@mishieck/ink-titled-box";
|
|
1410
1415
|
import { Box as Box4, Text as Text3, useInput as useInput3 } from "ink";
|
|
1411
1416
|
import { ScrollView as ScrollView2 } from "ink-scroll-view";
|
|
1417
|
+
import Spinner from "ink-spinner";
|
|
1412
1418
|
|
|
1413
1419
|
// src/hooks/jira/useJiraTickets.ts
|
|
1414
1420
|
import { useCallback as useCallback4, useState as useState5 } from "react";
|
|
@@ -1895,7 +1901,10 @@ function PullRequestsBox({
|
|
|
1895
1901
|
children: /* @__PURE__ */ jsxs3(Box4, { flexDirection: "column", paddingX: 1, flexGrow: 1, overflow: "hidden", children: [
|
|
1896
1902
|
loading && /* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "Loading PRs..." }),
|
|
1897
1903
|
error && /* @__PURE__ */ jsx4(Text3, { color: "red", children: error }),
|
|
1898
|
-
isGeneratingPR && /* @__PURE__ */
|
|
1904
|
+
isGeneratingPR && /* @__PURE__ */ jsxs3(Text3, { color: "yellow", children: [
|
|
1905
|
+
/* @__PURE__ */ jsx4(Spinner, { type: "dots" }),
|
|
1906
|
+
" Generating PR with Claude... (Esc to cancel)"
|
|
1907
|
+
] }),
|
|
1899
1908
|
!loading && !error && /* @__PURE__ */ jsxs3(ScrollView2, { ref: scrollRef, children: [
|
|
1900
1909
|
prs.length === 0 && /* @__PURE__ */ jsx4(Text3, { dimColor: true, children: "No PRs for this branch" }, "empty"),
|
|
1901
1910
|
prs.map((pr, idx) => {
|
|
@@ -2783,6 +2792,7 @@ import { useEffect as useEffect11, useRef as useRef7, useState as useState15 } f
|
|
|
2783
2792
|
import { TitledBox as TitledBox5 } from "@mishieck/ink-titled-box";
|
|
2784
2793
|
import { Box as Box13, Text as Text12, useInput as useInput10 } from "ink";
|
|
2785
2794
|
import { ScrollView as ScrollView6 } from "ink-scroll-view";
|
|
2795
|
+
import Spinner2 from "ink-spinner";
|
|
2786
2796
|
import TextInput2 from "ink-text-input";
|
|
2787
2797
|
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2788
2798
|
function LogViewerBox({ date, content, isActive, onRefresh, onLogCreated }) {
|
|
@@ -2896,7 +2906,10 @@ ${value.trim()}
|
|
|
2896
2906
|
}
|
|
2897
2907
|
) }) }),
|
|
2898
2908
|
isGeneratingStandup && /* @__PURE__ */ jsx13(TitledBox5, { borderStyle: "round", titles: ["Standup Notes"], borderColor: "yellow", children: /* @__PURE__ */ jsxs12(Box13, { paddingX: 1, flexDirection: "column", children: [
|
|
2899
|
-
/* @__PURE__ */
|
|
2909
|
+
/* @__PURE__ */ jsxs12(Text12, { color: "yellow", children: [
|
|
2910
|
+
/* @__PURE__ */ jsx13(Spinner2, { type: "dots" }),
|
|
2911
|
+
" Generating standup notes..."
|
|
2912
|
+
] }),
|
|
2900
2913
|
/* @__PURE__ */ jsx13(Text12, { dimColor: true, children: "Press Esc to cancel" })
|
|
2901
2914
|
] }) }),
|
|
2902
2915
|
standupResult && /* @__PURE__ */ jsx13(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clairo",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"ink-link": "^5.0.0",
|
|
28
28
|
"ink-scroll-view": "^0.3.5",
|
|
29
29
|
"ink-select-input": "^6.2.0",
|
|
30
|
+
"ink-spinner": "^5.0.0",
|
|
30
31
|
"ink-text-input": "^6.0.0",
|
|
31
32
|
"marked": "^17.0.1",
|
|
32
33
|
"meow": "^11.0.0",
|