git-coco 0.25.0 → 0.26.0
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/dist/index.esm.mjs +48 -3
- package/dist/index.js +48 -3
- package/package.json +2 -2
package/dist/index.esm.mjs
CHANGED
|
@@ -46,7 +46,7 @@ import { pathToFileURL } from 'url';
|
|
|
46
46
|
/**
|
|
47
47
|
* Current build version from package.json
|
|
48
48
|
*/
|
|
49
|
-
const BUILD_VERSION = "0.
|
|
49
|
+
const BUILD_VERSION = "0.26.0";
|
|
50
50
|
|
|
51
51
|
const isInteractive = (config) => {
|
|
52
52
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -357,8 +357,11 @@ function getDefaultServiceApiKey(config) {
|
|
|
357
357
|
const DEFAULT_OPENAI_LLM_SERVICE = {
|
|
358
358
|
provider: 'openai',
|
|
359
359
|
model: 'gpt-4o-mini',
|
|
360
|
-
tokenLimit:
|
|
360
|
+
tokenLimit: 4096,
|
|
361
361
|
temperature: 0.32,
|
|
362
|
+
maxConcurrent: 12,
|
|
363
|
+
minTokensForSummary: 800,
|
|
364
|
+
maxFileTokens: 2000,
|
|
362
365
|
authentication: {
|
|
363
366
|
type: 'APIKey',
|
|
364
367
|
credentials: {
|
|
@@ -370,6 +373,10 @@ const DEFAULT_ANTHROPIC_LLM_SERVICE = {
|
|
|
370
373
|
provider: 'anthropic',
|
|
371
374
|
model: 'claude-3-5-sonnet-20240620',
|
|
372
375
|
temperature: 0.32,
|
|
376
|
+
tokenLimit: 4096,
|
|
377
|
+
maxConcurrent: 12,
|
|
378
|
+
minTokensForSummary: 800,
|
|
379
|
+
maxFileTokens: 2000,
|
|
373
380
|
authentication: {
|
|
374
381
|
type: 'APIKey',
|
|
375
382
|
credentials: {
|
|
@@ -382,9 +389,11 @@ const DEFAULT_OLLAMA_LLM_SERVICE = {
|
|
|
382
389
|
model: 'llama3',
|
|
383
390
|
endpoint: 'http://localhost:11434',
|
|
384
391
|
maxConcurrent: 1,
|
|
385
|
-
tokenLimit:
|
|
392
|
+
tokenLimit: 4096,
|
|
386
393
|
temperature: 0.4,
|
|
387
394
|
maxParsingAttempts: 3,
|
|
395
|
+
minTokensForSummary: 800,
|
|
396
|
+
maxFileTokens: 2000,
|
|
388
397
|
authentication: {
|
|
389
398
|
type: 'None',
|
|
390
399
|
credentials: undefined,
|
|
@@ -632,6 +641,24 @@ function loadGitConfig(config) {
|
|
|
632
641
|
service = {
|
|
633
642
|
provider: gitConfigParsed.coco?.serviceProvider,
|
|
634
643
|
model: gitConfigParsed.coco?.serviceModel,
|
|
644
|
+
tokenLimit: gitConfigParsed.coco?.serviceTokenLimit
|
|
645
|
+
? Number(gitConfigParsed.coco.serviceTokenLimit)
|
|
646
|
+
: undefined,
|
|
647
|
+
temperature: gitConfigParsed.coco?.serviceTemperature
|
|
648
|
+
? Number(gitConfigParsed.coco.serviceTemperature)
|
|
649
|
+
: undefined,
|
|
650
|
+
maxConcurrent: gitConfigParsed.coco?.serviceMaxConcurrent
|
|
651
|
+
? Number(gitConfigParsed.coco.serviceMaxConcurrent)
|
|
652
|
+
: undefined,
|
|
653
|
+
minTokensForSummary: gitConfigParsed.coco?.serviceMinTokensForSummary
|
|
654
|
+
? Number(gitConfigParsed.coco.serviceMinTokensForSummary)
|
|
655
|
+
: undefined,
|
|
656
|
+
maxFileTokens: gitConfigParsed.coco?.serviceMaxFileTokens
|
|
657
|
+
? Number(gitConfigParsed.coco.serviceMaxFileTokens)
|
|
658
|
+
: undefined,
|
|
659
|
+
maxParsingAttempts: gitConfigParsed.coco?.serviceMaxParsingAttempts
|
|
660
|
+
? Number(gitConfigParsed.coco.serviceMaxParsingAttempts)
|
|
661
|
+
: undefined,
|
|
635
662
|
authentication: {
|
|
636
663
|
type: 'APIKey',
|
|
637
664
|
credentials: {
|
|
@@ -687,6 +714,24 @@ const appendToGitConfig = async (filePath, config) => {
|
|
|
687
714
|
if (service.authentication.type === 'APIKey') {
|
|
688
715
|
contentLines.push(` serviceApiKey = ${service.authentication.credentials.apiKey}`);
|
|
689
716
|
}
|
|
717
|
+
if (service.tokenLimit !== undefined) {
|
|
718
|
+
contentLines.push(` serviceTokenLimit = ${service.tokenLimit}`);
|
|
719
|
+
}
|
|
720
|
+
if (service.temperature !== undefined) {
|
|
721
|
+
contentLines.push(` serviceTemperature = ${service.temperature}`);
|
|
722
|
+
}
|
|
723
|
+
if (service.maxConcurrent !== undefined) {
|
|
724
|
+
contentLines.push(` serviceMaxConcurrent = ${service.maxConcurrent}`);
|
|
725
|
+
}
|
|
726
|
+
if (service.minTokensForSummary !== undefined) {
|
|
727
|
+
contentLines.push(` serviceMinTokensForSummary = ${service.minTokensForSummary}`);
|
|
728
|
+
}
|
|
729
|
+
if (service.maxFileTokens !== undefined) {
|
|
730
|
+
contentLines.push(` serviceMaxFileTokens = ${service.maxFileTokens}`);
|
|
731
|
+
}
|
|
732
|
+
if (service.maxParsingAttempts !== undefined) {
|
|
733
|
+
contentLines.push(` serviceMaxParsingAttempts = ${service.maxParsingAttempts}`);
|
|
734
|
+
}
|
|
690
735
|
if (service.requestOptions?.timeout) {
|
|
691
736
|
contentLines.push(` serviceRequestOptionsTimeout = ${service.requestOptions.timeout}`);
|
|
692
737
|
}
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ var readline__namespace = /*#__PURE__*/_interopNamespaceDefault(readline);
|
|
|
68
68
|
/**
|
|
69
69
|
* Current build version from package.json
|
|
70
70
|
*/
|
|
71
|
-
const BUILD_VERSION = "0.
|
|
71
|
+
const BUILD_VERSION = "0.26.0";
|
|
72
72
|
|
|
73
73
|
const isInteractive = (config) => {
|
|
74
74
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -379,8 +379,11 @@ function getDefaultServiceApiKey(config) {
|
|
|
379
379
|
const DEFAULT_OPENAI_LLM_SERVICE = {
|
|
380
380
|
provider: 'openai',
|
|
381
381
|
model: 'gpt-4o-mini',
|
|
382
|
-
tokenLimit:
|
|
382
|
+
tokenLimit: 4096,
|
|
383
383
|
temperature: 0.32,
|
|
384
|
+
maxConcurrent: 12,
|
|
385
|
+
minTokensForSummary: 800,
|
|
386
|
+
maxFileTokens: 2000,
|
|
384
387
|
authentication: {
|
|
385
388
|
type: 'APIKey',
|
|
386
389
|
credentials: {
|
|
@@ -392,6 +395,10 @@ const DEFAULT_ANTHROPIC_LLM_SERVICE = {
|
|
|
392
395
|
provider: 'anthropic',
|
|
393
396
|
model: 'claude-3-5-sonnet-20240620',
|
|
394
397
|
temperature: 0.32,
|
|
398
|
+
tokenLimit: 4096,
|
|
399
|
+
maxConcurrent: 12,
|
|
400
|
+
minTokensForSummary: 800,
|
|
401
|
+
maxFileTokens: 2000,
|
|
395
402
|
authentication: {
|
|
396
403
|
type: 'APIKey',
|
|
397
404
|
credentials: {
|
|
@@ -404,9 +411,11 @@ const DEFAULT_OLLAMA_LLM_SERVICE = {
|
|
|
404
411
|
model: 'llama3',
|
|
405
412
|
endpoint: 'http://localhost:11434',
|
|
406
413
|
maxConcurrent: 1,
|
|
407
|
-
tokenLimit:
|
|
414
|
+
tokenLimit: 4096,
|
|
408
415
|
temperature: 0.4,
|
|
409
416
|
maxParsingAttempts: 3,
|
|
417
|
+
minTokensForSummary: 800,
|
|
418
|
+
maxFileTokens: 2000,
|
|
410
419
|
authentication: {
|
|
411
420
|
type: 'None',
|
|
412
421
|
credentials: undefined,
|
|
@@ -654,6 +663,24 @@ function loadGitConfig(config) {
|
|
|
654
663
|
service = {
|
|
655
664
|
provider: gitConfigParsed.coco?.serviceProvider,
|
|
656
665
|
model: gitConfigParsed.coco?.serviceModel,
|
|
666
|
+
tokenLimit: gitConfigParsed.coco?.serviceTokenLimit
|
|
667
|
+
? Number(gitConfigParsed.coco.serviceTokenLimit)
|
|
668
|
+
: undefined,
|
|
669
|
+
temperature: gitConfigParsed.coco?.serviceTemperature
|
|
670
|
+
? Number(gitConfigParsed.coco.serviceTemperature)
|
|
671
|
+
: undefined,
|
|
672
|
+
maxConcurrent: gitConfigParsed.coco?.serviceMaxConcurrent
|
|
673
|
+
? Number(gitConfigParsed.coco.serviceMaxConcurrent)
|
|
674
|
+
: undefined,
|
|
675
|
+
minTokensForSummary: gitConfigParsed.coco?.serviceMinTokensForSummary
|
|
676
|
+
? Number(gitConfigParsed.coco.serviceMinTokensForSummary)
|
|
677
|
+
: undefined,
|
|
678
|
+
maxFileTokens: gitConfigParsed.coco?.serviceMaxFileTokens
|
|
679
|
+
? Number(gitConfigParsed.coco.serviceMaxFileTokens)
|
|
680
|
+
: undefined,
|
|
681
|
+
maxParsingAttempts: gitConfigParsed.coco?.serviceMaxParsingAttempts
|
|
682
|
+
? Number(gitConfigParsed.coco.serviceMaxParsingAttempts)
|
|
683
|
+
: undefined,
|
|
657
684
|
authentication: {
|
|
658
685
|
type: 'APIKey',
|
|
659
686
|
credentials: {
|
|
@@ -709,6 +736,24 @@ const appendToGitConfig = async (filePath, config) => {
|
|
|
709
736
|
if (service.authentication.type === 'APIKey') {
|
|
710
737
|
contentLines.push(` serviceApiKey = ${service.authentication.credentials.apiKey}`);
|
|
711
738
|
}
|
|
739
|
+
if (service.tokenLimit !== undefined) {
|
|
740
|
+
contentLines.push(` serviceTokenLimit = ${service.tokenLimit}`);
|
|
741
|
+
}
|
|
742
|
+
if (service.temperature !== undefined) {
|
|
743
|
+
contentLines.push(` serviceTemperature = ${service.temperature}`);
|
|
744
|
+
}
|
|
745
|
+
if (service.maxConcurrent !== undefined) {
|
|
746
|
+
contentLines.push(` serviceMaxConcurrent = ${service.maxConcurrent}`);
|
|
747
|
+
}
|
|
748
|
+
if (service.minTokensForSummary !== undefined) {
|
|
749
|
+
contentLines.push(` serviceMinTokensForSummary = ${service.minTokensForSummary}`);
|
|
750
|
+
}
|
|
751
|
+
if (service.maxFileTokens !== undefined) {
|
|
752
|
+
contentLines.push(` serviceMaxFileTokens = ${service.maxFileTokens}`);
|
|
753
|
+
}
|
|
754
|
+
if (service.maxParsingAttempts !== undefined) {
|
|
755
|
+
contentLines.push(` serviceMaxParsingAttempts = ${service.maxParsingAttempts}`);
|
|
756
|
+
}
|
|
712
757
|
if (service.requestOptions?.timeout) {
|
|
713
758
|
contentLines.push(` serviceRequestOptionsTimeout = ${service.requestOptions.timeout}`);
|
|
714
759
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-coco",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "zero-effort git commits with coco.",
|
|
5
5
|
"author": "gfargo <ghfargo@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/diff": "^8.0.0",
|
|
54
54
|
"@types/ini": "^4.1.1",
|
|
55
55
|
"@types/jest": "^30.0.0",
|
|
56
|
-
"@types/node": "^
|
|
56
|
+
"@types/node": "^25.0.10",
|
|
57
57
|
"@types/yargs": "^17.0.33",
|
|
58
58
|
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
|
59
59
|
"@typescript-eslint/parser": "^7.13.1",
|