git-coco 0.1.0 → 0.2.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/README.md +1 -1
- package/dist/index.esm.mjs +140 -245
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.js +139 -246
- package/dist/lib/parsers/noResult.d.ts +4 -6
- package/dist/lib/simple-git/createCommit.d.ts +2 -0
- package/dist/lib/simple-git/getChanges.d.ts +12 -0
- package/dist/lib/simple-git/getDiff.d.ts +7 -0
- package/dist/lib/simple-git/getStatus.d.ts +3 -0
- package/dist/lib/simple-git/getSummaryText.d.ts +3 -0
- package/dist/lib/types.d.ts +3 -3
- package/dist/stats.html +1 -1
- package/package.json +4 -6
- package/dist/lib/parsers/default/utils/parseFileDiff.d.ts +0 -4
- package/dist/lib/utils/git/constants.d.ts +0 -1
- package/dist/lib/utils/git/createCommit.d.ts +0 -2
- package/dist/lib/utils/git/getChanges.d.ts +0 -43
- package/dist/lib/utils/git/getStatus.d.ts +0 -3
- package/dist/lib/utils/git/getSummaryText.d.ts +0 -2
- package/dist/lib/utils/git/parsePatches.d.ts +0 -18
- /package/dist/lib/parsers/default/{fileChangeParser.d.ts → index.d.ts} +0 -0
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":"3dc4-87","name":"removeUndefined.ts"},{"uid":"3dc4-109","name":"logger.ts"},{"uid":"3dc4-111","name":"getPathFromFilePath.ts"},{"uid":"3dc4-121","name":"readFile.ts"},{"uid":"3dc4-131","name":"getTokenizer.ts"},{"name":"git","children":[{"uid":"3dc4-133","name":"constants.ts"},{"uid":"3dc4-135","name":"getSummaryText.ts"},{"uid":"3dc4-137","name":"getStatus.ts"},{"uid":"3dc4-139","name":"parsePatches.ts"},{"uid":"3dc4-141","name":"getChanges.ts"},{"uid":"3dc4-143","name":"createCommit.ts"}]}]},{"name":"config","children":[{"name":"services","children":[{"uid":"3dc4-89","name":"env.ts"},{"uid":"3dc4-91","name":"git.ts"},{"uid":"3dc4-93","name":"ignore.ts"},{"uid":"3dc4-95","name":"project.ts"},{"uid":"3dc4-97","name":"xdg.ts"},{"uid":"3dc4-99","name":"yargs.ts"}]},{"uid":"3dc4-105","name":"default.ts"},{"uid":"3dc4-107","name":"index.ts"}]},{"name":"langchain","children":[{"name":"prompts","children":[{"uid":"3dc4-101","name":"commitDefault.ts"},{"uid":"3dc4-103","name":"summarize.ts"}]},{"name":"chains","children":[{"uid":"3dc4-113","name":"summarize.ts"},{"uid":"3dc4-145","name":"llm.ts"}]},{"uid":"3dc4-125","name":"utils.ts"}]},{"name":"parsers","children":[{"name":"default","children":[{"name":"utils","children":[{"uid":"3dc4-115","name":"summarizeDiffs.ts"},{"uid":"3dc4-117","name":"createDiffTree.ts"},{"uid":"3dc4-119","name":"collectDiffs.ts"},{"uid":"3dc4-123","name":"parseFileDiff.ts"}]},{"uid":"3dc4-127","name":"fileChangeParser.ts"}]},{"uid":"3dc4-147","name":"noResult.ts"}]},{"uid":"3dc4-129","name":"ui.ts"}]},{"uid":"3dc4-149","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"3dc4-87":{"renderedLength":258,"gzipLength":0,"brotliLength":141,"metaUid":"3dc4-86"},"3dc4-89":{"renderedLength":858,"gzipLength":0,"brotliLength":282,"metaUid":"3dc4-88"},"3dc4-91":{"renderedLength":1183,"gzipLength":0,"brotliLength":354,"metaUid":"3dc4-90"},"3dc4-93":{"renderedLength":927,"gzipLength":0,"brotliLength":271,"metaUid":"3dc4-92"},"3dc4-95":{"renderedLength":367,"gzipLength":0,"brotliLength":172,"metaUid":"3dc4-94"},"3dc4-97":{"renderedLength":539,"gzipLength":0,"brotliLength":260,"metaUid":"3dc4-96"},"3dc4-99":{"renderedLength":1588,"gzipLength":0,"brotliLength":524,"metaUid":"3dc4-98"},"3dc4-101":{"renderedLength":752,"gzipLength":0,"brotliLength":329,"metaUid":"3dc4-100"},"3dc4-103":{"renderedLength":369,"gzipLength":0,"brotliLength":200,"metaUid":"3dc4-102"},"3dc4-105":{"renderedLength":347,"gzipLength":0,"brotliLength":210,"metaUid":"3dc4-104"},"3dc4-107":{"renderedLength":719,"gzipLength":0,"brotliLength":256,"metaUid":"3dc4-106"},"3dc4-109":{"renderedLength":1634,"gzipLength":0,"brotliLength":400,"metaUid":"3dc4-108"},"3dc4-111":{"renderedLength":256,"gzipLength":0,"brotliLength":151,"metaUid":"3dc4-110"},"3dc4-113":{"renderedLength":442,"gzipLength":0,"brotliLength":201,"metaUid":"3dc4-112"},"3dc4-115":{"renderedLength":3944,"gzipLength":0,"brotliLength":1184,"metaUid":"3dc4-114"},"3dc4-117":{"renderedLength":1262,"gzipLength":0,"brotliLength":380,"metaUid":"3dc4-116"},"3dc4-119":{"renderedLength":1199,"gzipLength":0,"brotliLength":428,"metaUid":"3dc4-118"},"3dc4-121":{"renderedLength":67,"gzipLength":0,"brotliLength":57,"metaUid":"3dc4-120"},"3dc4-123":{"renderedLength":2484,"gzipLength":0,"brotliLength":779,"metaUid":"3dc4-122"},"3dc4-125":{"renderedLength":1374,"gzipLength":0,"brotliLength":559,"metaUid":"3dc4-124"},"3dc4-127":{"renderedLength":1297,"gzipLength":0,"brotliLength":511,"metaUid":"3dc4-126"},"3dc4-129":{"renderedLength":290,"gzipLength":0,"brotliLength":177,"metaUid":"3dc4-128"},"3dc4-131":{"renderedLength":573,"gzipLength":0,"brotliLength":239,"metaUid":"3dc4-130"},"3dc4-133":{"renderedLength":71,"gzipLength":0,"brotliLength":75,"metaUid":"3dc4-132"},"3dc4-135":{"renderedLength":673,"gzipLength":0,"brotliLength":196,"metaUid":"3dc4-134"},"3dc4-137":{"renderedLength":517,"gzipLength":0,"brotliLength":152,"metaUid":"3dc4-136"},"3dc4-139":{"renderedLength":1786,"gzipLength":0,"brotliLength":593,"metaUid":"3dc4-138"},"3dc4-141":{"renderedLength":2800,"gzipLength":0,"brotliLength":843,"metaUid":"3dc4-140"},"3dc4-143":{"renderedLength":463,"gzipLength":0,"brotliLength":201,"metaUid":"3dc4-142"},"3dc4-145":{"renderedLength":238,"gzipLength":0,"brotliLength":141,"metaUid":"3dc4-144"},"3dc4-147":{"renderedLength":1162,"gzipLength":0,"brotliLength":360,"metaUid":"3dc4-146"},"3dc4-149":{"renderedLength":5798,"gzipLength":0,"brotliLength":1344,"metaUid":"3dc4-148"}},"nodeMetas":{"3dc4-86":{"id":"/src/lib/utils/removeUndefined.ts","moduleParts":{"index.js":"3dc4-87"},"imported":[],"importedBy":[{"uid":"3dc4-88"}]},"3dc4-88":{"id":"/src/lib/config/services/env.ts","moduleParts":{"index.js":"3dc4-89"},"imported":[{"uid":"3dc4-86"}],"importedBy":[{"uid":"3dc4-106"}]},"3dc4-90":{"id":"/src/lib/config/services/git.ts","moduleParts":{"index.js":"3dc4-91"},"imported":[{"uid":"3dc4-163"},{"uid":"3dc4-164"},{"uid":"3dc4-165"},{"uid":"3dc4-166"}],"importedBy":[{"uid":"3dc4-106"}]},"3dc4-92":{"id":"/src/lib/config/services/ignore.ts","moduleParts":{"index.js":"3dc4-93"},"imported":[{"uid":"3dc4-163"}],"importedBy":[{"uid":"3dc4-106"}]},"3dc4-94":{"id":"/src/lib/config/services/project.ts","moduleParts":{"index.js":"3dc4-95"},"imported":[{"uid":"3dc4-163"}],"importedBy":[{"uid":"3dc4-106"}]},"3dc4-96":{"id":"/src/lib/config/services/xdg.ts","moduleParts":{"index.js":"3dc4-97"},"imported":[{"uid":"3dc4-163"},{"uid":"3dc4-165"},{"uid":"3dc4-164"}],"importedBy":[{"uid":"3dc4-106"}]},"3dc4-98":{"id":"/src/lib/config/services/yargs.ts","moduleParts":{"index.js":"3dc4-99"},"imported":[{"uid":"3dc4-153"},{"uid":"3dc4-154"}],"importedBy":[{"uid":"3dc4-148"},{"uid":"3dc4-106"}]},"3dc4-100":{"id":"/src/lib/langchain/prompts/commitDefault.ts","moduleParts":{"index.js":"3dc4-101"},"imported":[{"uid":"3dc4-159"}],"importedBy":[{"uid":"3dc4-148"},{"uid":"3dc4-104"}]},"3dc4-102":{"id":"/src/lib/langchain/prompts/summarize.ts","moduleParts":{"index.js":"3dc4-103"},"imported":[{"uid":"3dc4-159"}],"importedBy":[{"uid":"3dc4-126"},{"uid":"3dc4-104"}]},"3dc4-104":{"id":"/src/lib/config/default.ts","moduleParts":{"index.js":"3dc4-105"},"imported":[{"uid":"3dc4-100"},{"uid":"3dc4-102"}],"importedBy":[{"uid":"3dc4-106"}]},"3dc4-106":{"id":"/src/lib/config/index.ts","moduleParts":{"index.js":"3dc4-107"},"imported":[{"uid":"3dc4-88"},{"uid":"3dc4-90"},{"uid":"3dc4-92"},{"uid":"3dc4-94"},{"uid":"3dc4-96"},{"uid":"3dc4-98"},{"uid":"3dc4-104"}],"importedBy":[{"uid":"3dc4-148"},{"uid":"3dc4-126"},{"uid":"3dc4-140"},{"uid":"3dc4-114"},{"uid":"3dc4-118"},{"uid":"3dc4-138"}]},"3dc4-108":{"id":"/src/lib/utils/logger.ts","moduleParts":{"index.js":"3dc4-109"},"imported":[{"uid":"3dc4-152"},{"uid":"3dc4-156"},{"uid":"3dc4-157"},{"uid":"3dc4-158"}],"importedBy":[{"uid":"3dc4-148"},{"uid":"3dc4-126"},{"uid":"3dc4-114"},{"uid":"3dc4-118"}]},"3dc4-110":{"id":"/src/lib/utils/getPathFromFilePath.ts","moduleParts":{"index.js":"3dc4-111"},"imported":[],"importedBy":[{"uid":"3dc4-114"}]},"3dc4-112":{"id":"/src/lib/langchain/chains/summarize.ts","moduleParts":{"index.js":"3dc4-113"},"imported":[{"uid":"3dc4-170"}],"importedBy":[{"uid":"3dc4-114"}]},"3dc4-114":{"id":"/src/lib/parsers/default/utils/summarizeDiffs.ts","moduleParts":{"index.js":"3dc4-115"},"imported":[{"uid":"3dc4-167"},{"uid":"3dc4-108"},{"uid":"3dc4-106"},{"uid":"3dc4-110"},{"uid":"3dc4-112"}],"importedBy":[{"uid":"3dc4-126"}]},"3dc4-116":{"id":"/src/lib/parsers/default/utils/createDiffTree.ts","moduleParts":{"index.js":"3dc4-117"},"imported":[],"importedBy":[{"uid":"3dc4-126"}]},"3dc4-118":{"id":"/src/lib/parsers/default/utils/collectDiffs.ts","moduleParts":{"index.js":"3dc4-119"},"imported":[{"uid":"3dc4-106"},{"uid":"3dc4-108"}],"importedBy":[{"uid":"3dc4-126"}]},"3dc4-120":{"id":"/src/lib/utils/readFile.ts","moduleParts":{"index.js":"3dc4-121"},"imported":[{"uid":"3dc4-163"},{"uid":"3dc4-171"}],"importedBy":[{"uid":"3dc4-122"}]},"3dc4-122":{"id":"/src/lib/parsers/default/utils/parseFileDiff.ts","moduleParts":{"index.js":"3dc4-123"},"imported":[{"uid":"3dc4-150"},{"uid":"3dc4-168"},{"uid":"3dc4-120"}],"importedBy":[{"uid":"3dc4-126"}]},"3dc4-124":{"id":"/src/lib/langchain/utils.ts","moduleParts":{"index.js":"3dc4-125"},"imported":[{"uid":"3dc4-159"},{"uid":"3dc4-160"},{"uid":"3dc4-161"},{"uid":"3dc4-162"}],"importedBy":[{"uid":"3dc4-148"},{"uid":"3dc4-126"}]},"3dc4-126":{"id":"/src/lib/parsers/default/fileChangeParser.ts","moduleParts":{"index.js":"3dc4-127"},"imported":[{"uid":"3dc4-106"},{"uid":"3dc4-114"},{"uid":"3dc4-108"},{"uid":"3dc4-116"},{"uid":"3dc4-118"},{"uid":"3dc4-122"},{"uid":"3dc4-124"},{"uid":"3dc4-102"}],"importedBy":[{"uid":"3dc4-148"}]},"3dc4-128":{"id":"/src/lib/ui.ts","moduleParts":{"index.js":"3dc4-129"},"imported":[{"uid":"3dc4-152"}],"importedBy":[{"uid":"3dc4-148"}]},"3dc4-130":{"id":"/src/lib/utils/getTokenizer.ts","moduleParts":{"index.js":"3dc4-131"},"imported":[{"uid":"3dc4-155"}],"importedBy":[{"uid":"3dc4-148"}]},"3dc4-132":{"id":"/src/lib/utils/git/constants.ts","moduleParts":{"index.js":"3dc4-133"},"imported":[],"importedBy":[{"uid":"3dc4-140"}]},"3dc4-134":{"id":"/src/lib/utils/git/getSummaryText.ts","moduleParts":{"index.js":"3dc4-135"},"imported":[],"importedBy":[{"uid":"3dc4-138"}]},"3dc4-136":{"id":"/src/lib/utils/git/getStatus.ts","moduleParts":{"index.js":"3dc4-137"},"imported":[],"importedBy":[{"uid":"3dc4-138"}]},"3dc4-138":{"id":"/src/lib/utils/git/parsePatches.ts","moduleParts":{"index.js":"3dc4-139"},"imported":[{"uid":"3dc4-169"},{"uid":"3dc4-106"},{"uid":"3dc4-134"},{"uid":"3dc4-136"}],"importedBy":[{"uid":"3dc4-140"}]},"3dc4-140":{"id":"/src/lib/utils/git/getChanges.ts","moduleParts":{"index.js":"3dc4-141"},"imported":[{"uid":"3dc4-150"},{"uid":"3dc4-106"},{"uid":"3dc4-132"},{"uid":"3dc4-138"}],"importedBy":[{"uid":"3dc4-148"},{"uid":"3dc4-146"}]},"3dc4-142":{"id":"/src/lib/utils/git/createCommit.ts","moduleParts":{"index.js":"3dc4-143"},"imported":[{"uid":"3dc4-150"}],"importedBy":[{"uid":"3dc4-148"}]},"3dc4-144":{"id":"/src/lib/langchain/chains/llm.ts","moduleParts":{"index.js":"3dc4-145"},"imported":[{"uid":"3dc4-160"}],"importedBy":[{"uid":"3dc4-148"}]},"3dc4-146":{"id":"/src/lib/parsers/noResult.ts","moduleParts":{"index.js":"3dc4-147"},"imported":[{"uid":"3dc4-140"}],"importedBy":[{"uid":"3dc4-148"}]},"3dc4-148":{"id":"/src/index.ts","moduleParts":{"index.js":"3dc4-149"},"imported":[{"uid":"3dc4-150"},{"uid":"3dc4-151"},{"uid":"3dc4-106"},{"uid":"3dc4-126"},{"uid":"3dc4-128"},{"uid":"3dc4-98"},{"uid":"3dc4-130"},{"uid":"3dc4-108"},{"uid":"3dc4-140"},{"uid":"3dc4-100"},{"uid":"3dc4-124"},{"uid":"3dc4-142"},{"uid":"3dc4-144"},{"uid":"3dc4-146"}],"importedBy":[],"isEntry":true},"3dc4-150":{"id":"nodegit","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-148"},{"uid":"3dc4-140"},{"uid":"3dc4-142"},{"uid":"3dc4-122"}],"isExternal":true},"3dc4-151":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-148"}],"isExternal":true},"3dc4-152":{"id":"chalk","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-128"},{"uid":"3dc4-108"}],"isExternal":true},"3dc4-153":{"id":"yargs","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-98"}],"isExternal":true},"3dc4-154":{"id":"yargs/helpers","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-98"}],"isExternal":true},"3dc4-155":{"id":"gpt3-tokenizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-130"}],"isExternal":true},"3dc4-156":{"id":"ora","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-108"}],"isExternal":true},"3dc4-157":{"id":"performance-now","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-108"}],"isExternal":true},"3dc4-158":{"id":"pretty-ms","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-108"}],"isExternal":true},"3dc4-159":{"id":"langchain/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-100"},{"uid":"3dc4-124"},{"uid":"3dc4-102"}],"isExternal":true},"3dc4-160":{"id":"langchain/chains","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-124"},{"uid":"3dc4-144"}],"isExternal":true},"3dc4-161":{"id":"langchain/llms/openai","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-124"}],"isExternal":true},"3dc4-162":{"id":"langchain/text_splitter","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-124"}],"isExternal":true},"3dc4-163":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-90"},{"uid":"3dc4-92"},{"uid":"3dc4-94"},{"uid":"3dc4-96"},{"uid":"3dc4-120"}],"isExternal":true},"3dc4-164":{"id":"os","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-90"},{"uid":"3dc4-96"}],"isExternal":true},"3dc4-165":{"id":"path","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-90"},{"uid":"3dc4-96"}],"isExternal":true},"3dc4-166":{"id":"ini","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-90"}],"isExternal":true},"3dc4-167":{"id":"p-queue","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-114"}],"isExternal":true},"3dc4-168":{"id":"diff","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-122"}],"isExternal":true},"3dc4-169":{"id":"minimatch","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-138"}],"isExternal":true},"3dc4-170":{"id":"langchain/document","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-112"}],"isExternal":true},"3dc4-171":{"id":"util","moduleParts":{},"imported":[],"importedBy":[{"uid":"3dc4-120"}],"isExternal":true}},"env":{"rollup":"3.26.1"},"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":"3816-79","name":"removeUndefined.ts"},{"uid":"3816-101","name":"logger.ts"},{"uid":"3816-103","name":"getPathFromFilePath.ts"},{"uid":"3816-121","name":"getTokenizer.ts"}]},{"name":"config","children":[{"name":"services","children":[{"uid":"3816-81","name":"env.ts"},{"uid":"3816-83","name":"git.ts"},{"uid":"3816-85","name":"ignore.ts"},{"uid":"3816-87","name":"project.ts"},{"uid":"3816-89","name":"xdg.ts"},{"uid":"3816-91","name":"yargs.ts"}]},{"uid":"3816-97","name":"default.ts"},{"uid":"3816-99","name":"index.ts"}]},{"name":"langchain","children":[{"name":"prompts","children":[{"uid":"3816-93","name":"commitDefault.ts"},{"uid":"3816-95","name":"summarize.ts"}]},{"name":"chains","children":[{"uid":"3816-105","name":"summarize.ts"},{"uid":"3816-123","name":"llm.ts"}]},{"uid":"3816-113","name":"utils.ts"}]},{"name":"parsers","children":[{"name":"default","children":[{"name":"utils","children":[{"uid":"3816-107","name":"summarizeDiffs.ts"},{"uid":"3816-109","name":"createDiffTree.ts"},{"uid":"3816-111","name":"collectDiffs.ts"}]},{"uid":"3816-117","name":"index.ts"}]},{"uid":"3816-131","name":"noResult.ts"}]},{"name":"simple-git","children":[{"uid":"3816-115","name":"getDiff.ts"},{"uid":"3816-125","name":"getStatus.ts"},{"uid":"3816-127","name":"getSummaryText.ts"},{"uid":"3816-129","name":"getChanges.ts"},{"uid":"3816-133","name":"createCommit.ts"}]},{"uid":"3816-119","name":"ui.ts"}]},{"uid":"3816-135","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"3816-79":{"renderedLength":258,"gzipLength":0,"brotliLength":141,"metaUid":"3816-78"},"3816-81":{"renderedLength":858,"gzipLength":0,"brotliLength":282,"metaUid":"3816-80"},"3816-83":{"renderedLength":1183,"gzipLength":0,"brotliLength":354,"metaUid":"3816-82"},"3816-85":{"renderedLength":927,"gzipLength":0,"brotliLength":271,"metaUid":"3816-84"},"3816-87":{"renderedLength":367,"gzipLength":0,"brotliLength":172,"metaUid":"3816-86"},"3816-89":{"renderedLength":539,"gzipLength":0,"brotliLength":260,"metaUid":"3816-88"},"3816-91":{"renderedLength":1588,"gzipLength":0,"brotliLength":524,"metaUid":"3816-90"},"3816-93":{"renderedLength":752,"gzipLength":0,"brotliLength":329,"metaUid":"3816-92"},"3816-95":{"renderedLength":369,"gzipLength":0,"brotliLength":200,"metaUid":"3816-94"},"3816-97":{"renderedLength":347,"gzipLength":0,"brotliLength":210,"metaUid":"3816-96"},"3816-99":{"renderedLength":719,"gzipLength":0,"brotliLength":256,"metaUid":"3816-98"},"3816-101":{"renderedLength":1634,"gzipLength":0,"brotliLength":400,"metaUid":"3816-100"},"3816-103":{"renderedLength":256,"gzipLength":0,"brotliLength":151,"metaUid":"3816-102"},"3816-105":{"renderedLength":442,"gzipLength":0,"brotliLength":201,"metaUid":"3816-104"},"3816-107":{"renderedLength":3948,"gzipLength":0,"brotliLength":1183,"metaUid":"3816-106"},"3816-109":{"renderedLength":1262,"gzipLength":0,"brotliLength":380,"metaUid":"3816-108"},"3816-111":{"renderedLength":1199,"gzipLength":0,"brotliLength":428,"metaUid":"3816-110"},"3816-113":{"renderedLength":1374,"gzipLength":0,"brotliLength":559,"metaUid":"3816-112"},"3816-115":{"renderedLength":1797,"gzipLength":0,"brotliLength":582,"metaUid":"3816-114"},"3816-117":{"renderedLength":1208,"gzipLength":0,"brotliLength":490,"metaUid":"3816-116"},"3816-119":{"renderedLength":290,"gzipLength":0,"brotliLength":177,"metaUid":"3816-118"},"3816-121":{"renderedLength":573,"gzipLength":0,"brotliLength":239,"metaUid":"3816-120"},"3816-123":{"renderedLength":238,"gzipLength":0,"brotliLength":141,"metaUid":"3816-122"},"3816-125":{"renderedLength":602,"gzipLength":0,"brotliLength":177,"metaUid":"3816-124"},"3816-127":{"renderedLength":239,"gzipLength":0,"brotliLength":140,"metaUid":"3816-126"},"3816-129":{"renderedLength":2256,"gzipLength":0,"brotliLength":551,"metaUid":"3816-128"},"3816-131":{"renderedLength":1088,"gzipLength":0,"brotliLength":343,"metaUid":"3816-130"},"3816-133":{"renderedLength":87,"gzipLength":0,"brotliLength":71,"metaUid":"3816-132"},"3816-135":{"renderedLength":5706,"gzipLength":0,"brotliLength":1318,"metaUid":"3816-134"}},"nodeMetas":{"3816-78":{"id":"/src/lib/utils/removeUndefined.ts","moduleParts":{"index.js":"3816-79"},"imported":[],"importedBy":[{"uid":"3816-80"}]},"3816-80":{"id":"/src/lib/config/services/env.ts","moduleParts":{"index.js":"3816-81"},"imported":[{"uid":"3816-78"}],"importedBy":[{"uid":"3816-98"}]},"3816-82":{"id":"/src/lib/config/services/git.ts","moduleParts":{"index.js":"3816-83"},"imported":[{"uid":"3816-150"},{"uid":"3816-151"},{"uid":"3816-149"},{"uid":"3816-152"}],"importedBy":[{"uid":"3816-98"}]},"3816-84":{"id":"/src/lib/config/services/ignore.ts","moduleParts":{"index.js":"3816-85"},"imported":[{"uid":"3816-150"}],"importedBy":[{"uid":"3816-98"}]},"3816-86":{"id":"/src/lib/config/services/project.ts","moduleParts":{"index.js":"3816-87"},"imported":[{"uid":"3816-150"}],"importedBy":[{"uid":"3816-98"}]},"3816-88":{"id":"/src/lib/config/services/xdg.ts","moduleParts":{"index.js":"3816-89"},"imported":[{"uid":"3816-150"},{"uid":"3816-149"},{"uid":"3816-151"}],"importedBy":[{"uid":"3816-98"}]},"3816-90":{"id":"/src/lib/config/services/yargs.ts","moduleParts":{"index.js":"3816-91"},"imported":[{"uid":"3816-139"},{"uid":"3816-140"}],"importedBy":[{"uid":"3816-134"},{"uid":"3816-98"}]},"3816-92":{"id":"/src/lib/langchain/prompts/commitDefault.ts","moduleParts":{"index.js":"3816-93"},"imported":[{"uid":"3816-145"}],"importedBy":[{"uid":"3816-134"},{"uid":"3816-96"}]},"3816-94":{"id":"/src/lib/langchain/prompts/summarize.ts","moduleParts":{"index.js":"3816-95"},"imported":[{"uid":"3816-145"}],"importedBy":[{"uid":"3816-116"},{"uid":"3816-96"}]},"3816-96":{"id":"/src/lib/config/default.ts","moduleParts":{"index.js":"3816-97"},"imported":[{"uid":"3816-92"},{"uid":"3816-94"}],"importedBy":[{"uid":"3816-98"}]},"3816-98":{"id":"/src/lib/config/index.ts","moduleParts":{"index.js":"3816-99"},"imported":[{"uid":"3816-80"},{"uid":"3816-82"},{"uid":"3816-84"},{"uid":"3816-86"},{"uid":"3816-88"},{"uid":"3816-90"},{"uid":"3816-96"}],"importedBy":[{"uid":"3816-134"},{"uid":"3816-116"},{"uid":"3816-128"},{"uid":"3816-106"},{"uid":"3816-110"}]},"3816-100":{"id":"/src/lib/utils/logger.ts","moduleParts":{"index.js":"3816-101"},"imported":[{"uid":"3816-138"},{"uid":"3816-142"},{"uid":"3816-143"},{"uid":"3816-144"}],"importedBy":[{"uid":"3816-134"},{"uid":"3816-116"},{"uid":"3816-106"},{"uid":"3816-110"}]},"3816-102":{"id":"/src/lib/utils/getPathFromFilePath.ts","moduleParts":{"index.js":"3816-103"},"imported":[],"importedBy":[{"uid":"3816-106"}]},"3816-104":{"id":"/src/lib/langchain/chains/summarize.ts","moduleParts":{"index.js":"3816-105"},"imported":[{"uid":"3816-155"}],"importedBy":[{"uid":"3816-106"}]},"3816-106":{"id":"/src/lib/parsers/default/utils/summarizeDiffs.ts","moduleParts":{"index.js":"3816-107"},"imported":[{"uid":"3816-153"},{"uid":"3816-100"},{"uid":"3816-98"},{"uid":"3816-102"},{"uid":"3816-104"}],"importedBy":[{"uid":"3816-116"}]},"3816-108":{"id":"/src/lib/parsers/default/utils/createDiffTree.ts","moduleParts":{"index.js":"3816-109"},"imported":[],"importedBy":[{"uid":"3816-116"}]},"3816-110":{"id":"/src/lib/parsers/default/utils/collectDiffs.ts","moduleParts":{"index.js":"3816-111"},"imported":[{"uid":"3816-98"},{"uid":"3816-100"}],"importedBy":[{"uid":"3816-116"}]},"3816-112":{"id":"/src/lib/langchain/utils.ts","moduleParts":{"index.js":"3816-113"},"imported":[{"uid":"3816-145"},{"uid":"3816-146"},{"uid":"3816-147"},{"uid":"3816-148"}],"importedBy":[{"uid":"3816-134"},{"uid":"3816-116"}]},"3816-114":{"id":"/src/lib/simple-git/getDiff.ts","moduleParts":{"index.js":"3816-115"},"imported":[{"uid":"3816-154"}],"importedBy":[{"uid":"3816-116"}]},"3816-116":{"id":"/src/lib/parsers/default/index.ts","moduleParts":{"index.js":"3816-117"},"imported":[{"uid":"3816-98"},{"uid":"3816-106"},{"uid":"3816-100"},{"uid":"3816-108"},{"uid":"3816-110"},{"uid":"3816-112"},{"uid":"3816-94"},{"uid":"3816-114"}],"importedBy":[{"uid":"3816-134"}]},"3816-118":{"id":"/src/lib/ui.ts","moduleParts":{"index.js":"3816-119"},"imported":[{"uid":"3816-138"}],"importedBy":[{"uid":"3816-134"}]},"3816-120":{"id":"/src/lib/utils/getTokenizer.ts","moduleParts":{"index.js":"3816-121"},"imported":[{"uid":"3816-141"}],"importedBy":[{"uid":"3816-134"}]},"3816-122":{"id":"/src/lib/langchain/chains/llm.ts","moduleParts":{"index.js":"3816-123"},"imported":[{"uid":"3816-146"}],"importedBy":[{"uid":"3816-134"}]},"3816-124":{"id":"/src/lib/simple-git/getStatus.ts","moduleParts":{"index.js":"3816-125"},"imported":[],"importedBy":[{"uid":"3816-128"},{"uid":"3816-126"}]},"3816-126":{"id":"/src/lib/simple-git/getSummaryText.ts","moduleParts":{"index.js":"3816-127"},"imported":[{"uid":"3816-124"}],"importedBy":[{"uid":"3816-128"}]},"3816-128":{"id":"/src/lib/simple-git/getChanges.ts","moduleParts":{"index.js":"3816-129"},"imported":[{"uid":"3816-149"},{"uid":"3816-98"},{"uid":"3816-124"},{"uid":"3816-126"}],"importedBy":[{"uid":"3816-134"},{"uid":"3816-130"}]},"3816-130":{"id":"/src/lib/parsers/noResult.ts","moduleParts":{"index.js":"3816-131"},"imported":[{"uid":"3816-128"}],"importedBy":[{"uid":"3816-134"}]},"3816-132":{"id":"/src/lib/simple-git/createCommit.ts","moduleParts":{"index.js":"3816-133"},"imported":[],"importedBy":[{"uid":"3816-134"}]},"3816-134":{"id":"/src/index.ts","moduleParts":{"index.js":"3816-135"},"imported":[{"uid":"3816-136"},{"uid":"3816-98"},{"uid":"3816-116"},{"uid":"3816-118"},{"uid":"3816-90"},{"uid":"3816-120"},{"uid":"3816-100"},{"uid":"3816-92"},{"uid":"3816-112"},{"uid":"3816-122"},{"uid":"3816-130"},{"uid":"3816-128"},{"uid":"3816-132"},{"uid":"3816-137"}],"importedBy":[],"isEntry":true},"3816-136":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-134"}],"isExternal":true},"3816-137":{"id":"simple-git","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-134"}],"isExternal":true},"3816-138":{"id":"chalk","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-118"},{"uid":"3816-100"}],"isExternal":true},"3816-139":{"id":"yargs","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-90"}],"isExternal":true},"3816-140":{"id":"yargs/helpers","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-90"}],"isExternal":true},"3816-141":{"id":"gpt3-tokenizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-120"}],"isExternal":true},"3816-142":{"id":"ora","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-100"}],"isExternal":true},"3816-143":{"id":"performance-now","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-100"}],"isExternal":true},"3816-144":{"id":"pretty-ms","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-100"}],"isExternal":true},"3816-145":{"id":"langchain/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-92"},{"uid":"3816-112"},{"uid":"3816-94"}],"isExternal":true},"3816-146":{"id":"langchain/chains","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-112"},{"uid":"3816-122"}],"isExternal":true},"3816-147":{"id":"langchain/llms/openai","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-112"}],"isExternal":true},"3816-148":{"id":"langchain/text_splitter","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-112"}],"isExternal":true},"3816-149":{"id":"path","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-128"},{"uid":"3816-82"},{"uid":"3816-88"}],"isExternal":true},"3816-150":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-82"},{"uid":"3816-84"},{"uid":"3816-86"},{"uid":"3816-88"}],"isExternal":true},"3816-151":{"id":"os","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-82"},{"uid":"3816-88"}],"isExternal":true},"3816-152":{"id":"ini","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-82"}],"isExternal":true},"3816-153":{"id":"p-queue","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-106"}],"isExternal":true},"3816-154":{"id":"diff","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-114"}],"isExternal":true},"3816-155":{"id":"langchain/document","moduleParts":{},"imported":[],"importedBy":[{"uid":"3816-104"}],"isExternal":true}},"env":{"rollup":"3.26.1"},"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
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "zero-effort git commits with commit copilot, or coco for short.",
|
|
5
5
|
"author": "gfargo <ghfargo@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"@types/ini": "^1.3.31",
|
|
49
49
|
"@types/inquirer": "^9.0.3",
|
|
50
50
|
"@types/jest": "^29.5.2",
|
|
51
|
-
"@types/nodegit": "^0.28.3",
|
|
52
51
|
"@types/yargs": "^17.0.24",
|
|
53
52
|
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
|
54
53
|
"@typescript-eslint/parser": "^5.61.0",
|
|
@@ -73,7 +72,6 @@
|
|
|
73
72
|
"typescript": "^5.1.6"
|
|
74
73
|
},
|
|
75
74
|
"dependencies": {
|
|
76
|
-
"@huggingface/inference": "^1.8.0",
|
|
77
75
|
"@inquirer/prompts": "^2.3.0",
|
|
78
76
|
"chalk": "^4.1.2",
|
|
79
77
|
"diff": "^5.1.0",
|
|
@@ -81,12 +79,12 @@
|
|
|
81
79
|
"ini": "^4.1.1",
|
|
82
80
|
"langchain": "^0.0.102",
|
|
83
81
|
"minimatch": "^9.0.1",
|
|
84
|
-
"nodegit": "^0.28.0-alpha.21",
|
|
85
82
|
"openai": "^3.2.1",
|
|
86
83
|
"ora": "^5.4.1",
|
|
87
|
-
"p-queue": "^
|
|
84
|
+
"p-queue": "^5.0.0",
|
|
88
85
|
"performance-now": "^2.1.0",
|
|
89
|
-
"pretty-ms": "^
|
|
86
|
+
"pretty-ms": "^7.0.1",
|
|
87
|
+
"simple-git": "^3.19.1",
|
|
90
88
|
"yargs": "^17.7.2"
|
|
91
89
|
}
|
|
92
90
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Repository, Tree, Index } from 'nodegit';
|
|
2
|
-
import { FileChange } from '../../../types';
|
|
3
|
-
import { Logger } from '../../../utils/logger';
|
|
4
|
-
export declare const parseFileDiff: (nodeFile: FileChange, repo: Repository, headTree: Tree, index: Index, logger: Logger) => Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const EMPTY_GIT_TREE_HASH = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Repository } from 'nodegit';
|
|
2
|
-
import { FileChange } from '../../types';
|
|
3
|
-
export type GetChangesArgs = {
|
|
4
|
-
ignoreUnstaged?: boolean;
|
|
5
|
-
ignoreUntracked?: boolean;
|
|
6
|
-
ignoredFiles?: string[];
|
|
7
|
-
ignoredExtensions?: string[];
|
|
8
|
-
};
|
|
9
|
-
export type GetChangesResult = {
|
|
10
|
-
staged: FileChange[];
|
|
11
|
-
unstaged?: FileChange[];
|
|
12
|
-
untracked?: FileChange[];
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* The 'git status' for coco
|
|
16
|
-
*
|
|
17
|
-
* Get paths of changed files in the Git repository, excluding ignored files and extensions.
|
|
18
|
-
*
|
|
19
|
-
* @param {string[]} [options.ignoredFiles] - An optional array of file patterns to ignore.
|
|
20
|
-
* If not provided, it defaults to the `ignoredFiles` configuration value from the app's config.
|
|
21
|
-
* @param {string[]} [options.ignoredExtensions] - An optional array of file extensions to ignore.
|
|
22
|
-
* If not provided, it defaults to the `ignoredExtensions` configuration value from the app's config.
|
|
23
|
-
* @returns {Promise<GetChangesResult>} A Promise that resolves to an array of changed file paths.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* const changes = await getStagedChanges()
|
|
27
|
-
* console.log(changes)
|
|
28
|
-
* // {
|
|
29
|
-
* // staged: [
|
|
30
|
-
* // {
|
|
31
|
-
* // filepath: 'src/index.ts',
|
|
32
|
-
* // action: 'modified'
|
|
33
|
-
* // },
|
|
34
|
-
* // ],
|
|
35
|
-
* // unstaged: [
|
|
36
|
-
* // {
|
|
37
|
-
* // filepath: 'src/index.test.ts',
|
|
38
|
-
* // action: 'added'
|
|
39
|
-
* // }
|
|
40
|
-
* // ]
|
|
41
|
-
* // }
|
|
42
|
-
*/
|
|
43
|
-
export declare function getChanges(repo: Repository, options?: GetChangesArgs): Promise<GetChangesResult>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ConvenientPatch } from 'nodegit';
|
|
2
|
-
import { FileChange } from '../../types';
|
|
3
|
-
type ParsePatchesOptions = {
|
|
4
|
-
ignoredFiles?: string[];
|
|
5
|
-
ignoredExtensions?: string[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Parse patches from a git diff.
|
|
9
|
-
*
|
|
10
|
-
* @param {ConvenientPatch[]} patches - An array of git patches.
|
|
11
|
-
* @param {string[]} [options.ignoredFiles] - An optional array of file patterns to ignore.
|
|
12
|
-
* If not provided, it defaults to the `ignoredFiles` configuration value from the app's config.
|
|
13
|
-
* @param {string[]} [options.ignoredExtensions] - An optional array of file extensions to ignore.
|
|
14
|
-
* If not provided, it defaults to the `ignoredExtensions` configuration value from the app's config.
|
|
15
|
-
* @returns {Promise<FileChange[]>} A Promise that resolves to an array of file changes.
|
|
16
|
-
**/
|
|
17
|
-
export declare const parsePatches: (patches: ConvenientPatch[], { ignoredFiles, ignoredExtensions, }: ParsePatchesOptions) => Promise<FileChange[]>;
|
|
18
|
-
export {};
|
|
File without changes
|