repomind 0.2.6 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +402 -283
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39253,7 +39253,105 @@ var build_default = Spinner;
39253
39253
 
39254
39254
  // src/ui/commit-app.tsx
39255
39255
  var import_react30 = __toESM(require_react(), 1);
39256
+
39257
+ // src/ui/components/header.tsx
39256
39258
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
39259
+ function Header({ title = "RepoMind Split" }) {
39260
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
39261
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { gap: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { backgroundColor: "cyan", color: "black", bold: true, children: [
39262
+ " ",
39263
+ "\u26A1 ",
39264
+ title,
39265
+ " "
39266
+ ] }) }),
39267
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "\u2500".repeat(40) })
39268
+ ] });
39269
+ }
39270
+
39271
+ // src/ui/components/key-hints.tsx
39272
+ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
39273
+ function KeyHints({ hints }) {
39274
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { marginTop: 1, gap: 0, flexWrap: "wrap", children: [
39275
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "\u2500".repeat(40) }),
39276
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { gap: 1, marginTop: 0, children: hints.map((hint) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { gap: 0, children: [
39277
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { backgroundColor: "gray", color: "white", bold: true, children: ` ${hint.key} ` }),
39278
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { dimColor: true, children: [
39279
+ " ",
39280
+ hint.label,
39281
+ " "
39282
+ ] })
39283
+ ] }, hint.key)) })
39284
+ ] });
39285
+ }
39286
+
39287
+ // src/ui/components/step-list.tsx
39288
+ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
39289
+ var STATUS_ICONS = {
39290
+ done: "\u25CF",
39291
+ active: "",
39292
+ pending: "\u25CB",
39293
+ error: "\u2717"
39294
+ };
39295
+ var STATUS_COLORS = {
39296
+ done: "green",
39297
+ active: "cyan",
39298
+ pending: void 0,
39299
+ error: "red"
39300
+ };
39301
+ function StepList({ steps }) {
39302
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { flexDirection: "column", gap: 0, marginLeft: 1, children: steps.map((step, idx) => {
39303
+ const isLast = idx === steps.length - 1;
39304
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "column", children: [
39305
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { gap: 1, children: [
39306
+ step.status === "active" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "cyan", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(build_default, { type: "dots" }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
39307
+ Text,
39308
+ {
39309
+ color: STATUS_COLORS[step.status],
39310
+ dimColor: step.status === "pending",
39311
+ children: STATUS_ICONS[step.status]
39312
+ }
39313
+ ),
39314
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
39315
+ Text,
39316
+ {
39317
+ color: STATUS_COLORS[step.status],
39318
+ dimColor: step.status === "pending",
39319
+ bold: step.status === "active",
39320
+ children: step.label
39321
+ }
39322
+ ),
39323
+ step.detail && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { dimColor: true, children: [
39324
+ "\xB7 ",
39325
+ step.detail
39326
+ ] })
39327
+ ] }),
39328
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { marginLeft: 0, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { dimColor: true, children: "\u2502" }) })
39329
+ ] }, step.label);
39330
+ }) });
39331
+ }
39332
+
39333
+ // src/ui/components/type-badge.tsx
39334
+ var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
39335
+ var TYPE_STYLES = {
39336
+ feat: { bg: "cyan", fg: "black" },
39337
+ fix: { bg: "red", fg: "white" },
39338
+ refactor: { bg: "yellow", fg: "black" },
39339
+ docs: { bg: "blue", fg: "white" },
39340
+ test: { bg: "magenta", fg: "white" },
39341
+ chore: { bg: "gray", fg: "white" },
39342
+ style: { bg: "green", fg: "black" },
39343
+ ci: { bg: "blue", fg: "white" },
39344
+ perf: { bg: "yellow", fg: "black" },
39345
+ build: { bg: "gray", fg: "white" },
39346
+ revert: { bg: "red", fg: "white" }
39347
+ };
39348
+ function TypeBadge({ type }) {
39349
+ const style = TYPE_STYLES[type] ?? { bg: "gray", fg: "white" };
39350
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { backgroundColor: style.bg, color: style.fg, bold: true, children: ` ${type} ` });
39351
+ }
39352
+
39353
+ // src/ui/commit-app.tsx
39354
+ var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
39257
39355
  var TERMINAL_PHASES = [
39258
39356
  "done",
39259
39357
  "aborted",
@@ -39264,6 +39362,11 @@ var TERMINAL_PHASES = [
39264
39362
  "error-commit",
39265
39363
  "error-plan"
39266
39364
  ];
39365
+ function parseCommitType(msg) {
39366
+ const match = msg.match(/^(\w+)(?:\(([^)]+)\))?!?:\s*(.+)/);
39367
+ if (!match) return { type: "chore", scope: null, description: msg };
39368
+ return { type: match[1], scope: match[2] ?? null, description: match[3] };
39369
+ }
39267
39370
  function CommitApp({
39268
39371
  deps,
39269
39372
  onExit
@@ -39273,6 +39376,9 @@ function CommitApp({
39273
39376
  const [message, setMessage] = (0, import_react30.useState)("");
39274
39377
  const [issueRef, setIssueRef] = (0, import_react30.useState)("");
39275
39378
  const [errorMsg, setErrorMsg] = (0, import_react30.useState)("");
39379
+ const [fileCount, setFileCount] = (0, import_react30.useState)(0);
39380
+ const [additions, setAdditions] = (0, import_react30.useState)(0);
39381
+ const [deletions, setDeletions] = (0, import_react30.useState)(0);
39276
39382
  (0, import_react30.useEffect)(() => {
39277
39383
  if (!TERMINAL_PHASES.includes(phase)) return;
39278
39384
  const code = phase === "done" || phase === "aborted" ? 0 : 1;
@@ -39304,6 +39410,9 @@ function CommitApp({
39304
39410
  setPhase("error-empty");
39305
39411
  return;
39306
39412
  }
39413
+ setFileCount(changes.files.length);
39414
+ setAdditions(changes.files.reduce((s, f) => s + f.additions, 0));
39415
+ setDeletions(changes.files.reduce((s, f) => s + f.deletions, 0));
39307
39416
  setPhase("generating");
39308
39417
  try {
39309
39418
  const stagedFiles = await deps.readStagedFiles(changes.files);
@@ -39383,79 +39492,125 @@ ${issueRef.trim()}`);
39383
39492
  },
39384
39493
  { isActive: phase === "confirm" }
39385
39494
  );
39386
- const isSuccess = phase === "link-issue" || phase === "confirm" || phase === "committing" || phase === "done" || phase === "aborted";
39387
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { flexDirection: "column", gap: 0, paddingTop: 1, children: [
39388
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { bold: true, color: "cyan", children: "RepoMind Commit" }) }),
39389
- phase === "analyzing" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39390
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(build_default, { type: "dots" }) }),
39391
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "Analisando diff..." })
39495
+ const steps = [];
39496
+ const phaseOrder = [
39497
+ "analyzing",
39498
+ "generating",
39499
+ "link-issue",
39500
+ "confirm",
39501
+ "committing",
39502
+ "done"
39503
+ ];
39504
+ const phaseIdx = phaseOrder.indexOf(phase);
39505
+ steps.push({
39506
+ label: "Analisando diff",
39507
+ status: phase === "analyzing" ? "active" : phaseIdx > 0 || TERMINAL_PHASES.includes(phase) ? "done" : "pending",
39508
+ detail: phaseIdx > 0 || TERMINAL_PHASES.includes(phase) ? `${fileCount} arquivos \xB7 +${additions} -${deletions}` : void 0
39509
+ });
39510
+ steps.push({
39511
+ label: "Gerando mensagem com IA",
39512
+ status: phase === "generating" ? "active" : phaseIdx > 1 || TERMINAL_PHASES.includes(phase) ? message ? "done" : phase.startsWith("error") ? "error" : "pending" : "pending"
39513
+ });
39514
+ const parsed = parseCommitType(message);
39515
+ const hasMessage = phase === "link-issue" || phase === "confirm" || phase === "committing" || phase === "done" || phase === "aborted";
39516
+ const commitCard = hasMessage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
39517
+ Box_default,
39518
+ {
39519
+ borderStyle: "bold",
39520
+ borderColor: phase === "done" ? "green" : "cyan",
39521
+ paddingX: 2,
39522
+ paddingY: 1,
39523
+ flexDirection: "column",
39524
+ children: [
39525
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, marginBottom: message.includes("\n\n") ? 1 : 0, children: [
39526
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TypeBadge, { type: parsed.type }),
39527
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: parsed.description })
39528
+ ] }),
39529
+ parsed.scope && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginBottom: message.includes("\n\n") ? 0 : 0, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
39530
+ "scope: ",
39531
+ parsed.scope
39532
+ ] }) }),
39533
+ message.includes("\n\n") && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: message.split("\n\n").slice(1).join("\n\n") }) }),
39534
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { marginTop: 1, gap: 1, children: [
39535
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "green", bold: true, children: [
39536
+ "+",
39537
+ additions
39538
+ ] }),
39539
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "red", bold: true, children: [
39540
+ "-",
39541
+ deletions
39542
+ ] }),
39543
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
39544
+ "\xB7 ",
39545
+ fileCount,
39546
+ " arquivos"
39547
+ ] })
39548
+ ] })
39549
+ ]
39550
+ }
39551
+ ) }) : null;
39552
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", children: [
39553
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Header, { title: "RepoMind Commit" }),
39554
+ !hasMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StepList, { steps }),
39555
+ commitCard,
39556
+ phase === "link-issue" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39557
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { backgroundColor: "blue", color: "white", bold: true, children: [
39558
+ " ",
39559
+ "?",
39560
+ " "
39561
+ ] }),
39562
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: " Link issue " }),
39563
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: issueRef }),
39564
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "\u258C" }),
39565
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: " (ex: Closes #42, Enter para pular)" })
39566
+ ] }),
39567
+ phase === "confirm" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39568
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { backgroundColor: "cyan", color: "black", bold: true, children: [
39569
+ " ",
39570
+ "?",
39571
+ " "
39572
+ ] }),
39573
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: " Confirmar este commit? " }),
39574
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "[Y/n]" })
39575
+ ] }),
39576
+ phase === "committing" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39577
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(build_default, { type: "dots" }) }),
39578
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "Fazendo commit..." })
39392
39579
  ] }),
39393
- isSuccess && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39394
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: "\u2713" }),
39395
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "Diff analisado" })
39580
+ phase === "done" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39581
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "green", children: "\u2728" }),
39582
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: "Commit realizado com sucesso" })
39396
39583
  ] }),
39397
- phase === "generating" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, marginTop: 1, children: [
39398
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(build_default, { type: "dots" }) }),
39399
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "Gerando mensagem de commit..." })
39584
+ phase === "aborted" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39585
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: "\u25C6" }),
39586
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "Abortado. Nenhum commit foi feito." })
39400
39587
  ] }),
39401
- (phase === "link-issue" || phase === "confirm" || phase === "committing" || phase === "done" || phase === "aborted") && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
39402
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39403
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: "\u2713" }),
39404
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "Mensagem gerada" })
39588
+ phase === "error-empty" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
39589
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39590
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: "\u25B2" }),
39591
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: errorMsg })
39405
39592
  ] }),
39406
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39407
- Box_default,
39593
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
39594
+ KeyHints,
39408
39595
  {
39409
- borderStyle: "round",
39410
- borderColor: "gray",
39411
- paddingX: 2,
39412
- paddingY: 1,
39413
- marginTop: 1,
39414
- marginBottom: 1,
39415
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: message })
39596
+ hints: [
39597
+ { key: "git add .", label: "stage todos os arquivos" },
39598
+ { key: "git add -p", label: "stage interativo" }
39599
+ ]
39416
39600
  }
39417
39601
  )
39418
39602
  ] }),
39419
- phase === "link-issue" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39420
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "cyan", children: "?" }),
39421
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: "Link issue? " }),
39422
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: issueRef }),
39423
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "cyan", children: "\u258C" }),
39424
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: " (ex: Closes #42, Enter para pular)" })
39425
- ] }),
39426
- phase === "confirm" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39427
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "cyan", children: "?" }),
39428
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: "Confirmar este commit?" }),
39429
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "[Y/n]" })
39430
- ] }),
39431
- phase === "committing" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39432
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(build_default, { type: "dots" }) }),
39433
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "Fazendo commit..." })
39434
- ] }),
39435
- phase === "done" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39436
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: "\u2713" }),
39437
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: "Commit realizado com sucesso" })
39438
- ] }),
39439
- phase === "aborted" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39440
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "yellow", children: "\u25C6" }),
39441
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "Abortado. Nenhum commit foi feito." })
39442
- ] }),
39443
- phase === "error-empty" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39444
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "yellow", children: "\u25B2" }),
39445
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: errorMsg })
39446
- ] }),
39447
- (phase === "error-auth" || phase === "error-git" || phase === "error-api" || phase === "error-commit") && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39448
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "red", children: "\u2717" }),
39449
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "red", children: errorMsg })
39450
- ] }),
39451
- phase === "error-plan" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { flexDirection: "column", gap: 0, children: [
39452
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { gap: 1, children: [
39453
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "yellow", children: "\u25B2" }),
39454
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "yellow", children: errorMsg.split("\n")[0] })
39603
+ (phase === "error-auth" || phase === "error-git" || phase === "error-api" || phase === "error-commit") && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39604
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "red", children: "\u2717" }),
39605
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "red", children: errorMsg })
39606
+ ] }) }),
39607
+ phase === "error-plan" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
39608
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39609
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: "\u25B2" }),
39610
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: errorMsg.split("\n")[0] })
39455
39611
  ] }),
39456
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { gap: 1, marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: errorMsg.split("\n")[1] }) })
39457
- ] }),
39458
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { marginTop: 1 })
39612
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: errorMsg.split("\n")[1] }) })
39613
+ ] })
39459
39614
  ] });
39460
39615
  }
39461
39616
 
@@ -39491,32 +39646,92 @@ async function commitCommand() {
39491
39646
 
39492
39647
  // src/commands/help.tsx
39493
39648
  var import_react32 = __toESM(require_react(), 1);
39494
- var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
39649
+ var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
39495
39650
  var COMMANDS = [
39496
- { name: "commit", description: "Gerar mensagem de commit com IA" },
39497
- { name: "split", description: "Dividir altera\xE7\xF5es em commits at\xF4micos" },
39498
- { name: "login", description: "Autenticar com sua conta RepoMind" },
39499
- { name: "logout", description: "Encerrar sess\xE3o atual" },
39500
- { name: "whoami", description: "Exibir usu\xE1rio autenticado" }
39651
+ {
39652
+ name: "commit",
39653
+ description: "Gerar mensagem de commit com IA",
39654
+ icon: "\u2726",
39655
+ color: "cyan"
39656
+ },
39657
+ {
39658
+ name: "split",
39659
+ description: "Dividir altera\xE7\xF5es em commits at\xF4micos",
39660
+ icon: "\u25C8",
39661
+ color: "magenta"
39662
+ },
39663
+ {
39664
+ name: "login",
39665
+ description: "Autenticar com sua conta RepoMind",
39666
+ icon: "\u2192",
39667
+ color: "green"
39668
+ },
39669
+ {
39670
+ name: "logout",
39671
+ description: "Encerrar sess\xE3o atual",
39672
+ icon: "\u2190",
39673
+ color: "yellow"
39674
+ },
39675
+ {
39676
+ name: "whoami",
39677
+ description: "Exibir usu\xE1rio autenticado",
39678
+ icon: "\u25CF",
39679
+ color: "blue"
39680
+ }
39501
39681
  ];
39502
39682
  function HelpApp() {
39503
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", paddingTop: 1, marginBottom: 1, children: [
39504
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { gap: 1, marginBottom: 1, children: [
39505
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { bold: true, color: "cyan", children: "repomind" }),
39506
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "\u2014 AI-powered Git commits" })
39507
- ] }),
39508
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", gap: 0, marginBottom: 1, children: [
39509
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "Uso:" }),
39510
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { paddingLeft: 2, children: [
39511
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: "repomind " }),
39512
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "cyan", children: "<command>" })
39683
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", children: [
39684
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Header, { title: "RepoMind" }),
39685
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexDirection: "column", gap: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { paddingLeft: 1, gap: 1, children: [
39686
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "Uso:" }),
39687
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: "repomind" }),
39688
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "cyan", children: "<comando>" }),
39689
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "[op\xE7\xF5es]" })
39690
+ ] }) }),
39691
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
39692
+ Box_default,
39693
+ {
39694
+ flexDirection: "column",
39695
+ paddingLeft: 1,
39696
+ marginBottom: 1,
39697
+ borderStyle: "round",
39698
+ borderColor: "gray",
39699
+ paddingX: 2,
39700
+ paddingY: 1,
39701
+ children: COMMANDS.map((cmd, idx) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
39702
+ Box_default,
39703
+ {
39704
+ gap: 1,
39705
+ marginBottom: idx < COMMANDS.length - 1 ? 0 : 0,
39706
+ children: [
39707
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: cmd.color, children: cmd.icon }),
39708
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { width: 10, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, color: cmd.color, children: cmd.name }) }),
39709
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: cmd.description })
39710
+ ]
39711
+ },
39712
+ cmd.name
39713
+ ))
39714
+ }
39715
+ ),
39716
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { paddingLeft: 1, flexDirection: "column", gap: 0, children: [
39717
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { gap: 1, children: [
39718
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
39719
+ " ",
39720
+ "--version",
39721
+ " "
39722
+ ] }),
39723
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "Exibir vers\xE3o instalada" })
39724
+ ] }),
39725
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { gap: 1, children: [
39726
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
39727
+ " ",
39728
+ "--verbose",
39729
+ " "
39730
+ ] }),
39731
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "Exibir detalhes de erro" })
39513
39732
  ] })
39514
39733
  ] }),
39515
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "Comandos:" }),
39516
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, marginTop: 0, children: COMMANDS.map((cmd) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { gap: 2, children: [
39517
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { width: 10, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "cyan", children: cmd.name }) }),
39518
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: cmd.description })
39519
- ] }, cmd.name)) })
39734
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginTop: 1, paddingLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "Docs: https://repomind.dev \xB7 Dashboard: https://app.repomind.dev" }) })
39520
39735
  ] });
39521
39736
  }
39522
39737
  async function helpCommand() {
@@ -39615,7 +39830,7 @@ var import_react34 = __toESM(require_react(), 1);
39615
39830
 
39616
39831
  // src/ui/login-app.tsx
39617
39832
  var import_react33 = __toESM(require_react(), 1);
39618
- var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
39833
+ var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
39619
39834
  var TERMINAL_PHASES2 = [
39620
39835
  "done",
39621
39836
  "error-timeout",
@@ -39679,37 +39894,37 @@ function LoginApp({
39679
39894
  }
39680
39895
  run2();
39681
39896
  }, []);
39682
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "column", gap: 0, paddingTop: 1, children: [
39683
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { bold: true, color: "cyan", children: "RepoMind Login" }) }),
39684
- phase === "opening" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { gap: 1, children: [
39685
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(build_default, { type: "dots" }) }),
39686
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { dimColor: true, children: "Abrindo browser..." })
39897
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", gap: 0, paddingTop: 1, children: [
39898
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { bold: true, color: "cyan", children: "RepoMind Login" }) }),
39899
+ phase === "opening" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { gap: 1, children: [
39900
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(build_default, { type: "dots" }) }),
39901
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { dimColor: true, children: "Abrindo browser..." })
39687
39902
  ] }),
39688
- authUrl !== "" && phase !== "opening" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
39689
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { dimColor: true, children: "Se n\xE3o abrir automaticamente, acesse:" }),
39690
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "blue", children: authUrl })
39903
+ authUrl !== "" && phase !== "opening" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
39904
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { dimColor: true, children: "Se n\xE3o abrir automaticamente, acesse:" }),
39905
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "blue", children: authUrl })
39691
39906
  ] }),
39692
- phase === "waiting" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { gap: 1, children: [
39693
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(build_default, { type: "dots" }) }),
39694
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { dimColor: true, children: "Aguardando autentica\xE7\xE3o no browser..." })
39907
+ phase === "waiting" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { gap: 1, children: [
39908
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(build_default, { type: "dots" }) }),
39909
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { dimColor: true, children: "Aguardando autentica\xE7\xE3o no browser..." })
39695
39910
  ] }),
39696
- phase === "exchanging" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { gap: 1, children: [
39697
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(build_default, { type: "dots" }) }),
39698
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { dimColor: true, children: "Validando credenciais..." })
39911
+ phase === "exchanging" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { gap: 1, children: [
39912
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "green", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(build_default, { type: "dots" }) }),
39913
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { dimColor: true, children: "Validando credenciais..." })
39699
39914
  ] }),
39700
- phase === "done" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { gap: 1, children: [
39701
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "green", children: "\u2713" }),
39702
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { children: [
39915
+ phase === "done" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { gap: 1, children: [
39916
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "green", children: "\u2713" }),
39917
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { children: [
39703
39918
  "Autenticado como",
39704
39919
  " ",
39705
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { bold: true, color: "white", children: email })
39920
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { bold: true, color: "white", children: email })
39706
39921
  ] })
39707
39922
  ] }),
39708
- (phase === "error-timeout" || phase === "error-auth" || phase === "error-api") && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { gap: 1, children: [
39709
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "red", children: "\u2717" }),
39710
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "red", children: errorMsg })
39923
+ (phase === "error-timeout" || phase === "error-auth" || phase === "error-api") && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { gap: 1, children: [
39924
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "red", children: "\u2717" }),
39925
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "red", children: errorMsg })
39711
39926
  ] }),
39712
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { marginTop: 1 })
39927
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1 })
39713
39928
  ] });
39714
39929
  }
39715
39930
 
@@ -39739,21 +39954,21 @@ async function loginCommand() {
39739
39954
 
39740
39955
  // src/commands/logout.tsx
39741
39956
  var import_react35 = __toESM(require_react(), 1);
39742
- var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
39957
+ var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
39743
39958
  function LogoutApp({ onExit }) {
39744
39959
  const wasLoggedIn = readToken() !== null;
39745
39960
  const deleted = deleteToken();
39746
39961
  (0, import_react35.useEffect)(() => {
39747
39962
  onExit(0);
39748
39963
  }, [onExit]);
39749
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", paddingTop: 1, marginBottom: 1, children: [
39750
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, color: "cyan", children: "RepoMind Logout" }) }),
39751
- wasLoggedIn && deleted ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { gap: 1, children: [
39752
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "green", children: "\u2713" }),
39753
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: "Sess\xE3o encerrada com sucesso." })
39754
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { gap: 1, children: [
39755
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", children: "\u25C6" }),
39756
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { dimColor: true, children: "Nenhuma sess\xE3o ativa." })
39964
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", paddingTop: 1, marginBottom: 1, children: [
39965
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "cyan", children: "RepoMind Logout" }) }),
39966
+ wasLoggedIn && deleted ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box_default, { gap: 1, children: [
39967
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: "green", children: "\u2713" }),
39968
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { children: "Sess\xE3o encerrada com sucesso." })
39969
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box_default, { gap: 1, children: [
39970
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: "yellow", children: "\u25C6" }),
39971
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { dimColor: true, children: "Nenhuma sess\xE3o ativa." })
39757
39972
  ] })
39758
39973
  ] });
39759
39974
  }
@@ -39777,20 +39992,20 @@ var import_react38 = __toESM(require_react(), 1);
39777
39992
  var import_react37 = __toESM(require_react(), 1);
39778
39993
 
39779
39994
  // src/ui/components/diff-stats.tsx
39780
- var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
39995
+ var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
39781
39996
  function DiffStats({
39782
39997
  additions,
39783
39998
  deletions,
39784
39999
  showBar = false
39785
40000
  }) {
39786
40001
  if (!showBar) {
39787
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 0, children: [
39788
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "green", bold: true, children: [
40002
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { gap: 0, children: [
40003
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: "green", bold: true, children: [
39789
40004
  "+",
39790
40005
  additions
39791
40006
  ] }),
39792
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: " / " }),
39793
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "red", bold: true, children: [
40007
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: " / " }),
40008
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: "red", bold: true, children: [
39794
40009
  "-",
39795
40010
  deletions
39796
40011
  ] })
@@ -39800,51 +40015,31 @@ function DiffStats({
39800
40015
  const barWidth = Math.min(total, 20);
39801
40016
  const addBar = total > 0 ? Math.max(1, Math.round(additions / total * barWidth)) : 0;
39802
40017
  const delBar = Math.max(0, barWidth - addBar);
39803
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 1, children: [
39804
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "green", bold: true, children: [
40018
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { gap: 1, children: [
40019
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: "green", bold: true, children: [
39805
40020
  "+",
39806
40021
  additions
39807
40022
  ] }),
39808
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "red", bold: true, children: [
40023
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: "red", bold: true, children: [
39809
40024
  "-",
39810
40025
  deletions
39811
40026
  ] }),
39812
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { gap: 0, children: [
39813
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "green", children: "\u2588".repeat(addBar) }),
39814
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "red", children: "\u2588".repeat(delBar) })
40027
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { gap: 0, children: [
40028
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: "green", children: "\u2588".repeat(addBar) }),
40029
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { color: "red", children: "\u2588".repeat(delBar) })
39815
40030
  ] })
39816
40031
  ] });
39817
40032
  }
39818
40033
 
39819
- // src/ui/components/type-badge.tsx
39820
- var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
39821
- var TYPE_STYLES = {
39822
- feat: { bg: "cyan", fg: "black" },
39823
- fix: { bg: "red", fg: "white" },
39824
- refactor: { bg: "yellow", fg: "black" },
39825
- docs: { bg: "blue", fg: "white" },
39826
- test: { bg: "magenta", fg: "white" },
39827
- chore: { bg: "gray", fg: "white" },
39828
- style: { bg: "green", fg: "black" },
39829
- ci: { bg: "blue", fg: "white" },
39830
- perf: { bg: "yellow", fg: "black" },
39831
- build: { bg: "gray", fg: "white" },
39832
- revert: { bg: "red", fg: "white" }
39833
- };
39834
- function TypeBadge({ type }) {
39835
- const style = TYPE_STYLES[type] ?? { bg: "gray", fg: "white" };
39836
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { backgroundColor: style.bg, color: style.fg, bold: true, children: ` ${type} ` });
39837
- }
39838
-
39839
40034
  // src/ui/components/commit-card.tsx
39840
- var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
40035
+ var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
39841
40036
  function formatSelection(f) {
39842
40037
  if (f.selection === "all") return "all";
39843
40038
  return f.selection.map((h) => `h${h.hunkIndex}`).join(",");
39844
40039
  }
39845
40040
  function CommitCard(props) {
39846
40041
  const borderColor = props.isSkipped ? "yellow" : "cyan";
39847
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
40042
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
39848
40043
  Box_default,
39849
40044
  {
39850
40045
  flexDirection: "column",
@@ -39854,35 +40049,35 @@ function CommitCard(props) {
39854
40049
  paddingY: 1,
39855
40050
  marginBottom: 0,
39856
40051
  children: [
39857
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { gap: 1, alignItems: "center", children: [
39858
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, bold: true, children: [
40052
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { gap: 1, alignItems: "center", children: [
40053
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { dimColor: true, bold: true, children: [
39859
40054
  String(props.index).padStart(String(props.total).length),
39860
40055
  "/",
39861
40056
  props.total
39862
40057
  ] }),
39863
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TypeBadge, { type: props.type }),
39864
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { bold: true, color: "white", children: props.description })
40058
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TypeBadge, { type: props.type }),
40059
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { bold: true, color: "white", children: props.description })
39865
40060
  ] }),
39866
- props.scope && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginLeft: 5, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, italic: true, children: [
40061
+ props.scope && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginLeft: 5, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { dimColor: true, italic: true, children: [
39867
40062
  "scope: ",
39868
40063
  props.scope
39869
40064
  ] }) }),
39870
- props.isSkipped && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { backgroundColor: "yellow", color: "black", bold: true, children: [
40065
+ props.isSkipped && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { backgroundColor: "yellow", color: "black", bold: true, children: [
39871
40066
  " ",
39872
40067
  "PULADO",
39873
40068
  " "
39874
40069
  ] }) }),
39875
- !props.isSkipped && props.body && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1, marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "white", children: props.body }) }),
39876
- !props.isSkipped && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: props.files.map((f) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { gap: 1, marginLeft: 1, children: [
39877
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color: "cyan", bold: true, children: "\u25B8" }),
39878
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { children: f.path }),
39879
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, children: [
40070
+ !props.isSkipped && props.body && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginTop: 1, marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: "white", children: props.body }) }),
40071
+ !props.isSkipped && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: props.files.map((f) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { gap: 1, marginLeft: 1, children: [
40072
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: "cyan", bold: true, children: "\u25B8" }),
40073
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { children: f.path }),
40074
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { dimColor: true, children: [
39880
40075
  "[",
39881
40076
  formatSelection(f),
39882
40077
  "]"
39883
40078
  ] })
39884
40079
  ] }, f.path)) }),
39885
- !props.isSkipped && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { marginTop: 1, marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
40080
+ !props.isSkipped && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { marginTop: 1, marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
39886
40081
  DiffStats,
39887
40082
  {
39888
40083
  additions: props.additions,
@@ -39896,32 +40091,32 @@ function CommitCard(props) {
39896
40091
  }
39897
40092
 
39898
40093
  // src/ui/components/commit-row.tsx
39899
- var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
40094
+ var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
39900
40095
  function CommitRow(props) {
39901
40096
  const pad = String(props.total).length;
39902
40097
  const num = `${String(props.index).padStart(pad)}/${props.total}`;
39903
40098
  if (props.isSkipped) {
39904
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box_default, { gap: 1, marginLeft: 2, children: [
39905
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { dimColor: true, children: num }),
39906
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { dimColor: true, strikethrough: true, children: props.description }),
39907
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { backgroundColor: "yellow", color: "black", children: [
40099
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, marginLeft: 2, children: [
40100
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: num }),
40101
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, strikethrough: true, children: props.description }),
40102
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { backgroundColor: "yellow", color: "black", children: [
39908
40103
  " ",
39909
40104
  "skip",
39910
40105
  " "
39911
40106
  ] })
39912
40107
  ] });
39913
40108
  }
39914
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box_default, { gap: 1, marginLeft: 2, children: [
39915
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { dimColor: true, children: num }),
39916
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TypeBadge, { type: props.type }),
39917
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { dimColor: true, children: props.description }),
39918
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DiffStats, { additions: props.additions, deletions: props.deletions })
40109
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 1, marginLeft: 2, children: [
40110
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: num }),
40111
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TypeBadge, { type: props.type }),
40112
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: props.description }),
40113
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DiffStats, { additions: props.additions, deletions: props.deletions })
39919
40114
  ] });
39920
40115
  }
39921
40116
 
39922
40117
  // src/ui/components/diff-viewer.tsx
39923
40118
  var import_react36 = __toESM(require_react(), 1);
39924
- var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
40119
+ var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
39925
40120
  function DiffViewer({ filePath, patch, onClose }) {
39926
40121
  const [scrollOffset, setScrollOffset] = (0, import_react36.useState)(0);
39927
40122
  const termHeight = process.stdout.rows || 24;
@@ -39966,19 +40161,19 @@ function DiffViewer({ filePath, patch, onClose }) {
39966
40161
  const scrollPercent = maxScroll > 0 ? Math.round(clamped / maxScroll * 100) : 100;
39967
40162
  const termWidth = process.stdout.columns || 80;
39968
40163
  const fileCount = contentLines.filter((l) => l.startsWith("__FILE__")).length;
39969
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { flexDirection: "column", children: [
39970
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { children: [
39971
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { backgroundColor: "cyan", color: "black", bold: true, children: [
40164
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { flexDirection: "column", children: [
40165
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { children: [
40166
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { backgroundColor: "cyan", color: "black", bold: true, children: [
39972
40167
  " ",
39973
40168
  "DIFF",
39974
40169
  " "
39975
40170
  ] }),
39976
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { bold: true, children: [
40171
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { bold: true, children: [
39977
40172
  " ",
39978
40173
  filePath,
39979
40174
  " "
39980
40175
  ] }),
39981
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { dimColor: true, children: [
40176
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { dimColor: true, children: [
39982
40177
  "\xB7 ",
39983
40178
  fileCount > 1 ? `${fileCount} arquivos \xB7 ` : "",
39984
40179
  totalLines,
@@ -39987,85 +40182,85 @@ function DiffViewer({ filePath, patch, onClose }) {
39987
40182
  "%"
39988
40183
  ] })
39989
40184
  ] }),
39990
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) }),
40185
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) }),
39991
40186
  visibleLines.map((line, i) => {
39992
40187
  const key = `dl-${clamped + i}`;
39993
40188
  if (line.startsWith("__FILE__")) {
39994
40189
  const file = line.slice(8);
39995
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { flexDirection: "column", marginTop: i > 0 ? 1 : 0, children: [
39996
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) }),
39997
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { gap: 1, children: [
39998
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { backgroundColor: "blue", color: "white", bold: true, children: [
40190
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { flexDirection: "column", marginTop: i > 0 ? 1 : 0, children: [
40191
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) }),
40192
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { gap: 1, children: [
40193
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { backgroundColor: "blue", color: "white", bold: true, children: [
39999
40194
  " ",
40000
40195
  "FILE",
40001
40196
  " "
40002
40197
  ] }),
40003
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { bold: true, color: "white", children: file })
40198
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { bold: true, color: "white", children: file })
40004
40199
  ] }),
40005
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) })
40200
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) })
40006
40201
  ] }, key);
40007
40202
  }
40008
40203
  const num = String(clamped + i + 1).padStart(4);
40009
40204
  if (line.startsWith("@@")) {
40010
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: "cyan", dimColor: true, children: [
40205
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { color: "cyan", dimColor: true, children: [
40011
40206
  " ",
40012
40207
  " ",
40013
40208
  line
40014
40209
  ] }, key);
40015
40210
  }
40016
40211
  if (line.startsWith("+")) {
40017
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: "green", children: [
40212
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { color: "green", children: [
40018
40213
  num,
40019
40214
  " ",
40020
40215
  line
40021
40216
  ] }, key);
40022
40217
  }
40023
40218
  if (line.startsWith("-")) {
40024
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { color: "red", children: [
40219
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { color: "red", children: [
40025
40220
  num,
40026
40221
  " ",
40027
40222
  line
40028
40223
  ] }, key);
40029
40224
  }
40030
40225
  if (line.startsWith("\\")) {
40031
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { dimColor: true, children: [
40226
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { dimColor: true, children: [
40032
40227
  " ",
40033
40228
  line
40034
40229
  ] }, key);
40035
40230
  }
40036
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { dimColor: true, children: [
40231
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { dimColor: true, children: [
40037
40232
  num,
40038
40233
  " ",
40039
40234
  line
40040
40235
  ] }, key);
40041
40236
  }),
40042
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) }),
40043
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Box_default, { gap: 1, children: [
40044
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40237
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(termWidth, 80)) }),
40238
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { gap: 1, children: [
40239
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40045
40240
  " ",
40046
40241
  "\u2191\u2193",
40047
40242
  " "
40048
40243
  ] }),
40049
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "rolar" }),
40050
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40244
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "rolar" }),
40245
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40051
40246
  " ",
40052
40247
  "space",
40053
40248
  " "
40054
40249
  ] }),
40055
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "p\xE1gina" }),
40056
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40250
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "p\xE1gina" }),
40251
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40057
40252
  " ",
40058
40253
  "g",
40059
40254
  " "
40060
40255
  ] }),
40061
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "topo" }),
40062
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40256
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "topo" }),
40257
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { backgroundColor: "gray", color: "white", bold: true, children: [
40063
40258
  " ",
40064
40259
  "q",
40065
40260
  " "
40066
40261
  ] }),
40067
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { dimColor: true, children: "sair" }),
40068
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Text, { dimColor: true, children: [
40262
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "sair" }),
40263
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { dimColor: true, children: [
40069
40264
  " ",
40070
40265
  "\u2502 ",
40071
40266
  clamped + 1,
@@ -40078,51 +40273,21 @@ function DiffViewer({ filePath, patch, onClose }) {
40078
40273
  ] });
40079
40274
  }
40080
40275
 
40081
- // src/ui/components/header.tsx
40082
- var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
40083
- function Header({ title = "RepoMind Split" }) {
40084
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
40085
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Box_default, { gap: 1, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Text, { backgroundColor: "cyan", color: "black", bold: true, children: [
40086
- " ",
40087
- "\u26A1 ",
40088
- title,
40089
- " "
40090
- ] }) }),
40091
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { dimColor: true, children: "\u2500".repeat(40) })
40092
- ] });
40093
- }
40094
-
40095
- // src/ui/components/key-hints.tsx
40096
- var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
40097
- function KeyHints({ hints }) {
40098
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { marginTop: 1, gap: 0, flexWrap: "wrap", children: [
40099
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { dimColor: true, children: "\u2500".repeat(40) }),
40100
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { gap: 1, marginTop: 0, children: hints.map((hint) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { gap: 0, children: [
40101
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { backgroundColor: "gray", color: "white", bold: true, children: ` ${hint.key} ` }),
40102
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text, { dimColor: true, children: [
40103
- " ",
40104
- hint.label,
40105
- " "
40106
- ] })
40107
- ] }, hint.key)) })
40108
- ] });
40109
- }
40110
-
40111
40276
  // src/ui/components/progress-bar.tsx
40112
- var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
40277
+ var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
40113
40278
  function ProgressBar({ current, total, width = 24 }) {
40114
40279
  const ratio = total > 0 ? current / total : 0;
40115
40280
  const filled = Math.round(ratio * width);
40116
40281
  const empty = width - filled;
40117
40282
  const percent = Math.round(ratio * 100);
40118
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { gap: 1, children: [
40119
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { color: "cyan", bold: true, children: "\u2501".repeat(filled) }),
40120
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { dimColor: true, children: "\u2500".repeat(empty) }),
40121
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { bold: true, color: ratio >= 1 ? "green" : "cyan", children: [
40283
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Box_default, { gap: 1, children: [
40284
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: "cyan", bold: true, children: "\u2501".repeat(filled) }),
40285
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { dimColor: true, children: "\u2500".repeat(empty) }),
40286
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text, { bold: true, color: ratio >= 1 ? "green" : "cyan", children: [
40122
40287
  percent,
40123
40288
  "%"
40124
40289
  ] }),
40125
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Text, { dimColor: true, children: [
40290
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text, { dimColor: true, children: [
40126
40291
  "(",
40127
40292
  current,
40128
40293
  "/",
@@ -40132,52 +40297,6 @@ function ProgressBar({ current, total, width = 24 }) {
40132
40297
  ] });
40133
40298
  }
40134
40299
 
40135
- // src/ui/components/step-list.tsx
40136
- var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
40137
- var STATUS_ICONS = {
40138
- done: "\u25CF",
40139
- active: "",
40140
- pending: "\u25CB",
40141
- error: "\u2717"
40142
- };
40143
- var STATUS_COLORS = {
40144
- done: "green",
40145
- active: "cyan",
40146
- pending: void 0,
40147
- error: "red"
40148
- };
40149
- function StepList({ steps }) {
40150
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box_default, { flexDirection: "column", gap: 0, marginLeft: 1, children: steps.map((step, idx) => {
40151
- const isLast = idx === steps.length - 1;
40152
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Box_default, { flexDirection: "column", children: [
40153
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Box_default, { gap: 1, children: [
40154
- step.status === "active" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color: "cyan", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(build_default, { type: "dots" }) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
40155
- Text,
40156
- {
40157
- color: STATUS_COLORS[step.status],
40158
- dimColor: step.status === "pending",
40159
- children: STATUS_ICONS[step.status]
40160
- }
40161
- ),
40162
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
40163
- Text,
40164
- {
40165
- color: STATUS_COLORS[step.status],
40166
- dimColor: step.status === "pending",
40167
- bold: step.status === "active",
40168
- children: step.label
40169
- }
40170
- ),
40171
- step.detail && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Text, { dimColor: true, children: [
40172
- "\xB7 ",
40173
- step.detail
40174
- ] })
40175
- ] }),
40176
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Box_default, { marginLeft: 0, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { dimColor: true, children: "\u2502" }) })
40177
- ] }, step.label);
40178
- }) });
40179
- }
40180
-
40181
40300
  // src/ui/split-app.tsx
40182
40301
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
40183
40302
  var TERMINAL_PHASES3 = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repomind",
3
- "version": "0.2.6",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "AI-powered git commit messages and repository insights",
6
6
  "keywords": ["git", "ai", "commit", "cli"],