git-coco 0.18.2 → 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.
@@ -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.18.2";
49
+ const BUILD_VERSION = "0.19.0";
50
50
 
51
51
  const isInteractive = (config) => {
52
52
  return config?.mode === 'interactive' || !!config?.interactive;
@@ -984,7 +984,7 @@ const schema$1 = {
984
984
  "deprecated": "Use \"model\" instead."
985
985
  },
986
986
  "model": {
987
- "type": "string",
987
+ "$ref": "#/definitions/OpenAIChatModelId",
988
988
  "description": "Model name to use"
989
989
  },
990
990
  "modelKwargs": {
@@ -1462,6 +1462,79 @@ const schema$1 = {
1462
1462
  "additionalProperties": false,
1463
1463
  "description": "Base class for all caches. All caches should extend this class."
1464
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
+ },
1465
1538
  "OllamaLLMService": {
1466
1539
  "type": "object",
1467
1540
  "additionalProperties": false,
@@ -6904,6 +6977,11 @@ const options$3 = {
6904
6977
  type: 'boolean',
6905
6978
  default: true,
6906
6979
  },
6980
+ noDiff: {
6981
+ description: 'Only pass basic "git status" result instead of providing entire diff',
6982
+ type: 'boolean',
6983
+ default: false,
6984
+ },
6907
6985
  };
6908
6986
  const builder$3 = (yargs) => {
6909
6987
  return yargs.options(options$3).usage(getCommandUsageHeader(command$3));
@@ -10958,14 +11036,24 @@ const handler$3 = async (argv, logger) => {
10958
11036
  });
10959
11037
  }
10960
11038
  async function factory() {
10961
- const changes = await getChanges({
10962
- git,
10963
- options: {
10964
- ignoredFiles: config.ignoredFiles || undefined,
10965
- ignoredExtensions: config.ignoredExtensions || undefined,
10966
- },
10967
- });
10968
- return changes.staged;
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
+ }
10969
11057
  }
10970
11058
  async function parser(changes) {
10971
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.18.2";
71
+ const BUILD_VERSION = "0.19.0";
72
72
 
73
73
  const isInteractive = (config) => {
74
74
  return config?.mode === 'interactive' || !!config?.interactive;
@@ -1006,7 +1006,7 @@ const schema$1 = {
1006
1006
  "deprecated": "Use \"model\" instead."
1007
1007
  },
1008
1008
  "model": {
1009
- "type": "string",
1009
+ "$ref": "#/definitions/OpenAIChatModelId",
1010
1010
  "description": "Model name to use"
1011
1011
  },
1012
1012
  "modelKwargs": {
@@ -1484,6 +1484,79 @@ const schema$1 = {
1484
1484
  "additionalProperties": false,
1485
1485
  "description": "Base class for all caches. All caches should extend this class."
1486
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
+ },
1487
1560
  "OllamaLLMService": {
1488
1561
  "type": "object",
1489
1562
  "additionalProperties": false,
@@ -6926,6 +6999,11 @@ const options$3 = {
6926
6999
  type: 'boolean',
6927
7000
  default: true,
6928
7001
  },
7002
+ noDiff: {
7003
+ description: 'Only pass basic "git status" result instead of providing entire diff',
7004
+ type: 'boolean',
7005
+ default: false,
7006
+ },
6929
7007
  };
6930
7008
  const builder$3 = (yargs) => {
6931
7009
  return yargs.options(options$3).usage(getCommandUsageHeader(command$3));
@@ -10980,14 +11058,24 @@ const handler$3 = async (argv, logger) => {
10980
11058
  });
10981
11059
  }
10982
11060
  async function factory() {
10983
- const changes = await getChanges({
10984
- git,
10985
- options: {
10986
- ignoredFiles: config.ignoredFiles || undefined,
10987
- ignoredExtensions: config.ignoredExtensions || undefined,
10988
- },
10989
- });
10990
- return changes.staged;
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
+ }
10991
11079
  }
10992
11080
  async function parser(changes) {
10993
11081
  return await fileChangeParser({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-coco",
3
- "version": "0.18.2",
3
+ "version": "0.19.0",
4
4
  "description": "zero-effort git commits with coco.",
5
5
  "author": "gfargo <ghfargo@gmail.com>",
6
6
  "license": "MIT",