git-coco 0.18.1 → 0.19.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.d.ts +3 -0
- package/dist/index.esm.mjs +108 -11
- package/dist/index.js +108 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ type AnthropicModel = 'claude-sonnet-4-0' | 'claude-3-7-sonnet-latest' | 'claude
|
|
|
16
16
|
type OllamaModel = 'deepseek-r1:1.5b' | 'deepseek-r1:8b' | 'deepseek-r1:32b' | 'codegemma:2b' | 'codegemma:7b-code' | 'codegemma' | 'codellama:13b' | 'codellama:34b' | 'codellama:70b' | 'codellama:7b' | 'codellama:instruct' | 'codellama:latest' | 'codellama' | 'gemma:2b' | 'gemma:7b' | 'gemma:latest' | 'gemma' | 'llama2:13b' | 'llama2:70b' | 'llama2:chat' | 'llama2:latest' | 'llama2:text' | 'llama2' | 'llama3:70b-text' | 'llama3:70b' | 'llama3:latest' | 'llama3:text' | 'llama3.1:70b' | 'llama3.1:8b' | 'llama3.1:latest' | 'llama3.2' | 'llama3.2:latest' | 'llama3.2:1b' | 'llama3.2:3b' | 'llama3' | 'llava-llama3:latest' | 'dolphin-llama3:latest' | 'dolphin-llama3:8b' | 'dolphin-llama3:70b' | 'mistral:7b' | 'mistral:latest' | 'mistral:text' | 'mistral' | 'phi3:14b' | 'phi3:3.8b' | 'phi3:instruct' | 'phi3:medium-128k' | 'phi3:medium-4k' | 'phi3:medium' | 'phi3' | 'qwen2:0.5b' | 'qwen2:1.5b' | 'qwen2:72b-text' | 'qwen2:72b' | 'qwen2' | 'qwen2.5-coder:latest' | 'qwen2.5-coder:0.5b' | 'qwen2.5-coder:1.5b' | 'qwen2.5-coder:3b' | 'qwen2.5-coder:7b' | 'qwen2.5-coder:14b' | 'qwen2.5-coder:32b';
|
|
17
17
|
type LLMModel = OpenAIModel | OllamaModel | AnthropicModel;
|
|
18
18
|
type BaseLLMService = {
|
|
19
|
+
/**
|
|
20
|
+
* @additionalProperties true
|
|
21
|
+
*/
|
|
19
22
|
provider: LLMProvider;
|
|
20
23
|
model: LLMModel;
|
|
21
24
|
/**
|
package/dist/index.esm.mjs
CHANGED
|
@@ -46,7 +46,7 @@ import * as readline from 'readline';
|
|
|
46
46
|
/**
|
|
47
47
|
* Current build version from package.json
|
|
48
48
|
*/
|
|
49
|
-
const BUILD_VERSION = "0.
|
|
49
|
+
const BUILD_VERSION = "0.19.0";
|
|
50
50
|
|
|
51
51
|
const isInteractive = (config) => {
|
|
52
52
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -639,8 +639,17 @@ function loadGitConfig(config) {
|
|
|
639
639
|
}
|
|
640
640
|
config = {
|
|
641
641
|
...config,
|
|
642
|
-
...gitConfigParsed.coco,
|
|
643
642
|
service: service,
|
|
643
|
+
prompt: gitConfigParsed.coco?.prompt || config.prompt,
|
|
644
|
+
mode: gitConfigParsed.coco?.mode || config.mode,
|
|
645
|
+
summarizePrompt: gitConfigParsed.coco?.summarizePrompt || config.summarizePrompt,
|
|
646
|
+
ignoredFiles: gitConfigParsed.coco?.ignoredFiles || config.ignoredFiles,
|
|
647
|
+
ignoredExtensions: gitConfigParsed.coco?.ignoredExtensions || config.ignoredExtensions,
|
|
648
|
+
defaultBranch: gitConfigParsed.coco?.defaultBranch || config.defaultBranch,
|
|
649
|
+
verbose: gitConfigParsed.coco?.verbose || config.verbose,
|
|
650
|
+
conventionalCommits: gitConfigParsed.coco?.conventionalCommits || config.conventionalCommits,
|
|
651
|
+
openInEditor: gitConfigParsed.coco?.openInEditor || config.openInEditor,
|
|
652
|
+
includeBranchName: gitConfigParsed.coco?.includeBranchName || config.includeBranchName,
|
|
644
653
|
};
|
|
645
654
|
}
|
|
646
655
|
return removeUndefined(config);
|
|
@@ -975,7 +984,7 @@ const schema$1 = {
|
|
|
975
984
|
"deprecated": "Use \"model\" instead."
|
|
976
985
|
},
|
|
977
986
|
"model": {
|
|
978
|
-
"
|
|
987
|
+
"$ref": "#/definitions/OpenAIChatModelId",
|
|
979
988
|
"description": "Model name to use"
|
|
980
989
|
},
|
|
981
990
|
"modelKwargs": {
|
|
@@ -1453,6 +1462,79 @@ const schema$1 = {
|
|
|
1453
1462
|
"additionalProperties": false,
|
|
1454
1463
|
"description": "Base class for all caches. All caches should extend this class."
|
|
1455
1464
|
},
|
|
1465
|
+
"OpenAIChatModelId": {
|
|
1466
|
+
"anyOf": [
|
|
1467
|
+
{
|
|
1468
|
+
"$ref": "#/definitions/OpenAI.ChatModel"
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"type": "string"
|
|
1472
|
+
}
|
|
1473
|
+
]
|
|
1474
|
+
},
|
|
1475
|
+
"OpenAI.ChatModel": {
|
|
1476
|
+
"$ref": "#/definitions/ChatModel"
|
|
1477
|
+
},
|
|
1478
|
+
"ChatModel": {
|
|
1479
|
+
"type": "string",
|
|
1480
|
+
"enum": [
|
|
1481
|
+
"gpt-4.1",
|
|
1482
|
+
"gpt-4.1-mini",
|
|
1483
|
+
"gpt-4.1-nano",
|
|
1484
|
+
"gpt-4.1-2025-04-14",
|
|
1485
|
+
"gpt-4.1-mini-2025-04-14",
|
|
1486
|
+
"gpt-4.1-nano-2025-04-14",
|
|
1487
|
+
"o4-mini",
|
|
1488
|
+
"o4-mini-2025-04-16",
|
|
1489
|
+
"o3",
|
|
1490
|
+
"o3-2025-04-16",
|
|
1491
|
+
"o3-mini",
|
|
1492
|
+
"o3-mini-2025-01-31",
|
|
1493
|
+
"o1",
|
|
1494
|
+
"o1-2024-12-17",
|
|
1495
|
+
"o1-preview",
|
|
1496
|
+
"o1-preview-2024-09-12",
|
|
1497
|
+
"o1-mini",
|
|
1498
|
+
"o1-mini-2024-09-12",
|
|
1499
|
+
"gpt-4o",
|
|
1500
|
+
"gpt-4o-2024-11-20",
|
|
1501
|
+
"gpt-4o-2024-08-06",
|
|
1502
|
+
"gpt-4o-2024-05-13",
|
|
1503
|
+
"gpt-4o-audio-preview",
|
|
1504
|
+
"gpt-4o-audio-preview-2024-10-01",
|
|
1505
|
+
"gpt-4o-audio-preview-2024-12-17",
|
|
1506
|
+
"gpt-4o-audio-preview-2025-06-03",
|
|
1507
|
+
"gpt-4o-mini-audio-preview",
|
|
1508
|
+
"gpt-4o-mini-audio-preview-2024-12-17",
|
|
1509
|
+
"gpt-4o-search-preview",
|
|
1510
|
+
"gpt-4o-mini-search-preview",
|
|
1511
|
+
"gpt-4o-search-preview-2025-03-11",
|
|
1512
|
+
"gpt-4o-mini-search-preview-2025-03-11",
|
|
1513
|
+
"chatgpt-4o-latest",
|
|
1514
|
+
"codex-mini-latest",
|
|
1515
|
+
"gpt-4o-mini",
|
|
1516
|
+
"gpt-4o-mini-2024-07-18",
|
|
1517
|
+
"gpt-4-turbo",
|
|
1518
|
+
"gpt-4-turbo-2024-04-09",
|
|
1519
|
+
"gpt-4-0125-preview",
|
|
1520
|
+
"gpt-4-turbo-preview",
|
|
1521
|
+
"gpt-4-1106-preview",
|
|
1522
|
+
"gpt-4-vision-preview",
|
|
1523
|
+
"gpt-4",
|
|
1524
|
+
"gpt-4-0314",
|
|
1525
|
+
"gpt-4-0613",
|
|
1526
|
+
"gpt-4-32k",
|
|
1527
|
+
"gpt-4-32k-0314",
|
|
1528
|
+
"gpt-4-32k-0613",
|
|
1529
|
+
"gpt-3.5-turbo",
|
|
1530
|
+
"gpt-3.5-turbo-16k",
|
|
1531
|
+
"gpt-3.5-turbo-0301",
|
|
1532
|
+
"gpt-3.5-turbo-0613",
|
|
1533
|
+
"gpt-3.5-turbo-1106",
|
|
1534
|
+
"gpt-3.5-turbo-0125",
|
|
1535
|
+
"gpt-3.5-turbo-16k-0613"
|
|
1536
|
+
]
|
|
1537
|
+
},
|
|
1456
1538
|
"OllamaLLMService": {
|
|
1457
1539
|
"type": "object",
|
|
1458
1540
|
"additionalProperties": false,
|
|
@@ -6895,6 +6977,11 @@ const options$3 = {
|
|
|
6895
6977
|
type: 'boolean',
|
|
6896
6978
|
default: true,
|
|
6897
6979
|
},
|
|
6980
|
+
noDiff: {
|
|
6981
|
+
description: 'Only pass basic "git status" result instead of providing entire diff',
|
|
6982
|
+
type: 'boolean',
|
|
6983
|
+
default: false,
|
|
6984
|
+
},
|
|
6898
6985
|
};
|
|
6899
6986
|
const builder$3 = (yargs) => {
|
|
6900
6987
|
return yargs.options(options$3).usage(getCommandUsageHeader(command$3));
|
|
@@ -10949,14 +11036,24 @@ const handler$3 = async (argv, logger) => {
|
|
|
10949
11036
|
});
|
|
10950
11037
|
}
|
|
10951
11038
|
async function factory() {
|
|
10952
|
-
|
|
10953
|
-
git
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
11039
|
+
if (config.noDiff) {
|
|
11040
|
+
const status = await git.status();
|
|
11041
|
+
return status.files.map(file => ({
|
|
11042
|
+
filePath: file.path,
|
|
11043
|
+
status: (file.index === 'A' || file.index === '?' ? 'added' : 'modified'),
|
|
11044
|
+
summary: file.path, // Simplified summary for noDiff
|
|
11045
|
+
}));
|
|
11046
|
+
}
|
|
11047
|
+
else {
|
|
11048
|
+
const changes = await getChanges({
|
|
11049
|
+
git,
|
|
11050
|
+
options: {
|
|
11051
|
+
ignoredFiles: config.ignoredFiles || undefined,
|
|
11052
|
+
ignoredExtensions: config.ignoredExtensions || undefined,
|
|
11053
|
+
},
|
|
11054
|
+
});
|
|
11055
|
+
return changes.staged;
|
|
11056
|
+
}
|
|
10960
11057
|
}
|
|
10961
11058
|
async function parser(changes) {
|
|
10962
11059
|
return await fileChangeParser({
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ var readline__namespace = /*#__PURE__*/_interopNamespaceDefault(readline$1);
|
|
|
68
68
|
/**
|
|
69
69
|
* Current build version from package.json
|
|
70
70
|
*/
|
|
71
|
-
const BUILD_VERSION = "0.
|
|
71
|
+
const BUILD_VERSION = "0.19.0";
|
|
72
72
|
|
|
73
73
|
const isInteractive = (config) => {
|
|
74
74
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -661,8 +661,17 @@ function loadGitConfig(config) {
|
|
|
661
661
|
}
|
|
662
662
|
config = {
|
|
663
663
|
...config,
|
|
664
|
-
...gitConfigParsed.coco,
|
|
665
664
|
service: service,
|
|
665
|
+
prompt: gitConfigParsed.coco?.prompt || config.prompt,
|
|
666
|
+
mode: gitConfigParsed.coco?.mode || config.mode,
|
|
667
|
+
summarizePrompt: gitConfigParsed.coco?.summarizePrompt || config.summarizePrompt,
|
|
668
|
+
ignoredFiles: gitConfigParsed.coco?.ignoredFiles || config.ignoredFiles,
|
|
669
|
+
ignoredExtensions: gitConfigParsed.coco?.ignoredExtensions || config.ignoredExtensions,
|
|
670
|
+
defaultBranch: gitConfigParsed.coco?.defaultBranch || config.defaultBranch,
|
|
671
|
+
verbose: gitConfigParsed.coco?.verbose || config.verbose,
|
|
672
|
+
conventionalCommits: gitConfigParsed.coco?.conventionalCommits || config.conventionalCommits,
|
|
673
|
+
openInEditor: gitConfigParsed.coco?.openInEditor || config.openInEditor,
|
|
674
|
+
includeBranchName: gitConfigParsed.coco?.includeBranchName || config.includeBranchName,
|
|
666
675
|
};
|
|
667
676
|
}
|
|
668
677
|
return removeUndefined(config);
|
|
@@ -997,7 +1006,7 @@ const schema$1 = {
|
|
|
997
1006
|
"deprecated": "Use \"model\" instead."
|
|
998
1007
|
},
|
|
999
1008
|
"model": {
|
|
1000
|
-
"
|
|
1009
|
+
"$ref": "#/definitions/OpenAIChatModelId",
|
|
1001
1010
|
"description": "Model name to use"
|
|
1002
1011
|
},
|
|
1003
1012
|
"modelKwargs": {
|
|
@@ -1475,6 +1484,79 @@ const schema$1 = {
|
|
|
1475
1484
|
"additionalProperties": false,
|
|
1476
1485
|
"description": "Base class for all caches. All caches should extend this class."
|
|
1477
1486
|
},
|
|
1487
|
+
"OpenAIChatModelId": {
|
|
1488
|
+
"anyOf": [
|
|
1489
|
+
{
|
|
1490
|
+
"$ref": "#/definitions/OpenAI.ChatModel"
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
"type": "string"
|
|
1494
|
+
}
|
|
1495
|
+
]
|
|
1496
|
+
},
|
|
1497
|
+
"OpenAI.ChatModel": {
|
|
1498
|
+
"$ref": "#/definitions/ChatModel"
|
|
1499
|
+
},
|
|
1500
|
+
"ChatModel": {
|
|
1501
|
+
"type": "string",
|
|
1502
|
+
"enum": [
|
|
1503
|
+
"gpt-4.1",
|
|
1504
|
+
"gpt-4.1-mini",
|
|
1505
|
+
"gpt-4.1-nano",
|
|
1506
|
+
"gpt-4.1-2025-04-14",
|
|
1507
|
+
"gpt-4.1-mini-2025-04-14",
|
|
1508
|
+
"gpt-4.1-nano-2025-04-14",
|
|
1509
|
+
"o4-mini",
|
|
1510
|
+
"o4-mini-2025-04-16",
|
|
1511
|
+
"o3",
|
|
1512
|
+
"o3-2025-04-16",
|
|
1513
|
+
"o3-mini",
|
|
1514
|
+
"o3-mini-2025-01-31",
|
|
1515
|
+
"o1",
|
|
1516
|
+
"o1-2024-12-17",
|
|
1517
|
+
"o1-preview",
|
|
1518
|
+
"o1-preview-2024-09-12",
|
|
1519
|
+
"o1-mini",
|
|
1520
|
+
"o1-mini-2024-09-12",
|
|
1521
|
+
"gpt-4o",
|
|
1522
|
+
"gpt-4o-2024-11-20",
|
|
1523
|
+
"gpt-4o-2024-08-06",
|
|
1524
|
+
"gpt-4o-2024-05-13",
|
|
1525
|
+
"gpt-4o-audio-preview",
|
|
1526
|
+
"gpt-4o-audio-preview-2024-10-01",
|
|
1527
|
+
"gpt-4o-audio-preview-2024-12-17",
|
|
1528
|
+
"gpt-4o-audio-preview-2025-06-03",
|
|
1529
|
+
"gpt-4o-mini-audio-preview",
|
|
1530
|
+
"gpt-4o-mini-audio-preview-2024-12-17",
|
|
1531
|
+
"gpt-4o-search-preview",
|
|
1532
|
+
"gpt-4o-mini-search-preview",
|
|
1533
|
+
"gpt-4o-search-preview-2025-03-11",
|
|
1534
|
+
"gpt-4o-mini-search-preview-2025-03-11",
|
|
1535
|
+
"chatgpt-4o-latest",
|
|
1536
|
+
"codex-mini-latest",
|
|
1537
|
+
"gpt-4o-mini",
|
|
1538
|
+
"gpt-4o-mini-2024-07-18",
|
|
1539
|
+
"gpt-4-turbo",
|
|
1540
|
+
"gpt-4-turbo-2024-04-09",
|
|
1541
|
+
"gpt-4-0125-preview",
|
|
1542
|
+
"gpt-4-turbo-preview",
|
|
1543
|
+
"gpt-4-1106-preview",
|
|
1544
|
+
"gpt-4-vision-preview",
|
|
1545
|
+
"gpt-4",
|
|
1546
|
+
"gpt-4-0314",
|
|
1547
|
+
"gpt-4-0613",
|
|
1548
|
+
"gpt-4-32k",
|
|
1549
|
+
"gpt-4-32k-0314",
|
|
1550
|
+
"gpt-4-32k-0613",
|
|
1551
|
+
"gpt-3.5-turbo",
|
|
1552
|
+
"gpt-3.5-turbo-16k",
|
|
1553
|
+
"gpt-3.5-turbo-0301",
|
|
1554
|
+
"gpt-3.5-turbo-0613",
|
|
1555
|
+
"gpt-3.5-turbo-1106",
|
|
1556
|
+
"gpt-3.5-turbo-0125",
|
|
1557
|
+
"gpt-3.5-turbo-16k-0613"
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1478
1560
|
"OllamaLLMService": {
|
|
1479
1561
|
"type": "object",
|
|
1480
1562
|
"additionalProperties": false,
|
|
@@ -6917,6 +6999,11 @@ const options$3 = {
|
|
|
6917
6999
|
type: 'boolean',
|
|
6918
7000
|
default: true,
|
|
6919
7001
|
},
|
|
7002
|
+
noDiff: {
|
|
7003
|
+
description: 'Only pass basic "git status" result instead of providing entire diff',
|
|
7004
|
+
type: 'boolean',
|
|
7005
|
+
default: false,
|
|
7006
|
+
},
|
|
6920
7007
|
};
|
|
6921
7008
|
const builder$3 = (yargs) => {
|
|
6922
7009
|
return yargs.options(options$3).usage(getCommandUsageHeader(command$3));
|
|
@@ -10971,14 +11058,24 @@ const handler$3 = async (argv, logger) => {
|
|
|
10971
11058
|
});
|
|
10972
11059
|
}
|
|
10973
11060
|
async function factory() {
|
|
10974
|
-
|
|
10975
|
-
git
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
11061
|
+
if (config.noDiff) {
|
|
11062
|
+
const status = await git.status();
|
|
11063
|
+
return status.files.map(file => ({
|
|
11064
|
+
filePath: file.path,
|
|
11065
|
+
status: (file.index === 'A' || file.index === '?' ? 'added' : 'modified'),
|
|
11066
|
+
summary: file.path, // Simplified summary for noDiff
|
|
11067
|
+
}));
|
|
11068
|
+
}
|
|
11069
|
+
else {
|
|
11070
|
+
const changes = await getChanges({
|
|
11071
|
+
git,
|
|
11072
|
+
options: {
|
|
11073
|
+
ignoredFiles: config.ignoredFiles || undefined,
|
|
11074
|
+
ignoredExtensions: config.ignoredExtensions || undefined,
|
|
11075
|
+
},
|
|
11076
|
+
});
|
|
11077
|
+
return changes.staged;
|
|
11078
|
+
}
|
|
10982
11079
|
}
|
|
10983
11080
|
async function parser(changes) {
|
|
10984
11081
|
return await fileChangeParser({
|