@kud/ai-conventional-commit-cli 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -23
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -213,7 +213,7 @@ async function runValidations(candidate, plugins, ctx) {
|
|
|
213
213
|
// src/workflow/generate.ts
|
|
214
214
|
import { writeFileSync, mkdirSync, existsSync } from "fs";
|
|
215
215
|
import { join } from "path";
|
|
216
|
-
import
|
|
216
|
+
import { select } from "@inquirer/prompts";
|
|
217
217
|
async function runGenerate(config) {
|
|
218
218
|
const startedAt = Date.now();
|
|
219
219
|
if (!await ensureStagedChanges()) {
|
|
@@ -340,14 +340,14 @@ function saveSession(data) {
|
|
|
340
340
|
writeFileSync(join(dir, "last-session.json"), JSON.stringify(data, null, 2));
|
|
341
341
|
}
|
|
342
342
|
async function selectYesNo() {
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
name: "
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
343
|
+
const choice = await select({
|
|
344
|
+
message: "Use the commit?",
|
|
345
|
+
choices: [
|
|
346
|
+
{ name: "Yes", value: true },
|
|
347
|
+
{ name: "No", value: false }
|
|
348
|
+
],
|
|
349
|
+
default: true
|
|
350
|
+
});
|
|
351
351
|
return choice;
|
|
352
352
|
}
|
|
353
353
|
|
|
@@ -397,7 +397,7 @@ var clusterHunks = (files) => {
|
|
|
397
397
|
// src/workflow/split.ts
|
|
398
398
|
import { writeFileSync as writeFileSync2, mkdirSync as mkdirSync2, existsSync as existsSync2 } from "fs";
|
|
399
399
|
import { join as join2 } from "path";
|
|
400
|
-
import
|
|
400
|
+
import { select as select2 } from "@inquirer/prompts";
|
|
401
401
|
async function runSplit(config, desired) {
|
|
402
402
|
const startedAt = Date.now();
|
|
403
403
|
if (!await ensureStagedChanges()) {
|
|
@@ -506,14 +506,14 @@ async function runSplit(config, desired) {
|
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
508
|
borderLine();
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
name: "
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
509
|
+
const ok = await select2({
|
|
510
|
+
message: "Use the commits?",
|
|
511
|
+
choices: [
|
|
512
|
+
{ name: "Yes", value: true },
|
|
513
|
+
{ name: "No", value: false }
|
|
514
|
+
],
|
|
515
|
+
default: true
|
|
516
|
+
});
|
|
517
517
|
if (!ok) {
|
|
518
518
|
borderLine();
|
|
519
519
|
abortMessage();
|
|
@@ -559,7 +559,7 @@ function saveSession2(data) {
|
|
|
559
559
|
// src/workflow/refine.ts
|
|
560
560
|
import chalk3 from "chalk";
|
|
561
561
|
import ora3 from "ora";
|
|
562
|
-
import
|
|
562
|
+
import inquirer from "inquirer";
|
|
563
563
|
import { readFileSync, existsSync as existsSync3, writeFileSync as writeFileSync3, mkdirSync as mkdirSync3 } from "fs";
|
|
564
564
|
import { join as join3 } from "path";
|
|
565
565
|
|
|
@@ -656,7 +656,7 @@ async function runRefine(config, options) {
|
|
|
656
656
|
titleColor: (s) => chalk3.yellow(s)
|
|
657
657
|
});
|
|
658
658
|
borderLine();
|
|
659
|
-
const { ok } = await
|
|
659
|
+
const { ok } = await inquirer.prompt([
|
|
660
660
|
{
|
|
661
661
|
type: "list",
|
|
662
662
|
name: "ok",
|
|
@@ -684,7 +684,7 @@ import { readFileSync as readFileSync2 } from "fs";
|
|
|
684
684
|
import { fileURLToPath } from "url";
|
|
685
685
|
import { dirname, join as join4 } from "path";
|
|
686
686
|
import { execa } from "execa";
|
|
687
|
-
import
|
|
687
|
+
import inquirer2 from "inquirer";
|
|
688
688
|
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
689
689
|
var pkgVersion = JSON.parse(readFileSync2(join4(__dirname, "..", "package.json"), "utf8")).version || "0.0.0";
|
|
690
690
|
var RootCommand = class extends Command {
|
|
@@ -890,7 +890,7 @@ var ModelsCommand = class extends Command {
|
|
|
890
890
|
this.context.stdout.write(stdout.trim() + "\n");
|
|
891
891
|
return;
|
|
892
892
|
}
|
|
893
|
-
const { model } = await
|
|
893
|
+
const { model } = await inquirer2.prompt([
|
|
894
894
|
{
|
|
895
895
|
name: "model",
|
|
896
896
|
type: "list",
|
|
@@ -1049,7 +1049,7 @@ var RewordCommand = class extends Command {
|
|
|
1049
1049
|
value: c.hash
|
|
1050
1050
|
}));
|
|
1051
1051
|
choices.push({ name: "Cancel", value: "__CANCEL__" });
|
|
1052
|
-
const { picked } = await
|
|
1052
|
+
const { picked } = await inquirer2.prompt([
|
|
1053
1053
|
{
|
|
1054
1054
|
type: "list",
|
|
1055
1055
|
name: "picked",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/ai-conventional-commit-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Opinionated, style-aware AI assistant for crafting and splitting git commits (opencode-based, provider-agnostic).",
|
|
6
6
|
"bin": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@commitlint/config-conventional": "^20.0.0",
|
|
26
|
+
"@inquirer/prompts": "8.0.1",
|
|
26
27
|
"chalk": "^5.6.2",
|
|
27
28
|
"clipanion": "^3.2.1",
|
|
28
29
|
"cosmiconfig": "^9.0.0",
|