repomind 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +66 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -40185,7 +40185,11 @@ function parseType(msg) {
40185
40185
  const match = msg.match(/^(\w+)(?:\([^)]+\))?!?:\s*(.+)/);
40186
40186
  return { type: match?.[1] ?? "chore", description: match?.[2] ?? msg };
40187
40187
  }
40188
- function SplitDoneSummary({ commits }) {
40188
+ function SplitDoneSummary({
40189
+ commits,
40190
+ durationMs,
40191
+ totalFiles
40192
+ }) {
40189
40193
  const { exit } = use_app_default();
40190
40194
  (0, import_react33.useEffect)(() => {
40191
40195
  exit();
@@ -40209,12 +40213,17 @@ function SplitDoneSummary({ commits }) {
40209
40213
  " commit",
40210
40214
  commits.length !== 1 ? "s" : "",
40211
40215
  " realizado",
40212
- commits.length !== 1 ? "s" : ""
40216
+ commits.length !== 1 ? "s" : "",
40217
+ durationMs != null ? ` em ${(durationMs / 1e3).toFixed(1)}s` : "",
40218
+ totalFiles != null ? ` \xB7 ${totalFiles} arquivo${totalFiles !== 1 ? "s" : ""}` : ""
40213
40219
  ] })
40214
40220
  ] })
40215
40221
  ] });
40216
40222
  }
40217
- function CommitDoneSummary({ message }) {
40223
+ function CommitDoneSummary({
40224
+ message,
40225
+ durationMs
40226
+ }) {
40218
40227
  const { exit } = use_app_default();
40219
40228
  (0, import_react33.useEffect)(() => {
40220
40229
  exit();
@@ -40223,7 +40232,12 @@ function CommitDoneSummary({ message }) {
40223
40232
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { paddingLeft: 1, gap: 1, alignItems: "center", children: [
40224
40233
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.green, children: "\u2713" }),
40225
40234
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TypeBadge, { type }),
40226
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.green, children: description })
40235
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: C.green, children: description }),
40236
+ durationMs != null && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { color: C.dim, children: [
40237
+ "\xB7 ",
40238
+ (durationMs / 1e3).toFixed(1),
40239
+ "s"
40240
+ ] })
40227
40241
  ] });
40228
40242
  }
40229
40243
 
@@ -40614,6 +40628,20 @@ var TERMINAL_PHASES3 = [
40614
40628
  "error-git",
40615
40629
  "error-plan"
40616
40630
  ];
40631
+ function buildSteps(phase) {
40632
+ const phaseOrder = ["collecting", "generating"];
40633
+ const phaseIdx = phaseOrder.indexOf(phase);
40634
+ return [
40635
+ {
40636
+ label: "Coletando diff",
40637
+ status: phase === "collecting" ? "active" : phaseIdx > 0 ? "done" : "pending"
40638
+ },
40639
+ {
40640
+ label: "Gerando PR description",
40641
+ status: phase === "generating" ? "active" : "pending"
40642
+ }
40643
+ ];
40644
+ }
40617
40645
  function PrApp({
40618
40646
  deps,
40619
40647
  onExit
@@ -40707,14 +40735,7 @@ ${prBody}`;
40707
40735
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", children: [
40708
40736
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Header, { title: "repomind pr" }),
40709
40737
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 1, children: [
40710
- phase === "collecting" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, marginTop: 1, children: [
40711
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.cyan, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(build_default, { type: "dots" }) }),
40712
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.dim, children: "Coletando diff entre branches..." })
40713
- ] }),
40714
- phase === "generating" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, marginTop: 1, children: [
40715
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.cyan, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(build_default, { type: "dots" }) }),
40716
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.dim, children: "Gerando PR description com IA..." })
40717
- ] }),
40738
+ (phase === "collecting" || phase === "generating") && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(StepList, { steps: buildSteps(phase) }),
40718
40739
  phase === "result" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
40719
40740
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
40720
40741
  Box_default,
@@ -40741,13 +40762,20 @@ ${prBody}`;
40741
40762
  ] }),
40742
40763
  phase === "copied" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, marginTop: 1, children: [
40743
40764
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.green, children: "\u2713" }),
40744
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { bold: true, children: "PR description copiada para o clipboard!" })
40765
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { bold: true, children: "PR description copiada" }),
40766
+ prTitle && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { color: C.dim, children: [
40767
+ "\xB7 ",
40768
+ prTitle
40769
+ ] })
40745
40770
  ] }),
40746
40771
  phase === "aborted" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { gap: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.dim, children: "Saindo..." }) }),
40747
- phase === "error-auth" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, children: [
40748
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.red, children: "\u2717" }),
40749
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.red, children: errorMsg })
40750
- ] }) }),
40772
+ phase === "error-auth" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
40773
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, children: [
40774
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.red, children: "\u2717" }),
40775
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.red, children: errorMsg })
40776
+ ] }),
40777
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.dim, children: "\u2192 Execute repomind login" }) })
40778
+ ] }),
40751
40779
  phase === "error-git" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, children: [
40752
40780
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.yellow, children: "\u25B2" }),
40753
40781
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: C.yellow, children: errorMsg })
@@ -41370,6 +41398,12 @@ function SplitApp({
41370
41398
  " (ser\xE3o preservadas no working tree)"
41371
41399
  ] })
41372
41400
  ] }),
41401
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Text, { color: C.dim, children: [
41402
+ selectedIndex + 1,
41403
+ "/",
41404
+ groups.length,
41405
+ skippedGroups.size > 0 ? ` \xB7 ${skippedGroups.size} pulado${skippedGroups.size !== 1 ? "s" : ""}` : ""
41406
+ ] }) }),
41373
41407
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
41374
41408
  KeyHints,
41375
41409
  {
@@ -41450,9 +41484,19 @@ function SplitApp({
41450
41484
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.red, children: errorMsg })
41451
41485
  ] })
41452
41486
  ] }),
41453
- (phase === "error-auth" || phase === "error-empty" || phase === "error-git" || phase === "error-api" || phase === "error-plan") && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { gap: 1, marginTop: 1, children: [
41454
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.red, children: "\u2717" }),
41455
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.red, children: errorMsg })
41487
+ phase === "error-empty" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
41488
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { gap: 1, children: [
41489
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.yellow, children: "\u25B2" }),
41490
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.yellow, children: errorMsg })
41491
+ ] }),
41492
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.dim, children: "\u2192 Use git add ou remova --staged" }) })
41493
+ ] }),
41494
+ (phase === "error-auth" || phase === "error-git" || phase === "error-api" || phase === "error-plan") && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
41495
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Box_default, { gap: 1, children: [
41496
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.red, children: "\u2717" }),
41497
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.red, children: errorMsg })
41498
+ ] }),
41499
+ phase === "error-auth" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { color: C.dim, children: "\u2192 Execute repomind login" }) })
41456
41500
  ] }),
41457
41501
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box_default, { marginTop: 1 })
41458
41502
  ] })
@@ -41462,8 +41506,8 @@ function SplitApp({
41462
41506
  // src/commands/split.ts
41463
41507
  async function runGitCommit2(message) {
41464
41508
  const proc = Bun.spawn(["git", "commit", "-m", message], {
41465
- stdout: "inherit",
41466
- stderr: "inherit"
41509
+ stdout: "pipe",
41510
+ stderr: "pipe"
41467
41511
  });
41468
41512
  return proc.exited;
41469
41513
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repomind",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "type": "module",
5
5
  "description": "AI-powered git commit messages and repository insights",
6
6
  "keywords": ["git", "ai", "commit", "cli"],