git-coco 0.1.1 → 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 +138 -243
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.js +137 -244
- 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 +2 -3
- 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":"458c-87","name":"removeUndefined.ts"},{"uid":"458c-109","name":"logger.ts"},{"uid":"458c-111","name":"getPathFromFilePath.ts"},{"uid":"458c-121","name":"readFile.ts"},{"uid":"458c-131","name":"getTokenizer.ts"},{"name":"git","children":[{"uid":"458c-133","name":"constants.ts"},{"uid":"458c-135","name":"getSummaryText.ts"},{"uid":"458c-137","name":"getStatus.ts"},{"uid":"458c-139","name":"parsePatches.ts"},{"uid":"458c-141","name":"getChanges.ts"},{"uid":"458c-143","name":"createCommit.ts"}]}]},{"name":"config","children":[{"name":"services","children":[{"uid":"458c-89","name":"env.ts"},{"uid":"458c-91","name":"git.ts"},{"uid":"458c-93","name":"ignore.ts"},{"uid":"458c-95","name":"project.ts"},{"uid":"458c-97","name":"xdg.ts"},{"uid":"458c-99","name":"yargs.ts"}]},{"uid":"458c-105","name":"default.ts"},{"uid":"458c-107","name":"index.ts"}]},{"name":"langchain","children":[{"name":"prompts","children":[{"uid":"458c-101","name":"commitDefault.ts"},{"uid":"458c-103","name":"summarize.ts"}]},{"name":"chains","children":[{"uid":"458c-113","name":"summarize.ts"},{"uid":"458c-145","name":"llm.ts"}]},{"uid":"458c-125","name":"utils.ts"}]},{"name":"parsers","children":[{"name":"default","children":[{"name":"utils","children":[{"uid":"458c-115","name":"summarizeDiffs.ts"},{"uid":"458c-117","name":"createDiffTree.ts"},{"uid":"458c-119","name":"collectDiffs.ts"},{"uid":"458c-123","name":"parseFileDiff.ts"}]},{"uid":"458c-127","name":"fileChangeParser.ts"}]},{"uid":"458c-147","name":"noResult.ts"}]},{"uid":"458c-129","name":"ui.ts"}]},{"uid":"458c-149","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"458c-87":{"renderedLength":258,"gzipLength":0,"brotliLength":141,"metaUid":"458c-86"},"458c-89":{"renderedLength":858,"gzipLength":0,"brotliLength":282,"metaUid":"458c-88"},"458c-91":{"renderedLength":1183,"gzipLength":0,"brotliLength":354,"metaUid":"458c-90"},"458c-93":{"renderedLength":927,"gzipLength":0,"brotliLength":271,"metaUid":"458c-92"},"458c-95":{"renderedLength":367,"gzipLength":0,"brotliLength":172,"metaUid":"458c-94"},"458c-97":{"renderedLength":539,"gzipLength":0,"brotliLength":260,"metaUid":"458c-96"},"458c-99":{"renderedLength":1588,"gzipLength":0,"brotliLength":524,"metaUid":"458c-98"},"458c-101":{"renderedLength":752,"gzipLength":0,"brotliLength":329,"metaUid":"458c-100"},"458c-103":{"renderedLength":369,"gzipLength":0,"brotliLength":200,"metaUid":"458c-102"},"458c-105":{"renderedLength":347,"gzipLength":0,"brotliLength":210,"metaUid":"458c-104"},"458c-107":{"renderedLength":719,"gzipLength":0,"brotliLength":256,"metaUid":"458c-106"},"458c-109":{"renderedLength":1634,"gzipLength":0,"brotliLength":400,"metaUid":"458c-108"},"458c-111":{"renderedLength":256,"gzipLength":0,"brotliLength":151,"metaUid":"458c-110"},"458c-113":{"renderedLength":442,"gzipLength":0,"brotliLength":201,"metaUid":"458c-112"},"458c-115":{"renderedLength":3944,"gzipLength":0,"brotliLength":1184,"metaUid":"458c-114"},"458c-117":{"renderedLength":1262,"gzipLength":0,"brotliLength":380,"metaUid":"458c-116"},"458c-119":{"renderedLength":1199,"gzipLength":0,"brotliLength":428,"metaUid":"458c-118"},"458c-121":{"renderedLength":67,"gzipLength":0,"brotliLength":57,"metaUid":"458c-120"},"458c-123":{"renderedLength":2484,"gzipLength":0,"brotliLength":779,"metaUid":"458c-122"},"458c-125":{"renderedLength":1374,"gzipLength":0,"brotliLength":559,"metaUid":"458c-124"},"458c-127":{"renderedLength":1297,"gzipLength":0,"brotliLength":511,"metaUid":"458c-126"},"458c-129":{"renderedLength":290,"gzipLength":0,"brotliLength":177,"metaUid":"458c-128"},"458c-131":{"renderedLength":573,"gzipLength":0,"brotliLength":239,"metaUid":"458c-130"},"458c-133":{"renderedLength":71,"gzipLength":0,"brotliLength":75,"metaUid":"458c-132"},"458c-135":{"renderedLength":673,"gzipLength":0,"brotliLength":196,"metaUid":"458c-134"},"458c-137":{"renderedLength":517,"gzipLength":0,"brotliLength":152,"metaUid":"458c-136"},"458c-139":{"renderedLength":1786,"gzipLength":0,"brotliLength":593,"metaUid":"458c-138"},"458c-141":{"renderedLength":2800,"gzipLength":0,"brotliLength":843,"metaUid":"458c-140"},"458c-143":{"renderedLength":463,"gzipLength":0,"brotliLength":201,"metaUid":"458c-142"},"458c-145":{"renderedLength":238,"gzipLength":0,"brotliLength":141,"metaUid":"458c-144"},"458c-147":{"renderedLength":1162,"gzipLength":0,"brotliLength":360,"metaUid":"458c-146"},"458c-149":{"renderedLength":5798,"gzipLength":0,"brotliLength":1344,"metaUid":"458c-148"}},"nodeMetas":{"458c-86":{"id":"/src/lib/utils/removeUndefined.ts","moduleParts":{"index.js":"458c-87"},"imported":[],"importedBy":[{"uid":"458c-88"}]},"458c-88":{"id":"/src/lib/config/services/env.ts","moduleParts":{"index.js":"458c-89"},"imported":[{"uid":"458c-86"}],"importedBy":[{"uid":"458c-106"}]},"458c-90":{"id":"/src/lib/config/services/git.ts","moduleParts":{"index.js":"458c-91"},"imported":[{"uid":"458c-163"},{"uid":"458c-164"},{"uid":"458c-165"},{"uid":"458c-166"}],"importedBy":[{"uid":"458c-106"}]},"458c-92":{"id":"/src/lib/config/services/ignore.ts","moduleParts":{"index.js":"458c-93"},"imported":[{"uid":"458c-163"}],"importedBy":[{"uid":"458c-106"}]},"458c-94":{"id":"/src/lib/config/services/project.ts","moduleParts":{"index.js":"458c-95"},"imported":[{"uid":"458c-163"}],"importedBy":[{"uid":"458c-106"}]},"458c-96":{"id":"/src/lib/config/services/xdg.ts","moduleParts":{"index.js":"458c-97"},"imported":[{"uid":"458c-163"},{"uid":"458c-165"},{"uid":"458c-164"}],"importedBy":[{"uid":"458c-106"}]},"458c-98":{"id":"/src/lib/config/services/yargs.ts","moduleParts":{"index.js":"458c-99"},"imported":[{"uid":"458c-153"},{"uid":"458c-154"}],"importedBy":[{"uid":"458c-148"},{"uid":"458c-106"}]},"458c-100":{"id":"/src/lib/langchain/prompts/commitDefault.ts","moduleParts":{"index.js":"458c-101"},"imported":[{"uid":"458c-159"}],"importedBy":[{"uid":"458c-148"},{"uid":"458c-104"}]},"458c-102":{"id":"/src/lib/langchain/prompts/summarize.ts","moduleParts":{"index.js":"458c-103"},"imported":[{"uid":"458c-159"}],"importedBy":[{"uid":"458c-126"},{"uid":"458c-104"}]},"458c-104":{"id":"/src/lib/config/default.ts","moduleParts":{"index.js":"458c-105"},"imported":[{"uid":"458c-100"},{"uid":"458c-102"}],"importedBy":[{"uid":"458c-106"}]},"458c-106":{"id":"/src/lib/config/index.ts","moduleParts":{"index.js":"458c-107"},"imported":[{"uid":"458c-88"},{"uid":"458c-90"},{"uid":"458c-92"},{"uid":"458c-94"},{"uid":"458c-96"},{"uid":"458c-98"},{"uid":"458c-104"}],"importedBy":[{"uid":"458c-148"},{"uid":"458c-126"},{"uid":"458c-140"},{"uid":"458c-114"},{"uid":"458c-118"},{"uid":"458c-138"}]},"458c-108":{"id":"/src/lib/utils/logger.ts","moduleParts":{"index.js":"458c-109"},"imported":[{"uid":"458c-152"},{"uid":"458c-156"},{"uid":"458c-157"},{"uid":"458c-158"}],"importedBy":[{"uid":"458c-148"},{"uid":"458c-126"},{"uid":"458c-114"},{"uid":"458c-118"}]},"458c-110":{"id":"/src/lib/utils/getPathFromFilePath.ts","moduleParts":{"index.js":"458c-111"},"imported":[],"importedBy":[{"uid":"458c-114"}]},"458c-112":{"id":"/src/lib/langchain/chains/summarize.ts","moduleParts":{"index.js":"458c-113"},"imported":[{"uid":"458c-170"}],"importedBy":[{"uid":"458c-114"}]},"458c-114":{"id":"/src/lib/parsers/default/utils/summarizeDiffs.ts","moduleParts":{"index.js":"458c-115"},"imported":[{"uid":"458c-167"},{"uid":"458c-108"},{"uid":"458c-106"},{"uid":"458c-110"},{"uid":"458c-112"}],"importedBy":[{"uid":"458c-126"}]},"458c-116":{"id":"/src/lib/parsers/default/utils/createDiffTree.ts","moduleParts":{"index.js":"458c-117"},"imported":[],"importedBy":[{"uid":"458c-126"}]},"458c-118":{"id":"/src/lib/parsers/default/utils/collectDiffs.ts","moduleParts":{"index.js":"458c-119"},"imported":[{"uid":"458c-106"},{"uid":"458c-108"}],"importedBy":[{"uid":"458c-126"}]},"458c-120":{"id":"/src/lib/utils/readFile.ts","moduleParts":{"index.js":"458c-121"},"imported":[{"uid":"458c-163"},{"uid":"458c-171"}],"importedBy":[{"uid":"458c-122"}]},"458c-122":{"id":"/src/lib/parsers/default/utils/parseFileDiff.ts","moduleParts":{"index.js":"458c-123"},"imported":[{"uid":"458c-150"},{"uid":"458c-168"},{"uid":"458c-120"}],"importedBy":[{"uid":"458c-126"}]},"458c-124":{"id":"/src/lib/langchain/utils.ts","moduleParts":{"index.js":"458c-125"},"imported":[{"uid":"458c-159"},{"uid":"458c-160"},{"uid":"458c-161"},{"uid":"458c-162"}],"importedBy":[{"uid":"458c-148"},{"uid":"458c-126"}]},"458c-126":{"id":"/src/lib/parsers/default/fileChangeParser.ts","moduleParts":{"index.js":"458c-127"},"imported":[{"uid":"458c-106"},{"uid":"458c-114"},{"uid":"458c-108"},{"uid":"458c-116"},{"uid":"458c-118"},{"uid":"458c-122"},{"uid":"458c-124"},{"uid":"458c-102"}],"importedBy":[{"uid":"458c-148"}]},"458c-128":{"id":"/src/lib/ui.ts","moduleParts":{"index.js":"458c-129"},"imported":[{"uid":"458c-152"}],"importedBy":[{"uid":"458c-148"}]},"458c-130":{"id":"/src/lib/utils/getTokenizer.ts","moduleParts":{"index.js":"458c-131"},"imported":[{"uid":"458c-155"}],"importedBy":[{"uid":"458c-148"}]},"458c-132":{"id":"/src/lib/utils/git/constants.ts","moduleParts":{"index.js":"458c-133"},"imported":[],"importedBy":[{"uid":"458c-140"}]},"458c-134":{"id":"/src/lib/utils/git/getSummaryText.ts","moduleParts":{"index.js":"458c-135"},"imported":[],"importedBy":[{"uid":"458c-138"}]},"458c-136":{"id":"/src/lib/utils/git/getStatus.ts","moduleParts":{"index.js":"458c-137"},"imported":[],"importedBy":[{"uid":"458c-138"}]},"458c-138":{"id":"/src/lib/utils/git/parsePatches.ts","moduleParts":{"index.js":"458c-139"},"imported":[{"uid":"458c-169"},{"uid":"458c-106"},{"uid":"458c-134"},{"uid":"458c-136"}],"importedBy":[{"uid":"458c-140"}]},"458c-140":{"id":"/src/lib/utils/git/getChanges.ts","moduleParts":{"index.js":"458c-141"},"imported":[{"uid":"458c-150"},{"uid":"458c-106"},{"uid":"458c-132"},{"uid":"458c-138"}],"importedBy":[{"uid":"458c-148"},{"uid":"458c-146"}]},"458c-142":{"id":"/src/lib/utils/git/createCommit.ts","moduleParts":{"index.js":"458c-143"},"imported":[{"uid":"458c-150"}],"importedBy":[{"uid":"458c-148"}]},"458c-144":{"id":"/src/lib/langchain/chains/llm.ts","moduleParts":{"index.js":"458c-145"},"imported":[{"uid":"458c-160"}],"importedBy":[{"uid":"458c-148"}]},"458c-146":{"id":"/src/lib/parsers/noResult.ts","moduleParts":{"index.js":"458c-147"},"imported":[{"uid":"458c-140"}],"importedBy":[{"uid":"458c-148"}]},"458c-148":{"id":"/src/index.ts","moduleParts":{"index.js":"458c-149"},"imported":[{"uid":"458c-150"},{"uid":"458c-151"},{"uid":"458c-106"},{"uid":"458c-126"},{"uid":"458c-128"},{"uid":"458c-98"},{"uid":"458c-130"},{"uid":"458c-108"},{"uid":"458c-140"},{"uid":"458c-100"},{"uid":"458c-124"},{"uid":"458c-142"},{"uid":"458c-144"},{"uid":"458c-146"}],"importedBy":[],"isEntry":true},"458c-150":{"id":"nodegit","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-148"},{"uid":"458c-140"},{"uid":"458c-142"},{"uid":"458c-122"}],"isExternal":true},"458c-151":{"id":"@inquirer/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-148"}],"isExternal":true},"458c-152":{"id":"chalk","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-128"},{"uid":"458c-108"}],"isExternal":true},"458c-153":{"id":"yargs","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-98"}],"isExternal":true},"458c-154":{"id":"yargs/helpers","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-98"}],"isExternal":true},"458c-155":{"id":"gpt3-tokenizer","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-130"}],"isExternal":true},"458c-156":{"id":"ora","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-108"}],"isExternal":true},"458c-157":{"id":"performance-now","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-108"}],"isExternal":true},"458c-158":{"id":"pretty-ms","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-108"}],"isExternal":true},"458c-159":{"id":"langchain/prompts","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-100"},{"uid":"458c-124"},{"uid":"458c-102"}],"isExternal":true},"458c-160":{"id":"langchain/chains","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-124"},{"uid":"458c-144"}],"isExternal":true},"458c-161":{"id":"langchain/llms/openai","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-124"}],"isExternal":true},"458c-162":{"id":"langchain/text_splitter","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-124"}],"isExternal":true},"458c-163":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-90"},{"uid":"458c-92"},{"uid":"458c-94"},{"uid":"458c-96"},{"uid":"458c-120"}],"isExternal":true},"458c-164":{"id":"os","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-90"},{"uid":"458c-96"}],"isExternal":true},"458c-165":{"id":"path","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-90"},{"uid":"458c-96"}],"isExternal":true},"458c-166":{"id":"ini","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-90"}],"isExternal":true},"458c-167":{"id":"p-queue","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-114"}],"isExternal":true},"458c-168":{"id":"diff","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-122"}],"isExternal":true},"458c-169":{"id":"minimatch","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-138"}],"isExternal":true},"458c-170":{"id":"langchain/document","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-112"}],"isExternal":true},"458c-171":{"id":"util","moduleParts":{},"imported":[],"importedBy":[{"uid":"458c-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",
|
|
@@ -80,12 +79,12 @@
|
|
|
80
79
|
"ini": "^4.1.1",
|
|
81
80
|
"langchain": "^0.0.102",
|
|
82
81
|
"minimatch": "^9.0.1",
|
|
83
|
-
"nodegit": "^0.28.0-alpha.21",
|
|
84
82
|
"openai": "^3.2.1",
|
|
85
83
|
"ora": "^5.4.1",
|
|
86
84
|
"p-queue": "^5.0.0",
|
|
87
85
|
"performance-now": "^2.1.0",
|
|
88
86
|
"pretty-ms": "^7.0.1",
|
|
87
|
+
"simple-git": "^3.19.1",
|
|
89
88
|
"yargs": "^17.7.2"
|
|
90
89
|
}
|
|
91
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
|