@kyubiware/commit-mint 0.8.2 → 0.8.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/README.md CHANGED
@@ -106,7 +106,9 @@ each with its own message. The flow:
106
106
  5. A hook failure on any group shows the recovery menu and stops the sequence
107
107
  — the remaining groups are not committed.
108
108
 
109
- `cmint` (no `-a`) on multiple files shows a staging menu:
109
+ `cmint` (no `-a`) shows a staging menu for any number of changed files
110
+ (including one). The menu is also the only place the `a` hotkey toggles
111
+ auto-accept mode, so it always runs:
110
112
 
111
113
  ```
112
114
  What do you want to stage?
package/dist/cli.mjs CHANGED
@@ -33,7 +33,7 @@ var __exportAll = (all, no_symbols) => {
33
33
  //#region package.json
34
34
  var package_default = {
35
35
  name: "@kyubiware/commit-mint",
36
- version: "0.8.2",
36
+ version: "0.8.3",
37
37
  description: "🌿 AI-powered git commit tool — auto-group changed files, generate messages, run pre-commit checks",
38
38
  type: "module",
39
39
  bin: { "cmint": "./dist/cli.mjs" },
@@ -271,7 +271,7 @@ function buildStatSummary(diff) {
271
271
  return lines.join("\n");
272
272
  }
273
273
  function buildSystemPrompt(type) {
274
- let prompt = "You are a commit message generator. Follow the Conventional Commits specification.\nValid types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test.\nFormat: type(scope): description\nUse imperative mood, lowercase, no trailing period.\nOutput ONLY the commit message, no markdown fences, no explanation.";
274
+ let prompt = "You are a commit message generator. Follow the Conventional Commits specification.\nValid types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test.\nFormat: type(scope): description\nUse imperative mood, lowercase, no trailing period.\nOutput a SINGLE commit message, one line only. No markdown fences, no explanation.";
275
275
  if (type && type.trim().length > 0) prompt += `\nYou MUST use type: ${type}`;
276
276
  return prompt;
277
277
  }
@@ -358,7 +358,7 @@ async function generateCommitMessage(diff, options) {
358
358
  debug("Validation: message=%s, isValid=%s", message.slice(0, 100), isValidConventionalCommit(message));
359
359
  if (!isValidConventionalCommit(message)) {
360
360
  debug("Initial message failed conventional commit validation, retrying with strict prompt (elapsed: %d ms)", Date.now() - totalStart);
361
- const retryMessage = await callAI("You MUST output ONLY a valid conventional commit message. Format: type(scope): description. If you output anything else your response will be rejected.\nValid types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test.");
361
+ const retryMessage = await callAI("You MUST output ONLY a valid conventional commit message. Format: type(scope): description. If you output anything else your response will be rejected.\nOutput a SINGLE commit message, one line only.\nValid types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test.");
362
362
  debug("Retry validation: message=%s, isValid=%s", retryMessage.slice(0, 100), isValidConventionalCommit(retryMessage));
363
363
  if (isValidConventionalCommit(retryMessage)) {
364
364
  debug("Retry produced valid conventional commit");
@@ -3930,10 +3930,10 @@ async function showStagingMenu(files, hasChecks) {
3930
3930
  value: "checks",
3931
3931
  hint: "Pre-flight checks from cmint config"
3932
3932
  }] : [],
3933
- {
3933
+ ...files.length > 1 ? [{
3934
3934
  label: "Select files...",
3935
3935
  value: "select"
3936
- },
3936
+ }] : [],
3937
3937
  {
3938
3938
  label: "Cancel",
3939
3939
  value: "cancel"
@@ -4080,10 +4080,6 @@ async function commitCommand(flags, version) {
4080
4080
  }
4081
4081
  if (await runAutoGroupFlow(changedFiles, flags) !== "committed") process.exit(1);
4082
4082
  return;
4083
- } else if (changedFiles.length === 1) {
4084
- s.start(`Staging ${changedFiles[0].path}...`);
4085
- await stageFiles([changedFiles[0].path]);
4086
- s.stop("File staged");
4087
4083
  } else {
4088
4084
  const result = await handleStaging(changedFiles, flags);
4089
4085
  if (!result) return;