Skip to content

Commit a70b831

Browse files
committed
build
1 parent cad1799 commit a70b831

File tree

2 files changed

+937
-19
lines changed

2 files changed

+937
-19
lines changed

out/cli.cjs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16272,7 +16272,7 @@ function G3(t, e2) {
1627216272
// package.json
1627316273
var package_default = {
1627416274
name: "opencommit",
16275-
version: "2.2.9",
16275+
version: "2.2.10",
1627616276
description: "Auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}",
1627716277
keywords: [
1627816278
"git",
@@ -21734,9 +21734,7 @@ var OpenAi = class {
2173421734
max_tokens: maxTokens || 500
2173521735
};
2173621736
try {
21737-
const REQUEST_TOKENS = messages.map(
21738-
(msg) => tokenCount(msg.content) + 4
21739-
).reduce((a2, b5) => a2 + b5, 0);
21737+
const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a2, b5) => a2 + b5, 0);
2174021738
if (REQUEST_TOKENS > DEFAULT_MODEL_TOKEN_LIMIT - maxTokens) {
2174121739
throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */);
2174221740
}
@@ -21761,10 +21759,8 @@ var OpenAi = class {
2176121759
};
2176221760
var getOpenCommitLatestVersion = async () => {
2176321761
try {
21764-
const { data } = await axios_default.get(
21765-
"https://unpkg.com/opencommit/package.json"
21766-
);
21767-
return data.version;
21762+
const { stdout } = await execa("npm", ["view", "opencommit", "version"]);
21763+
return stdout;
2176821764
} catch (_6) {
2176921765
ce("Error while getting the latest version of opencommit");
2177021766
return void 0;

0 commit comments

Comments
 (0)