git-coco 0.14.3 โ†’ 0.14.5

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![NPM Version](https://img.shields.io/npm/v/git-coco.svg)](https://www.npmjs.com/package/git-coco)
7
7
  [![NPM Downloads](https://img.shields.io/npm/dt/git-coco.svg)](https://www.npmjs.com/package/git-coco)
8
8
 
9
- `coco`, the Commit Copilot, transcends being merely a robotic scribe for crafting git commit messages. Leveraging the capabilities of [LangChain๐Ÿฆœ๐Ÿ”—](https://js.langchain.com/) and LLMs, `coco` is committed to providing a suite of insightful tools aimed at enhancing and streamlining your git workflow!
9
+ `coco`, your AI-powered git assistant for the command line, is more than just a robotic scribe. Powered by [LangChain๐Ÿฆœ๐Ÿ”—](https://js.langchain.com/) and available in both CommonJS and ESM, it generates commit messages, creates changelogs, summarizes code changes, performs code reviews, and more - with new features being added regularly!
10
10
 
11
11
  ## Commands
12
12
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  - **`changelog`**: create changelogs for the current branch or a range of commits.
16
16
 
17
- - **`recap`**: summarize changes from working-tree, or yesterday, or in the last month, or since the last tag!
17
+ - **`recap`**: summarize changes from working-tree, or yesterday, or in the last month, or since the last tag.
18
18
 
19
19
  - **`review`**: perform a code review on the changes in the working directory.
20
20
 
@@ -50,7 +50,6 @@ coco commit
50
50
 
51
51
  #### Useful options
52
52
 
53
-
54
53
  ```bash
55
54
  # --append
56
55
  # Add content to the end of the generated commit
@@ -65,7 +64,6 @@ coco --append-ticket
65
64
  coco --additional "Resolves UX bug with sign up button"
66
65
  ```
67
66
 
68
-
69
67
  ### **`coco changelog`**
70
68
 
71
69
  Creates changelogs.
@@ -121,7 +119,6 @@ The `.coco.config` documentation has moved to our [wiki](https://github.com/gfar
121
119
 
122
120
  You can specify files to be ignored when generating commit messages by adding them to your config file or via command line flags. Read more about ignoring files & extensions in the [wiki](https://github.com/gfargo/coco/wiki/Ignoring-Files-&-Extensions).
123
121
 
124
-
125
122
  ## Contribution
126
123
 
127
124
  We welcome contributions! Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
@@ -132,4 +129,4 @@ We welcome contributions! Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for m
132
129
 
133
130
  ## License
134
131
 
135
- MIT ยฉ [gfargo](https://github.com/gfargo/)
132
+ MIT ยฉ [gfargo](https://github.com/gfargo/)
@@ -55,7 +55,7 @@ import * as readline from 'readline';
55
55
  /**
56
56
  * Current build version from package.json
57
57
  */
58
- const BUILD_VERSION = "0.14.3";
58
+ const BUILD_VERSION = "0.14.5";
59
59
 
60
60
  const isInteractive = (config) => {
61
61
  return config?.mode === 'interactive' || !!config?.interactive;
@@ -230,7 +230,7 @@ function getDefaultServiceApiKey(config) {
230
230
  }
231
231
  const DEFAULT_OPENAI_LLM_SERVICE = {
232
232
  provider: 'openai',
233
- model: 'gpt-4',
233
+ model: 'gpt-4o',
234
234
  tokenLimit: 2024,
235
235
  temperature: 0.32,
236
236
  authentication: {
@@ -532,12 +532,12 @@ function loadIgnore(config) {
532
532
  /**
533
533
  * Schema ID for JSON validation
534
534
  */
535
- const SCHEMA_PUBLIC_URL = "http://git-co.co/schema.json";
535
+ const SCHEMA_PUBLIC_URL = "https://git-co.co/schema.json";
536
536
  /**
537
537
  * Generated JSON schema
538
538
  */
539
539
  const schema$1 = {
540
- "$id": "http://git-co.co/schema.json",
540
+ "$id": "https://git-co.co/schema.json",
541
541
  "$schema": "http://json-schema.org/draft-07/schema#",
542
542
  "$ref": "#/definitions/ConfigWithServiceObject",
543
543
  "definitions": {
@@ -1870,6 +1870,7 @@ function getLlm(provider, model, config) {
1870
1870
  switch (provider) {
1871
1871
  case 'anthropic':
1872
1872
  return new ChatAnthropic({
1873
+ anthropicApiKey: getApiKeyForModel(config),
1873
1874
  maxConcurrency: config.service.maxConcurrent,
1874
1875
  model,
1875
1876
  });
@@ -2430,10 +2431,12 @@ const options$3 = {
2430
2431
  appendTicket: {
2431
2432
  description: 'Append ticket ID from branch name to the commit message',
2432
2433
  type: 'boolean',
2434
+ alias: 't',
2433
2435
  },
2434
2436
  additional: {
2435
2437
  description: 'Add extra contextual information to the prompt',
2436
2438
  type: 'string',
2439
+ alias: 'a',
2437
2440
  },
2438
2441
  };
2439
2442
  const builder$3 = (yargs) => {
@@ -6232,7 +6235,7 @@ const handler$3 = async (argv, logger) => {
6232
6235
  logger.log(`No API Key found. ๐Ÿ—๏ธ๐Ÿšช`, { color: 'red' });
6233
6236
  process.exit(1);
6234
6237
  }
6235
- const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4');
6238
+ const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4o');
6236
6239
  const llm = getLlm(provider, model, config);
6237
6240
  const INTERACTIVE = isInteractive(config);
6238
6241
  if (INTERACTIVE) {
@@ -6876,7 +6879,7 @@ const handler$1 = async (argv, logger) => {
6876
6879
  logger.log(`No API Key found. ๐Ÿ—๏ธ๐Ÿšช`, { color: 'red' });
6877
6880
  process.exit(1);
6878
6881
  }
6879
- const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4');
6882
+ const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4o');
6880
6883
  const llm = getLlm(provider, model, config);
6881
6884
  const INTERACTIVE = isInteractive(config);
6882
6885
  if (INTERACTIVE) {
@@ -28217,7 +28220,7 @@ const handler = async (argv, logger) => {
28217
28220
  logger.log(`No API Key found. ๐Ÿ—๏ธ๐Ÿšช`, { color: 'red' });
28218
28221
  process.exit(1);
28219
28222
  }
28220
- const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4');
28223
+ const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4o');
28221
28224
  const llm = getLlm(provider, model, config);
28222
28225
  const INTERACTIVE = isInteractive(config);
28223
28226
  if (INTERACTIVE) {
package/dist/index.js CHANGED
@@ -77,7 +77,7 @@ var readline__namespace = /*#__PURE__*/_interopNamespaceDefault(readline$1);
77
77
  /**
78
78
  * Current build version from package.json
79
79
  */
80
- const BUILD_VERSION = "0.14.3";
80
+ const BUILD_VERSION = "0.14.5";
81
81
 
82
82
  const isInteractive = (config) => {
83
83
  return config?.mode === 'interactive' || !!config?.interactive;
@@ -252,7 +252,7 @@ function getDefaultServiceApiKey(config) {
252
252
  }
253
253
  const DEFAULT_OPENAI_LLM_SERVICE = {
254
254
  provider: 'openai',
255
- model: 'gpt-4',
255
+ model: 'gpt-4o',
256
256
  tokenLimit: 2024,
257
257
  temperature: 0.32,
258
258
  authentication: {
@@ -554,12 +554,12 @@ function loadIgnore(config) {
554
554
  /**
555
555
  * Schema ID for JSON validation
556
556
  */
557
- const SCHEMA_PUBLIC_URL = "http://git-co.co/schema.json";
557
+ const SCHEMA_PUBLIC_URL = "https://git-co.co/schema.json";
558
558
  /**
559
559
  * Generated JSON schema
560
560
  */
561
561
  const schema$1 = {
562
- "$id": "http://git-co.co/schema.json",
562
+ "$id": "https://git-co.co/schema.json",
563
563
  "$schema": "http://json-schema.org/draft-07/schema#",
564
564
  "$ref": "#/definitions/ConfigWithServiceObject",
565
565
  "definitions": {
@@ -1892,6 +1892,7 @@ function getLlm(provider, model, config) {
1892
1892
  switch (provider) {
1893
1893
  case 'anthropic':
1894
1894
  return new anthropic.ChatAnthropic({
1895
+ anthropicApiKey: getApiKeyForModel(config),
1895
1896
  maxConcurrency: config.service.maxConcurrent,
1896
1897
  model,
1897
1898
  });
@@ -2452,10 +2453,12 @@ const options$3 = {
2452
2453
  appendTicket: {
2453
2454
  description: 'Append ticket ID from branch name to the commit message',
2454
2455
  type: 'boolean',
2456
+ alias: 't',
2455
2457
  },
2456
2458
  additional: {
2457
2459
  description: 'Add extra contextual information to the prompt',
2458
2460
  type: 'string',
2461
+ alias: 'a',
2459
2462
  },
2460
2463
  };
2461
2464
  const builder$3 = (yargs) => {
@@ -6254,7 +6257,7 @@ const handler$3 = async (argv, logger) => {
6254
6257
  logger.log(`No API Key found. ๐Ÿ—๏ธ๐Ÿšช`, { color: 'red' });
6255
6258
  process.exit(1);
6256
6259
  }
6257
- const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4');
6260
+ const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4o');
6258
6261
  const llm = getLlm(provider, model, config);
6259
6262
  const INTERACTIVE = isInteractive(config);
6260
6263
  if (INTERACTIVE) {
@@ -6898,7 +6901,7 @@ const handler$1 = async (argv, logger) => {
6898
6901
  logger.log(`No API Key found. ๐Ÿ—๏ธ๐Ÿšช`, { color: 'red' });
6899
6902
  process.exit(1);
6900
6903
  }
6901
- const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4');
6904
+ const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4o');
6902
6905
  const llm = getLlm(provider, model, config);
6903
6906
  const INTERACTIVE = isInteractive(config);
6904
6907
  if (INTERACTIVE) {
@@ -28239,7 +28242,7 @@ const handler = async (argv, logger) => {
28239
28242
  logger.log(`No API Key found. ๐Ÿ—๏ธ๐Ÿšช`, { color: 'red' });
28240
28243
  process.exit(1);
28241
28244
  }
28242
- const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4');
28245
+ const tokenizer = await getTokenCounter(provider === 'openai' ? model : 'gpt-4o');
28243
28246
  const llm = getLlm(provider, model, config);
28244
28247
  const INTERACTIVE = isInteractive(config);
28245
28248
  if (INTERACTIVE) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-coco",
3
- "version": "0.14.3",
3
+ "version": "0.14.5",
4
4
  "description": "zero-effort git commits with coco.",
5
5
  "author": "gfargo <ghfargo@gmail.com>",
6
6
  "license": "MIT",