opencommit 2.0.5 → 2.0.7

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/out/cli.cjs +11 -2
  2. package/package.json +1 -1
package/out/cli.cjs CHANGED
@@ -16076,7 +16076,7 @@ function G3(t, e2) {
16076
16076
  // package.json
16077
16077
  var package_default = {
16078
16078
  name: "opencommit",
16079
- version: "2.0.4",
16079
+ version: "2.0.6",
16080
16080
  description: "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}",
16081
16081
  keywords: [
16082
16082
  "git",
@@ -17429,6 +17429,14 @@ var configValidators = {
17429
17429
  );
17430
17430
  return value;
17431
17431
  },
17432
+ ["OPENAI_MAX_TOKENS" /* OPENAI_MAX_TOKENS */](value) {
17433
+ validateConfig(
17434
+ "OPENAI_MAX_TOKENS" /* OPENAI_MAX_TOKENS */,
17435
+ typeof value === "number",
17436
+ "Must be a number"
17437
+ );
17438
+ return value;
17439
+ },
17432
17440
  ["emoji" /* emoji */](value) {
17433
17441
  validateConfig(
17434
17442
  "emoji" /* emoji */,
@@ -21437,6 +21445,7 @@ var import_openai = __toESM(require_dist(), 1);
21437
21445
  var config = getConfig();
21438
21446
  var apiKey = config?.OPENAI_API_KEY;
21439
21447
  var basePath = config?.OPENAI_BASE_PATH;
21448
+ var maxTokens = config?.OPENAI_MAX_TOKENS;
21440
21449
  var [command, mode] = process.argv.slice(2);
21441
21450
  if (!apiKey && command !== "config" && mode !== "set" /* set */) {
21442
21451
  ae("opencommit");
@@ -21467,7 +21476,7 @@ var OpenAi = class {
21467
21476
  messages,
21468
21477
  temperature: 0,
21469
21478
  top_p: 0.1,
21470
- max_tokens: 196
21479
+ max_tokens: maxTokens ?? 196
21471
21480
  });
21472
21481
  const message = data.choices[0].message;
21473
21482
  return message?.content;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencommit",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
5
5
  "keywords": [
6
6
  "git",