From 35216bc5e7d2969e72f7d220225dba55ad3f99a8 Mon Sep 17 00:00:00 2001 From: Hassan El Mghari Date: Mon, 13 Feb 2023 19:29:40 -0500 Subject: [PATCH] not taking into account lock files --- README.md | 6 ++++-- aicommits.ts | 9 +++++++-- package.json | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index deaafa1..b0cec30 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,13 @@ This CLI tool runs a `git diff` command to grab all the latest changes, sends th The next version of the CLI, v2, will address both of these limitations! -## Future tasks +## Tasks now -- Ignore package-lock and yarn.lock files - Experiment with openai curie and codex as opposed to dacinvi - Figure out the price per commit + +## Future tasks + - Add support for conventional commits as a flag that users can enable - Try supporting more than 200 lines by grabbing the diff per file - Build landing page for the 2.0 launch diff --git a/aicommits.ts b/aicommits.ts index 2619fe8..a3d6e95 100644 --- a/aicommits.ts +++ b/aicommits.ts @@ -27,7 +27,12 @@ export async function main() { process.exit(1); } - const diff = execSync("git diff --cached", { encoding: "utf8" }); + const diff = execSync( + "git diff --cached ':!package-lock.json' ':!yarn.lock'", + { + encoding: "utf8", + } + ); if (!diff) { console.log( @@ -78,7 +83,7 @@ export async function main() { async function generateCommitMessage(prompt: string) { const payload = { - model: "text-davinci-003", + model: "text-curie-001", prompt, temperature: 0.7, top_p: 1, diff --git a/package.json b/package.json index 0cc0f6a..63bfe4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aicommits", - "version": "0.2.7", + "version": "0.2.8", "description": "Writes your git commit messages for you with AI", "main": "bin/index.js", "bin": {