Compare commits

..

10 Commits

Author SHA1 Message Date
di-sukharev
1080544631 2.0.12 2023-05-04 16:38:28 +08:00
di-sukharev
de68e6cc7a docs(README.md): add instructions for configuring openAI maxTokens and BASE_PATH parameters to customize API usage 2023-05-04 16:38:02 +08:00
di-sukharev
5addb7df25 2.0.11 2023-05-04 14:29:11 +08:00
di-sukharev
e447575980 2.0.10 2023-05-04 14:29:05 +08:00
di-sukharev
ffebbc6e1b docs: update opencommit-example.png to reflect recent changes in UI 2023-05-04 14:28:55 +08:00
di-sukharev
dab0f58d14 2.0.9 2023-05-04 12:52:22 +08:00
di-sukharev
226e21c28f 2.0.8 2023-05-04 12:52:14 +08:00
di-sukharev
0bb89abccc Merge remote-tracking branch 'origin/dev' 2023-05-04 12:51:35 +08:00
Tanoshii
ad70a90b1f Update commit.ts (#154)
* fixed type
2023-05-04 12:50:09 +08:00
di-sukharev
4deaf56e5a 2.0.7 2023-05-04 12:42:30 +08:00
7 changed files with 26 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

@@ -96,6 +96,24 @@ To remove description:
oc config set description=false
```
### Configure openAI maxTokens param
Default value for `maxTokens` is 196, sometimes you can get 400 error if request+response exceeds `maxToken` parameter.
so you can increase it:
```sh
oc config set OPENAI_MAX_TOKENS=<number>
```
### Configure BASE_PATH for openAI api
if you want to call GPT via proxy — you can change `BASE_PATH` parameter:
```sh
oc config set OPENAI_BASE_PATH=<string>
```
### Internationalization support
To specify the language used to generate commit messages:

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "opencommit",
"version": "2.0.6",
"version": "2.0.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "opencommit",
"version": "2.0.6",
"version": "2.0.12",
"license": "MIT",
"dependencies": {
"@clack/prompts": "^0.6.1",

View File

@@ -1,6 +1,6 @@
{
"name": "opencommit",
"version": "2.0.6",
"version": "2.0.12",
"description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
"keywords": [
"git",

View File

@@ -73,7 +73,7 @@ ${chalk.grey('——————————————————')}`
...extraArgs
]);
outro(`${chalk.green('✔')} successfully committed`);
outro(`${chalk.green('✔')} Successfully committed`);
outro(stdout);
@@ -102,7 +102,7 @@ ${chalk.grey('——————————————————')}`
]);
pushSpinner.stop(
`${chalk.green('✔')} successfully pushed all commits to ${remotes[0]}`
`${chalk.green('✔')} Successfully pushed all commits to ${remotes[0]}`
);
if (stdout) outro(stdout);
@@ -126,7 +126,7 @@ ${chalk.grey('——————————————————')}`
pushSpinner.stop(
`${chalk.green(
'✔'
)} successfully pushed all commits to ${selectedRemote}`
)} Successfully pushed all commits to ${selectedRemote}`
);
if (stdout) outro(stdout);

View File

@@ -159,7 +159,7 @@ export const setConfig = (keyValues: [key: string, value: string][]) => {
writeFileSync(configPath, iniStringify(config), 'utf8');
outro(`${chalk.green('✔')} config successfully set`);
outro(`${chalk.green('✔')} Config successfully set`);
};
export const configCommand = command(

View File

@@ -92,7 +92,7 @@ export const hookCommand = command(
}
throw new Error(
`unsupported mode: ${mode}. Supported modes are: 'set' or 'unset'`
`Unsupported mode: ${mode}. Supported modes are: 'set' or 'unset'`
);
} catch (error) {
outro(`${chalk.red('✖')} ${error}`);