gityo 1.0.6 → 1.0.8

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
@@ -61,12 +61,12 @@ A configured model is required — gityo won't run without one, and the API key
61
61
  "default": {
62
62
  "npm": "@openrouter/ai-sdk-provider",
63
63
  "apiKeyEnv": "OPENROUTER_API_KEY",
64
- "model": "deepseek/deepseek-chat"
64
+ "model": "openai/gpt-oss-120b:nitro"
65
65
  },
66
66
  "fast": {
67
67
  "npm": "@ai-sdk/openai",
68
68
  "apiKeyEnv": "OPENAI_API_KEY",
69
- "model": "gpt-4.1-mini"
69
+ "model": "gpt-5-mini"
70
70
  }
71
71
  }
72
72
  }
@@ -148,7 +148,7 @@ Example:
148
148
  "default": {
149
149
  "npm": "@ai-sdk/openai",
150
150
  "apiKeyEnv": "OPENAI_API_KEY",
151
- "model": "gpt-4.1"
151
+ "model": "gpt-5-nano"
152
152
  }
153
153
  },
154
154
  "autoAcceptMessage": false,
package/dist/index.js CHANGED
@@ -181113,7 +181113,7 @@ function createLiveGit(baseDir) {
181113
181113
  }
181114
181114
  var system_prompt_default = "You are a strict Git commit message generator. ONLY output the commit message, nothing else.\n\nREQUIRED FORMAT:\n- First line: <type>(<scope>): <subject> (max 50 characters)\n- Types: feat, fix, docs, style, refactor, perf, test, chore, ci\n- Subject: imperative mood, lowercase, no period\n- If body needed: blank line + detailed explanation (wrapped at 72 chars)\n\nSTRICT RULES:\n1. MUST use conventional commits format: type(scope): subject\n2. Subject line MUST be under 50 characters\n3. Subject MUST be in imperative mood (e.g., \"add\", \"fix\", \"update\")\n4. Subject MUST be lowercase\n5. Subject MUST NOT end with a period\n6. MUST provide clear context about WHAT changed and WHY\n7. MUST be specific about affected functions, components, or modules\n8. MUST NOT use vague terms like \"Update\", \"Fix stuff\", \"Changes\"\n9. If including a body, MUST have exactly one blank line between subject and body\n10. Body lines MUST wrap at 72 characters\n\nOUTPUT INSTRUCTION:\nReturn ONLY the commit message. No explanations, no extra text, no markdown formatting.\n\nEXAMPLE:\nfeat(llm): add support for streaming responses\n\nImplement streaming response handling for commit message\ngeneration to improve user experience with large diffs.\nAdds new stream event handlers and updates the API contract.\n\nAnalyze the diff and generate a message following ALL rules above.";
181115
181115
  async function generateCommitMessage(languageModel, instructions, diff) {
181116
- return { text: (await generateText({
181116
+ return (await generateText({
181117
181117
  model: languageModel,
181118
181118
  instructions: system_prompt_default,
181119
181119
  messages: [{
@@ -181123,7 +181123,7 @@ async function generateCommitMessage(languageModel, instructions, diff) {
181123
181123
  role: "user",
181124
181124
  content: instructions || "Generate a concise git commit message based on the above instructions and diff."
181125
181125
  }]
181126
- })).text.trim() };
181126
+ })).text.trim();
181127
181127
  }
181128
181128
  function resolveLanguageModel(modelConfig) {
181129
181129
  const envVarNames = Array.isArray(modelConfig.apiKeyEnv) ? modelConfig.apiKeyEnv : [modelConfig.apiKeyEnv];
@@ -197901,7 +197901,10 @@ const commitMessageInputPrompt = createPrompt((config$4, done) => {
197901
197901
  done(answer);
197902
197902
  });
197903
197903
  const header = `${status === "done" ? source_default.green("✓") : source_default.blue("?")} ${(status === "done" ? source_default.green : source_default.blue)(config$4.message)}`;
197904
- if (status === "done") return value.length === 0 ? header : `${header}\n${source_default.magenta.dim(value)}`;
197904
+ if (status === "done") {
197905
+ if (value.length === 0) return header;
197906
+ return `${header}\n${source_default.cyan.dim(value)}\n`;
197907
+ }
197905
197908
  return `${header}\n${inputPrefix}${value}`;
197906
197909
  });
197907
197910
  async function promptForGeneratedCommitAction() {
@@ -197983,7 +197986,7 @@ async function mainController(options = {}) {
197983
197986
  if (finalCommitMessage.length === 0 && !forceLLMGenerate) finalCommitMessage = await promptForCommitMessageInput(modelConfig.model);
197984
197987
  if (finalCommitMessage.length === 0) while (true) {
197985
197988
  if (forceLLMGenerate) console.log(source_default.yellow("• Using LLM to generate message"));
197986
- finalCommitMessage = (await runWithLoading("Generating commit message", () => generateCommitMessage(languageModel, config$4.instructions ?? null, diff))).text.trim();
197989
+ finalCommitMessage = (await runWithLoading("Generating commit message", () => generateCommitMessage(languageModel, config$4.instructions ?? null, diff))).trim();
197987
197990
  if (finalCommitMessage.length === 0) throw new Error("The selected model returned an empty commit message.");
197988
197991
  console.log(source_default.cyan.dim(finalCommitMessage));
197989
197992
  console.log("");
@@ -197992,7 +197995,6 @@ async function mainController(options = {}) {
197992
197995
  if (action === "accept" || action === "cancel") break;
197993
197996
  }
197994
197997
  if (finalCommitMessage.length === 0) throw new Error("Commit message cannot be empty.");
197995
- console.log("");
197996
197998
  console.log(source_default.green("✓ Committing changes"));
197997
197999
  if (!hasStaged) await git.add(["-A"]);
197998
198000
  console.log(files.join("\n"));
@@ -198015,7 +198017,7 @@ function handleError(fn$1) {
198015
198017
  }
198016
198018
  });
198017
198019
  }
198018
- const app = new Command().name("gityo").description("Stage changes, generate or enter a commit message, create a commit, and run a post-commit git command.").option("-g, --generate", "Generate a commit message without asking.").option("-m, --message <message>", "Use the provided message as the commit message.").option("-p, --post", "Run the post-commit git command without asking.").option("--model <model>", "Model key from config to use (defaults to \"default\").").option("-y, --yolo", "Skip all questions, and generate message, commit, run post command. [Will fail if no model available]").action((options) => {
198020
+ const app = new Command().name("gityo").description("Stage changes, generate or enter a commit message, create a commit, and run a post-commit git command.").option("-g, --generate", "Generate a commit message and commit without asking.").option("-m, --message <message>", "Use the provided message as the commit message.").option("-p, --post", "Run the post-commit git command without asking.").option("--model <model>", "Model key from config to use (defaults to \"default\").").option("-y, --yolo", "Skip all questions, and generate message, commit, run post command. [Will fail if no model available]").action((options) => {
198019
198021
  if (options.generate && options.message) {
198020
198022
  console.error("Cannot use --generate and --message together.");
198021
198023
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gityo",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "scripts": {