git-coco 0.3.2 → 0.3.3
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/commands/commit.d.ts +1 -1
- package/dist/index.esm.mjs +269 -219
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.js +269 -219
- package/dist/lib/config/types.d.ts +1 -1
- package/dist/lib/langchain/prompts/commitDefault.d.ts +1 -1
- package/dist/lib/langchain/prompts/summarize.d.ts +1 -1
- package/dist/lib/langchain/utils.d.ts +2 -5
- package/dist/lib/simple-git/getChanges.d.ts +6 -3
- package/dist/lib/simple-git/getChangesByCommit.d.ts +13 -0
- package/dist/lib/simple-git/getDiffFromCommmit.d.ts +10 -0
- package/dist/lib/simple-git/getStatus.d.ts +2 -2
- package/dist/lib/simple-git/getSummaryText.d.ts +2 -2
- package/dist/lib/simple-git/helpers.d.ts +6 -0
- package/dist/lib/types.d.ts +2 -2
- package/dist/lib/ui.d.ts +22 -0
- package/dist/stats.html +1 -1
- package/package.json +3 -3
|
@@ -4,7 +4,6 @@ import { SummarizationChainParams } from 'langchain/chains';
|
|
|
4
4
|
import { BaseLLMParams } from 'langchain/llms/base';
|
|
5
5
|
import { AzureOpenAIInput, OpenAIInput, OpenAI } from 'langchain/llms/openai';
|
|
6
6
|
import { RecursiveCharacterTextSplitter, RecursiveCharacterTextSplitterParams } from 'langchain/text_splitter';
|
|
7
|
-
import { ConfigurationParameters } from 'openai';
|
|
8
7
|
import { BaseCommandOptions } from '../../types';
|
|
9
8
|
/**
|
|
10
9
|
* Get LLM Model Based on Configuration
|
|
@@ -12,9 +11,7 @@ import { BaseCommandOptions } from '../../types';
|
|
|
12
11
|
* @param configuration
|
|
13
12
|
* @returns LLM Model
|
|
14
13
|
*/
|
|
15
|
-
export declare function getModel(name: string, key: string, fields?: (Partial<OpenAIInput> & Partial<AzureOpenAIInput> & BaseLLMParams
|
|
16
|
-
configuration?: ConfigurationParameters | undefined;
|
|
17
|
-
}) | undefined, configuration?: ConfigurationParameters | undefined): OpenAI | HuggingFaceInference;
|
|
14
|
+
export declare function getModel(name: string, key: string, fields?: (Partial<OpenAIInput> & Partial<AzureOpenAIInput> & BaseLLMParams) | undefined): OpenAI | HuggingFaceInference;
|
|
18
15
|
/**
|
|
19
16
|
* Retrieve appropriate API key based on selected model
|
|
20
17
|
* @param name
|
|
@@ -40,7 +37,7 @@ type CreatePromptInput = {
|
|
|
40
37
|
variables: string[];
|
|
41
38
|
fallback?: PromptTemplate;
|
|
42
39
|
};
|
|
43
|
-
export declare function getPrompt({ template, variables, fallback }: CreatePromptInput): PromptTemplate
|
|
40
|
+
export declare function getPrompt({ template, variables, fallback }: CreatePromptInput): PromptTemplate<any, any>;
|
|
44
41
|
/**
|
|
45
42
|
* Verify template string contains all required input variables
|
|
46
43
|
* @param text template string
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { SimpleGit } from 'simple-git';
|
|
2
2
|
import { FileChange } from '../types';
|
|
3
3
|
export type GetChangesArgs = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
git: SimpleGit;
|
|
5
|
+
options?: {
|
|
6
|
+
ignoredFiles?: string[];
|
|
7
|
+
ignoredExtensions?: string[];
|
|
8
|
+
};
|
|
6
9
|
};
|
|
7
10
|
export type GetChangesResult = {
|
|
8
11
|
staged: FileChange[];
|
|
9
12
|
unstaged?: FileChange[];
|
|
10
13
|
untracked?: FileChange[];
|
|
11
14
|
};
|
|
12
|
-
export declare function getChanges(git
|
|
15
|
+
export declare function getChanges({ git, options }: GetChangesArgs): Promise<GetChangesResult>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SimpleGit } from 'simple-git';
|
|
2
|
+
import { FileChange } from '../types';
|
|
3
|
+
import { Logger } from '../utils/logger';
|
|
4
|
+
export type GetChangeByCommitArgs = {
|
|
5
|
+
commit: string;
|
|
6
|
+
options: {
|
|
7
|
+
git: SimpleGit;
|
|
8
|
+
logger?: Logger;
|
|
9
|
+
ignoredFiles?: string[];
|
|
10
|
+
ignoredExtensions?: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function getChangesByCommit({ commit, options: { git, ignoredFiles, ignoredExtensions, }, }: GetChangeByCommitArgs): Promise<FileChange[]>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SimpleGit } from 'simple-git';
|
|
2
|
+
/**
|
|
3
|
+
* Fetches the diff for the given commit ID.
|
|
4
|
+
*
|
|
5
|
+
* @param commitId The commit ID for which the diff is to be retrieved.
|
|
6
|
+
* @returns A promise that resolves to the diff of the commit.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getDiffForCommit(commitId: string, { git, }: {
|
|
9
|
+
git: SimpleGit;
|
|
10
|
+
}): Promise<string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FileChangeStatus } from '../types';
|
|
2
|
-
import { FileStatusResult } from 'simple-git';
|
|
3
|
-
export declare const getStatus: (file: FileStatusResult, location?: 'index' | 'working_dir') => FileChangeStatus;
|
|
2
|
+
import { DiffResultBinaryFile, DiffResultTextFile, FileStatusResult } from 'simple-git';
|
|
3
|
+
export declare const getStatus: (file: FileStatusResult | DiffResultTextFile | DiffResultBinaryFile, location?: 'index' | 'working_dir') => FileChangeStatus;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FileStatusResult } from 'simple-git';
|
|
1
|
+
import { DiffResultBinaryFile, DiffResultTextFile, FileStatusResult } from 'simple-git';
|
|
2
2
|
import { FileChange } from '../types';
|
|
3
|
-
export declare const getSummaryText: (file: FileStatusResult, change: Partial<FileChange>) => string;
|
|
3
|
+
export declare const getSummaryText: (file: FileStatusResult | DiffResultTextFile | DiffResultBinaryFile, change: Partial<FileChange>) => string;
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Logger } from './utils/logger';
|
|
|
5
5
|
export type FileChangeStatus = 'modified' | 'renamed' | 'added' | 'deleted' | 'untracked' | 'unknown';
|
|
6
6
|
export interface FileChange {
|
|
7
7
|
summary: string;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
filePath: string;
|
|
9
|
+
oldFilePath?: string;
|
|
10
10
|
status: FileChangeStatus;
|
|
11
11
|
}
|
|
12
12
|
export interface FileDiff {
|
package/dist/lib/ui.d.ts
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
|
+
import { type SimpleGit } from 'simple-git';
|
|
2
|
+
import { getTokenizer } from '../lib/utils/getTokenizer';
|
|
3
|
+
import { Logger } from '../lib/utils/logger';
|
|
4
|
+
import { getModel } from '../lib/langchain/utils';
|
|
5
|
+
import { CommitOptions } from '../commands/commit';
|
|
6
|
+
import { FileChange } from './types';
|
|
7
|
+
export declare const isInteractive: (argv: CommitOptions) => boolean;
|
|
1
8
|
export declare const logCommit: (commit: string) => void;
|
|
2
9
|
export declare const logSuccess: () => void;
|
|
10
|
+
type GenerateReviewLoopOptions = {
|
|
11
|
+
git: SimpleGit;
|
|
12
|
+
interactive: boolean;
|
|
13
|
+
model: ReturnType<typeof getModel>;
|
|
14
|
+
tokenizer: ReturnType<typeof getTokenizer>;
|
|
15
|
+
logger: Logger;
|
|
16
|
+
prompt?: string;
|
|
17
|
+
openInEditor?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const generateCommitMessageAndReviewLoop: (changes: FileChange[], options: GenerateReviewLoopOptions) => Promise<string>;
|
|
20
|
+
export declare const handleResult: (commit: string, { mode, git }: {
|
|
21
|
+
mode: 'interactive' | 'stdout';
|
|
22
|
+
git: SimpleGit;
|
|
23
|
+
}) => Promise<never>;
|
|
24
|
+
export {};
|
package/dist/stats.html
CHANGED
|
@@ -5285,7 +5285,7 @@ var drawChart = (function (exports) {
|
|
|
5285
5285
|
</script>
|
|
5286
5286
|
<script>
|
|
5287
5287
|
/*<!--*/
|
|
5288
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"lib","children":[{"name":"utils","children":[{"uid":"d930-78","name":"removeUndefined.ts"},{"uid":"d930-96","name":"getPathFromFilePath.ts"},{"uid":"d930-114","name":"getTokenizer.ts"},{"uid":"d930-116","name":"logger.ts"}]},{"name":"config","children":[{"name":"services","children":[{"uid":"d930-80","name":"env.ts"},{"uid":"d930-82","name":"git.ts"},{"uid":"d930-84","name":"ignore.ts"},{"uid":"d930-86","name":"project.ts"},{"uid":"d930-88","name":"xdg.ts"}]},{"uid":"d930-94","name":"loadConfig.ts"}]},{"name":"langchain","children":[{"name":"prompts","children":[{"uid":"d930-90","name":"commitDefault.ts"},{"uid":"d930-92","name":"summarize.ts"}]},{"name":"chains","children":[{"uid":"d930-98","name":"summarize.ts"},{"uid":"d930-118","name":"llm.ts"}]},{"uid":"d930-106","name":"utils.ts"}]},{"name":"parsers","children":[{"name":"default","children":[{"name":"utils","children":[{"uid":"d930-100","name":"summarizeDiffs.ts"},{"uid":"d930-102","name":"createDiffTree.ts"},{"uid":"d930-104","name":"collectDiffs.ts"}]},{"uid":"d930-110","name":"index.ts"}]},{"uid":"d930-126","name":"noResult.ts"}]},{"name":"simple-git","children":[{"uid":"d930-108","name":"getDiff.ts"},{"uid":"d930-120","name":"getStatus.ts"},{"uid":"d930-122","name":"getSummaryText.ts"},{"uid":"d930-124","name":"getChanges.ts"},{"uid":"d930-128","name":"createCommit.ts"}]},{"uid":"d930-112","name":"ui.ts"}]},{"name":"commands/commit.ts","uid":"d930-130"},{"uid":"d930-132","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"d930-78":{"renderedLength":258,"gzipLength":0,"brotliLength":141,"metaUid":"d930-77"},"d930-80":{"renderedLength":990,"gzipLength":0,"brotliLength":352,"metaUid":"d930-79"},"d930-82":{"renderedLength":1356,"gzipLength":0,"brotliLength":377,"metaUid":"d930-81"},"d930-84":{"renderedLength":927,"gzipLength":0,"brotliLength":271,"metaUid":"d930-83"},"d930-86":{"renderedLength":367,"gzipLength":0,"brotliLength":172,"metaUid":"d930-85"},"d930-88":{"renderedLength":539,"gzipLength":0,"brotliLength":260,"metaUid":"d930-87"},"d930-90":{"renderedLength":752,"gzipLength":0,"brotliLength":329,"metaUid":"d930-89"},"d930-92":{"renderedLength":369,"gzipLength":0,"brotliLength":200,"metaUid":"d930-91"},"d930-94":{"renderedLength":1037,"gzipLength":0,"brotliLength":412,"metaUid":"d930-93"},"d930-96":{"renderedLength":256,"gzipLength":0,"brotliLength":151,"metaUid":"d930-95"},"d930-98":{"renderedLength":442,"gzipLength":0,"brotliLength":201,"metaUid":"d930-97"},"d930-100":{"renderedLength":3917,"gzipLength":0,"brotliLength":1170,"metaUid":"d930-99"},"d930-102":{"renderedLength":1262,"gzipLength":0,"brotliLength":380,"metaUid":"d930-101"},"d930-104":{"renderedLength":1186,"gzipLength":0,"brotliLength":414,"metaUid":"d930-103"},"d930-106":{"renderedLength":2472,"gzipLength":0,"brotliLength":712,"metaUid":"d930-105"},"d930-108":{"renderedLength":1586,"gzipLength":0,"brotliLength":527,"metaUid":"d930-107"},"d930-110":{"renderedLength":1127,"gzipLength":0,"brotliLength":460,"metaUid":"d930-109"},"d930-112":{"renderedLength":290,"gzipLength":0,"brotliLength":177,"metaUid":"d930-111"},"d930-114":{"renderedLength":573,"gzipLength":0,"brotliLength":239,"metaUid":"d930-113"},"d930-116":{"renderedLength":1634,"gzipLength":0,"brotliLength":400,"metaUid":"d930-115"},"d930-118":{"renderedLength":678,"gzipLength":0,"brotliLength":281,"metaUid":"d930-117"},"d930-120":{"renderedLength":602,"gzipLength":0,"brotliLength":177,"metaUid":"d930-119"},"d930-122":{"renderedLength":239,"gzipLength":0,"brotliLength":140,"metaUid":"d930-121"},"d930-124":{"renderedLength":2533,"gzipLength":0,"brotliLength":541,"metaUid":"d930-123"},"d930-126":{"renderedLength":1265,"gzipLength":0,"brotliLength":413,"metaUid":"d930-125"},"d930-128":{"renderedLength":87,"gzipLength":0,"brotliLength":71,"metaUid":"d930-127"},"d930-130":{"renderedLength":7121,"gzipLength":0,"brotliLength":1606,"metaUid":"d930-129"},"d930-132":{"renderedLength":275,"gzipLength":0,"brotliLength":168,"metaUid":"d930-131"}},"nodeMetas":{"d930-77":{"id":"/src/lib/utils/removeUndefined.ts","moduleParts":{"index.js":"d930-78"},"imported":[],"importedBy":[{"uid":"d930-79"}]},"d930-79":{"id":"/src/lib/config/services/env.ts","moduleParts":{"index.js":"d930-80"},"imported":[{"uid":"d930-77"}],"importedBy":[{"uid":"d930-93"}]},"d930-81":{"id":"/src/lib/config/services/git.ts","moduleParts":{"index.js":"d930-82"},"imported":[{"uid":"d930-148"},{"uid":"d930-149"},{"uid":"d930-146"},{"uid":"d930-150"}],"importedBy":[{"uid":"d930-93"}]},"d930-83":{"id":"/src/lib/config/services/ignore.ts","moduleParts":{"index.js":"d930-84"},"imported":[{"uid":"d930-148"}],"importedBy":[{"uid":"d930-93"}]},"d930-85":{"id":"/src/lib/config/services/project.ts","moduleParts":{"index.js":"d930-86"},"imported":[{"uid":"d930-148"}],"importedBy":[{"uid":"d930-93"}]},"d930-87":{"id":"/src/lib/config/services/xdg.ts","moduleParts":{"index.js":"d930-88"},"imported":[{"uid":"d930-148"},{"uid":"d930-146"},{"uid":"d930-149"}],"importedBy":[{"uid":"d930-93"}]},"d930-89":{"id":"/src/lib/langchain/prompts/commitDefault.ts","moduleParts":{"index.js":"d930-90"},"imported":[{"uid":"d930-141"}],"importedBy":[{"uid":"d930-129"},{"uid":"d930-93"}]},"d930-91":{"id":"/src/lib/langchain/prompts/summarize.ts","moduleParts":{"index.js":"d930-92"},"imported":[{"uid":"d930-141"}],"importedBy":[{"uid":"d930-93"},{"uid":"d930-109"}]},"d930-93":{"id":"/src/lib/config/loadConfig.ts","moduleParts":{"index.js":"d930-94"},"imported":[{"uid":"d930-79"},{"uid":"d930-81"},{"uid":"d930-83"},{"uid":"d930-85"},{"uid":"d930-87"},{"uid":"d930-89"},{"uid":"d930-91"}],"importedBy":[{"uid":"d930-131"},{"uid":"d930-129"},{"uid":"d930-123"}]},"d930-95":{"id":"/src/lib/utils/getPathFromFilePath.ts","moduleParts":{"index.js":"d930-96"},"imported":[],"importedBy":[{"uid":"d930-99"}]},"d930-97":{"id":"/src/lib/langchain/chains/summarize.ts","moduleParts":{"index.js":"d930-98"},"imported":[{"uid":"d930-153"}],"importedBy":[{"uid":"d930-99"}]},"d930-99":{"id":"/src/lib/parsers/default/utils/summarizeDiffs.ts","moduleParts":{"index.js":"d930-100"},"imported":[{"uid":"d930-151"},{"uid":"d930-95"},{"uid":"d930-97"}],"importedBy":[{"uid":"d930-109"}]},"d930-101":{"id":"/src/lib/parsers/default/utils/createDiffTree.ts","moduleParts":{"index.js":"d930-102"},"imported":[],"importedBy":[{"uid":"d930-109"}]},"d930-103":{"id":"/src/lib/parsers/default/utils/collectDiffs.ts","moduleParts":{"index.js":"d930-104"},"imported":[],"importedBy":[{"uid":"d930-109"}]},"d930-105":{"id":"/src/lib/langchain/utils.ts","moduleParts":{"index.js":"d930-106"},"imported":[{"uid":"d930-142"},{"uid":"d930-141"},{"uid":"d930-143"},{"uid":"d930-144"},{"uid":"d930-145"}],"importedBy":[{"uid":"d930-129"},{"uid":"d930-109"}]},"d930-107":{"id":"/src/lib/simple-git/getDiff.ts","moduleParts":{"index.js":"d930-108"},"imported":[{"uid":"d930-152"}],"importedBy":[{"uid":"d930-109"}]},"d930-109":{"id":"/src/lib/parsers/default/index.ts","moduleParts":{"index.js":"d930-110"},"imported":[{"uid":"d930-99"},{"uid":"d930-101"},{"uid":"d930-103"},{"uid":"d930-105"},{"uid":"d930-91"},{"uid":"d930-107"}],"importedBy":[{"uid":"d930-129"}]},"d930-111":{"id":"/src/lib/ui.ts","moduleParts":{"index.js":"d930-112"},"imported":[{"uid":"d930-136"}],"importedBy":[{"uid":"d930-129"}]},"d930-113":{"id":"/src/lib/utils/getTokenizer.ts","moduleParts":{"index.js":"d930-114"},"imported":[{"uid":"d930-137"}],"importedBy":[{"uid":"d930-129"}]},"d930-115":{"id":"/src/lib/utils/logger.ts","moduleParts":{"index.js":"d930-116"},"imported":[{"uid":"d930-136"},{"uid":"d930-138"},{"uid":"d930-139"},{"uid":"d930-140"}],"importedBy":[{"uid":"d930-129"}]},"d930-117":{"id":"/src/lib/langchain/chains/llm.ts","moduleParts":{"index.js":"d930-118"},"imported":[{"uid":"d930-143"}],"importedBy":[{"uid":"d930-129"}]},"d930-119":{"id":"/src/lib/simple-git/getStatus.ts","moduleParts":{"index.js":"d930-120"},"imported":[],"importedBy":[{"uid":"d930-123"},{"uid":"d930-121"}]},"d930-121":{"id":"/src/lib/simple-git/getSummaryText.ts","moduleParts":{"index.js":"d930-122"},"imported":[{"uid":"d930-119"}],"importedBy":[{"uid":"d930-123"}]},"d930-123":{"id":"/src/lib/simple-git/getChanges.ts","moduleParts":{"index.js":"d930-124"},"imported":[{"uid":"d930-146"},{"uid":"d930-147"},{"uid":"d930-119"},{"uid":"d930-121"},{"uid":"d930-93"}],"importedBy":[{"uid":"d930-129"},{"uid":"d930-125"}]},"d930-125":{"id":"/src/lib/parsers/noResult.ts","moduleParts":{"index.js":"d930-126"},"imported":[{"uid":"d930-123"}],"importedBy":[{"uid":"d930-129"}]},"d930-127":{"id":"/src/lib/simple-git/createCommit.ts","moduleParts":{"index.js":"d930-128"},"imported":[],"importedBy":[{"uid":"d930-129"}]},"d930-129":{"id":"/src/commands/commit.ts","moduleParts":{"index.js":"d930-130"},"imported":[{"uid":"d930-134"},{"uid":"d930-135"},{"uid":"d930-93"},{"uid":"d930-109"},{"uid":"d930-111"},{"uid":"d930-113"},{"uid":"d930-115"},{"uid":"d930-89"},{"uid":"d930-105"},{"uid":"d930-117"},{"uid":"d930-125"},{"uid":"d930-123"},{"uid":"d930-127"}],"importedBy":[{"uid":"d930-131"}]},"d930-131":{"id":"/src/index.ts","moduleParts":{"index.js":"d930-132"},"imported":[{"uid":"d930-133"},{"uid":"d930-129"},{"uid":"d930-93"}],"importedBy":[],"isEntry":true},"d930-133":{"id":"yargs","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-131"}],"isExternal":true},"d930-134":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-129"}],"isExternal":true},"d930-135":{"id":"simple-git","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-129"}],"isExternal":true},"d930-136":{"id":"chalk","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-111"},{"uid":"d930-115"}],"isExternal":true},"d930-137":{"id":"gpt3-tokenizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-113"}],"isExternal":true},"d930-138":{"id":"ora","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-115"}],"isExternal":true},"d930-139":{"id":"performance-now","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-115"}],"isExternal":true},"d930-140":{"id":"pretty-ms","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-115"}],"isExternal":true},"d930-141":{"id":"langchain/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-89"},{"uid":"d930-105"},{"uid":"d930-91"}],"isExternal":true},"d930-142":{"id":"langchain/llms/hf","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-105"}],"isExternal":true},"d930-143":{"id":"langchain/chains","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-105"},{"uid":"d930-117"}],"isExternal":true},"d930-144":{"id":"langchain/llms/openai","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-105"}],"isExternal":true},"d930-145":{"id":"langchain/text_splitter","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-105"}],"isExternal":true},"d930-146":{"id":"path","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-123"},{"uid":"d930-81"},{"uid":"d930-87"}],"isExternal":true},"d930-147":{"id":"minimatch","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-123"}],"isExternal":true},"d930-148":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-81"},{"uid":"d930-83"},{"uid":"d930-85"},{"uid":"d930-87"}],"isExternal":true},"d930-149":{"id":"os","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-81"},{"uid":"d930-87"}],"isExternal":true},"d930-150":{"id":"ini","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-81"}],"isExternal":true},"d930-151":{"id":"p-queue","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-99"}],"isExternal":true},"d930-152":{"id":"diff","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-107"}],"isExternal":true},"d930-153":{"id":"langchain/document","moduleParts":{},"imported":[],"importedBy":[{"uid":"d930-97"}],"isExternal":true}},"env":{"rollup":"3.26.2"},"options":{"gzip":false,"brotli":true,"sourcemap":false}};
|
|
5288
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"lib","children":[{"name":"utils","children":[{"uid":"fad6-78","name":"removeUndefined.ts"},{"uid":"fad6-96","name":"getPathFromFilePath.ts"},{"uid":"fad6-126","name":"getTokenizer.ts"},{"uid":"fad6-128","name":"logger.ts"}]},{"name":"config","children":[{"name":"services","children":[{"uid":"fad6-80","name":"env.ts"},{"uid":"fad6-82","name":"git.ts"},{"uid":"fad6-84","name":"ignore.ts"},{"uid":"fad6-86","name":"project.ts"},{"uid":"fad6-88","name":"xdg.ts"}]},{"uid":"fad6-94","name":"loadConfig.ts"}]},{"name":"langchain","children":[{"name":"prompts","children":[{"uid":"fad6-90","name":"commitDefault.ts"},{"uid":"fad6-92","name":"summarize.ts"}]},{"name":"chains","children":[{"uid":"fad6-98","name":"summarize.ts"},{"uid":"fad6-112","name":"llm.ts"}]},{"uid":"fad6-106","name":"utils.ts"}]},{"name":"parsers","children":[{"name":"default","children":[{"name":"utils","children":[{"uid":"fad6-100","name":"summarizeDiffs.ts"},{"uid":"fad6-102","name":"createDiffTree.ts"},{"uid":"fad6-104","name":"collectDiffs.ts"}]},{"uid":"fad6-110","name":"index.ts"}]},{"uid":"fad6-120","name":"noResult.ts"}]},{"name":"simple-git","children":[{"uid":"fad6-108","name":"getDiff.ts"},{"uid":"fad6-114","name":"getStatus.ts"},{"uid":"fad6-116","name":"getSummaryText.ts"},{"uid":"fad6-118","name":"getChanges.ts"},{"uid":"fad6-122","name":"createCommit.ts"}]},{"uid":"fad6-124","name":"ui.ts"}]},{"name":"commands/commit.ts","uid":"fad6-130"},{"uid":"fad6-132","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fad6-78":{"renderedLength":258,"gzipLength":0,"brotliLength":141,"metaUid":"fad6-77"},"fad6-80":{"renderedLength":990,"gzipLength":0,"brotliLength":352,"metaUid":"fad6-79"},"fad6-82":{"renderedLength":1356,"gzipLength":0,"brotliLength":377,"metaUid":"fad6-81"},"fad6-84":{"renderedLength":927,"gzipLength":0,"brotliLength":271,"metaUid":"fad6-83"},"fad6-86":{"renderedLength":367,"gzipLength":0,"brotliLength":172,"metaUid":"fad6-85"},"fad6-88":{"renderedLength":539,"gzipLength":0,"brotliLength":260,"metaUid":"fad6-87"},"fad6-90":{"renderedLength":1013,"gzipLength":0,"brotliLength":380,"metaUid":"fad6-89"},"fad6-92":{"renderedLength":369,"gzipLength":0,"brotliLength":200,"metaUid":"fad6-91"},"fad6-94":{"renderedLength":1029,"gzipLength":0,"brotliLength":406,"metaUid":"fad6-93"},"fad6-96":{"renderedLength":256,"gzipLength":0,"brotliLength":151,"metaUid":"fad6-95"},"fad6-98":{"renderedLength":442,"gzipLength":0,"brotliLength":201,"metaUid":"fad6-97"},"fad6-100":{"renderedLength":3917,"gzipLength":0,"brotliLength":1170,"metaUid":"fad6-99"},"fad6-102":{"renderedLength":1262,"gzipLength":0,"brotliLength":374,"metaUid":"fad6-101"},"fad6-104":{"renderedLength":1186,"gzipLength":0,"brotliLength":416,"metaUid":"fad6-103"},"fad6-106":{"renderedLength":2442,"gzipLength":0,"brotliLength":704,"metaUid":"fad6-105"},"fad6-108":{"renderedLength":1586,"gzipLength":0,"brotliLength":528,"metaUid":"fad6-107"},"fad6-110":{"renderedLength":1127,"gzipLength":0,"brotliLength":460,"metaUid":"fad6-109"},"fad6-112":{"renderedLength":678,"gzipLength":0,"brotliLength":281,"metaUid":"fad6-111"},"fad6-114":{"renderedLength":1090,"gzipLength":0,"brotliLength":308,"metaUid":"fad6-113"},"fad6-116":{"renderedLength":467,"gzipLength":0,"brotliLength":210,"metaUid":"fad6-115"},"fad6-118":{"renderedLength":2586,"gzipLength":0,"brotliLength":552,"metaUid":"fad6-117"},"fad6-120":{"renderedLength":1269,"gzipLength":0,"brotliLength":410,"metaUid":"fad6-119"},"fad6-122":{"renderedLength":87,"gzipLength":0,"brotliLength":71,"metaUid":"fad6-121"},"fad6-124":{"renderedLength":5671,"gzipLength":0,"brotliLength":1313,"metaUid":"fad6-123"},"fad6-126":{"renderedLength":573,"gzipLength":0,"brotliLength":239,"metaUid":"fad6-125"},"fad6-128":{"renderedLength":1634,"gzipLength":0,"brotliLength":400,"metaUid":"fad6-127"},"fad6-130":{"renderedLength":2413,"gzipLength":0,"brotliLength":743,"metaUid":"fad6-129"},"fad6-132":{"renderedLength":275,"gzipLength":0,"brotliLength":168,"metaUid":"fad6-131"}},"nodeMetas":{"fad6-77":{"id":"/src/lib/utils/removeUndefined.ts","moduleParts":{"index.js":"fad6-78"},"imported":[],"importedBy":[{"uid":"fad6-79"}]},"fad6-79":{"id":"/src/lib/config/services/env.ts","moduleParts":{"index.js":"fad6-80"},"imported":[{"uid":"fad6-77"}],"importedBy":[{"uid":"fad6-93"}]},"fad6-81":{"id":"/src/lib/config/services/git.ts","moduleParts":{"index.js":"fad6-82"},"imported":[{"uid":"fad6-148"},{"uid":"fad6-149"},{"uid":"fad6-146"},{"uid":"fad6-150"}],"importedBy":[{"uid":"fad6-93"}]},"fad6-83":{"id":"/src/lib/config/services/ignore.ts","moduleParts":{"index.js":"fad6-84"},"imported":[{"uid":"fad6-148"}],"importedBy":[{"uid":"fad6-93"}]},"fad6-85":{"id":"/src/lib/config/services/project.ts","moduleParts":{"index.js":"fad6-86"},"imported":[{"uid":"fad6-148"}],"importedBy":[{"uid":"fad6-93"}]},"fad6-87":{"id":"/src/lib/config/services/xdg.ts","moduleParts":{"index.js":"fad6-88"},"imported":[{"uid":"fad6-148"},{"uid":"fad6-146"},{"uid":"fad6-149"}],"importedBy":[{"uid":"fad6-93"}]},"fad6-89":{"id":"/src/lib/langchain/prompts/commitDefault.ts","moduleParts":{"index.js":"fad6-90"},"imported":[{"uid":"fad6-142"}],"importedBy":[{"uid":"fad6-93"},{"uid":"fad6-123"}]},"fad6-91":{"id":"/src/lib/langchain/prompts/summarize.ts","moduleParts":{"index.js":"fad6-92"},"imported":[{"uid":"fad6-142"}],"importedBy":[{"uid":"fad6-93"},{"uid":"fad6-109"}]},"fad6-93":{"id":"/src/lib/config/loadConfig.ts","moduleParts":{"index.js":"fad6-94"},"imported":[{"uid":"fad6-79"},{"uid":"fad6-81"},{"uid":"fad6-83"},{"uid":"fad6-85"},{"uid":"fad6-87"},{"uid":"fad6-89"},{"uid":"fad6-91"}],"importedBy":[{"uid":"fad6-131"},{"uid":"fad6-129"},{"uid":"fad6-117"}]},"fad6-95":{"id":"/src/lib/utils/getPathFromFilePath.ts","moduleParts":{"index.js":"fad6-96"},"imported":[],"importedBy":[{"uid":"fad6-99"}]},"fad6-97":{"id":"/src/lib/langchain/chains/summarize.ts","moduleParts":{"index.js":"fad6-98"},"imported":[{"uid":"fad6-153"}],"importedBy":[{"uid":"fad6-99"}]},"fad6-99":{"id":"/src/lib/parsers/default/utils/summarizeDiffs.ts","moduleParts":{"index.js":"fad6-100"},"imported":[{"uid":"fad6-151"},{"uid":"fad6-95"},{"uid":"fad6-97"}],"importedBy":[{"uid":"fad6-109"}]},"fad6-101":{"id":"/src/lib/parsers/default/utils/createDiffTree.ts","moduleParts":{"index.js":"fad6-102"},"imported":[],"importedBy":[{"uid":"fad6-109"}]},"fad6-103":{"id":"/src/lib/parsers/default/utils/collectDiffs.ts","moduleParts":{"index.js":"fad6-104"},"imported":[],"importedBy":[{"uid":"fad6-109"}]},"fad6-105":{"id":"/src/lib/langchain/utils.ts","moduleParts":{"index.js":"fad6-106"},"imported":[{"uid":"fad6-141"},{"uid":"fad6-142"},{"uid":"fad6-143"},{"uid":"fad6-144"},{"uid":"fad6-145"}],"importedBy":[{"uid":"fad6-129"},{"uid":"fad6-123"},{"uid":"fad6-109"}]},"fad6-107":{"id":"/src/lib/simple-git/getDiff.ts","moduleParts":{"index.js":"fad6-108"},"imported":[{"uid":"fad6-152"}],"importedBy":[{"uid":"fad6-109"}]},"fad6-109":{"id":"/src/lib/parsers/default/index.ts","moduleParts":{"index.js":"fad6-110"},"imported":[{"uid":"fad6-99"},{"uid":"fad6-101"},{"uid":"fad6-103"},{"uid":"fad6-105"},{"uid":"fad6-91"},{"uid":"fad6-107"}],"importedBy":[{"uid":"fad6-123"}]},"fad6-111":{"id":"/src/lib/langchain/chains/llm.ts","moduleParts":{"index.js":"fad6-112"},"imported":[{"uid":"fad6-143"}],"importedBy":[{"uid":"fad6-123"}]},"fad6-113":{"id":"/src/lib/simple-git/getStatus.ts","moduleParts":{"index.js":"fad6-114"},"imported":[],"importedBy":[{"uid":"fad6-117"},{"uid":"fad6-115"}]},"fad6-115":{"id":"/src/lib/simple-git/getSummaryText.ts","moduleParts":{"index.js":"fad6-116"},"imported":[{"uid":"fad6-113"}],"importedBy":[{"uid":"fad6-117"}]},"fad6-117":{"id":"/src/lib/simple-git/getChanges.ts","moduleParts":{"index.js":"fad6-118"},"imported":[{"uid":"fad6-146"},{"uid":"fad6-147"},{"uid":"fad6-113"},{"uid":"fad6-115"},{"uid":"fad6-93"}],"importedBy":[{"uid":"fad6-129"},{"uid":"fad6-119"}]},"fad6-119":{"id":"/src/lib/parsers/noResult.ts","moduleParts":{"index.js":"fad6-120"},"imported":[{"uid":"fad6-117"}],"importedBy":[{"uid":"fad6-123"}]},"fad6-121":{"id":"/src/lib/simple-git/createCommit.ts","moduleParts":{"index.js":"fad6-122"},"imported":[],"importedBy":[{"uid":"fad6-123"}]},"fad6-123":{"id":"/src/lib/ui.ts","moduleParts":{"index.js":"fad6-124"},"imported":[{"uid":"fad6-135"},{"uid":"fad6-136"},{"uid":"fad6-109"},{"uid":"fad6-89"},{"uid":"fad6-105"},{"uid":"fad6-111"},{"uid":"fad6-119"},{"uid":"fad6-121"}],"importedBy":[{"uid":"fad6-129"}]},"fad6-125":{"id":"/src/lib/utils/getTokenizer.ts","moduleParts":{"index.js":"fad6-126"},"imported":[{"uid":"fad6-137"}],"importedBy":[{"uid":"fad6-129"}]},"fad6-127":{"id":"/src/lib/utils/logger.ts","moduleParts":{"index.js":"fad6-128"},"imported":[{"uid":"fad6-135"},{"uid":"fad6-138"},{"uid":"fad6-139"},{"uid":"fad6-140"}],"importedBy":[{"uid":"fad6-129"}]},"fad6-129":{"id":"/src/commands/commit.ts","moduleParts":{"index.js":"fad6-130"},"imported":[{"uid":"fad6-134"},{"uid":"fad6-93"},{"uid":"fad6-123"},{"uid":"fad6-125"},{"uid":"fad6-127"},{"uid":"fad6-105"},{"uid":"fad6-117"}],"importedBy":[{"uid":"fad6-131"}]},"fad6-131":{"id":"/src/index.ts","moduleParts":{"index.js":"fad6-132"},"imported":[{"uid":"fad6-133"},{"uid":"fad6-129"},{"uid":"fad6-93"}],"importedBy":[],"isEntry":true},"fad6-133":{"id":"yargs","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-131"}],"isExternal":true},"fad6-134":{"id":"simple-git","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-129"}],"isExternal":true},"fad6-135":{"id":"chalk","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-123"},{"uid":"fad6-127"}],"isExternal":true},"fad6-136":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-123"}],"isExternal":true},"fad6-137":{"id":"gpt3-tokenizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-125"}],"isExternal":true},"fad6-138":{"id":"ora","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-127"}],"isExternal":true},"fad6-139":{"id":"performance-now","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-127"}],"isExternal":true},"fad6-140":{"id":"pretty-ms","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-127"}],"isExternal":true},"fad6-141":{"id":"langchain/llms/hf","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-105"}],"isExternal":true},"fad6-142":{"id":"langchain/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-105"},{"uid":"fad6-89"},{"uid":"fad6-91"}],"isExternal":true},"fad6-143":{"id":"langchain/chains","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-105"},{"uid":"fad6-111"}],"isExternal":true},"fad6-144":{"id":"langchain/llms/openai","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-105"}],"isExternal":true},"fad6-145":{"id":"langchain/text_splitter","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-105"}],"isExternal":true},"fad6-146":{"id":"path","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-117"},{"uid":"fad6-81"},{"uid":"fad6-87"}],"isExternal":true},"fad6-147":{"id":"minimatch","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-117"}],"isExternal":true},"fad6-148":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-81"},{"uid":"fad6-83"},{"uid":"fad6-85"},{"uid":"fad6-87"}],"isExternal":true},"fad6-149":{"id":"os","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-81"},{"uid":"fad6-87"}],"isExternal":true},"fad6-150":{"id":"ini","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-81"}],"isExternal":true},"fad6-151":{"id":"p-queue","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-99"}],"isExternal":true},"fad6-152":{"id":"diff","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-107"}],"isExternal":true},"fad6-153":{"id":"langchain/document","moduleParts":{},"imported":[],"importedBy":[{"uid":"fad6-97"}],"isExternal":true}},"env":{"rollup":"3.26.3"},"options":{"gzip":false,"brotli":true,"sourcemap":false}};
|
|
5289
5289
|
|
|
5290
5290
|
const run = () => {
|
|
5291
5291
|
const width = window.innerWidth;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-coco",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "zero-effort git commits with coco.",
|
|
5
5
|
"author": "gfargo <ghfargo@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"rollup-plugin-executable": "^1.6.3",
|
|
64
64
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
65
65
|
"rollup-plugin-preserve-shebangs": "^0.2.0",
|
|
66
|
-
"rollup-plugin-typescript2": "^0.
|
|
66
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
67
67
|
"rollup-plugin-visualizer": "^5.9.2",
|
|
68
68
|
"ts-jest": "^29.1.0",
|
|
69
69
|
"ts-node": "^10.9.1",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"diff": "^5.1.0",
|
|
78
78
|
"gpt3-tokenizer": "^1.1.5",
|
|
79
79
|
"ini": "^4.1.1",
|
|
80
|
-
"langchain": "^0.0.
|
|
80
|
+
"langchain": "^0.0.170",
|
|
81
81
|
"minimatch": "^9.0.3",
|
|
82
82
|
"openai": "3.3.0",
|
|
83
83
|
"ora": "5.4.1",
|