nutlope / aicommits Goto Github PK
View Code? Open in Web Editor NEWA CLI that writes your git commit messages for you with AI
Home Page: https://www.npmjs.com/package/aicommits
License: MIT License
A CLI that writes your git commit messages for you with AI
Home Page: https://www.npmjs.com/package/aicommits
License: MIT License
After installing and running aicommits
a few times in a subdirectory, the command returns:
▲ No staged changes found. Make sure there are changes and run `git add .`
However, I did change directory to the repository root and ran aicommits
it returned:
▲ Generating your AI commit message...
▲ OpenAI API Error: Request failed with status code 429 - Too Many Requests
How is this possible? I never used the OpenAI API before, only the chat version. Does the aicommits
command also sent a request to the OpenAI API if there is nothing staged? It would help a lot if there was some kind of verbosity flag to get a better understanding of what is happening.
Now aicommits
always runs, no matter what you type behind it. This most likely caused me to almost brute force the OpenAI API.
Besides the problem I encountered this issue also proposes 3 feature requests:
aicommits
anywhere in the repository (like git status
).aicommits --help
).└ ✖ Du[n] is not a function
at he (file:///C:/Users/Mahmoud/AppData/Roaming/npm/node_modules/aicommits/dist/cli.mjs:61:2965)
at async file:///C:/Users/Mahmoud/AppData/Roaming/npm/node_modules/aicommits/dist/cli.mjs:64:15
aicommits v1.3.0
1.3.0
System:
OS: Windows 10 10.0.22621
CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
Memory: 26.82 GB / 39.37 GB
Binaries:
Node: 14.21.3 - C:\Program Files\nodejs\node.EXE
npm: 6.14.18 - C:\Program Files\nodejs\npm.CMD
i git init on an existing project
git add .
then run aicommits
@Nutlope
I do use the Open ai key with the same variable name, so could we change the default name of it I can do it, It will be more good reason cuz most of the users are devs 😂
Awesome tool by the way!
I noticed that it automatically adds a period to the end of the commit message.
It is generally accepted that Git commit subject lines should not be ended with a period, just like email subject lines. This is particularly important to remember because of the 50 character limit, as every character counts.
I suggest a small change to the code that strips any period from the end should it exist.
Hi, I am making this issue to guide people who encounter the same problem as me on Windows.
Be careful while following the README.md
command:
echo "OPENAI_KEY=<your token>" >> ~/.aicommits
This one might not support UTF-8 depending on your Windows configuration.
I did some testing to understand what the result was:
Input
And I quickly realized that the parse would not work.
Here are the only 3 solutions I have found to fix this problem:
replace()
, but this solution doesn't seem ideal to me.const configString = (await fs.readFile(configPath, 'utf8')).replace(/[^\u0020-\u007E]/g, '');
Ensure commit titles are under the 72-character limit and that they are in the imperative mood
This is an awesome tool!
A lot of times, AI comes up with something that is mostly good, but may need one or two small corrections. It might be handy to take E
for edit when prompted to use the commit message. What this could do is write the message to a file like .git/AICOMMITS_EDITMSG
, then call git commit -eF .git/AICOMMITS_EDITMSG
to open the AI-generated message in the user's editor and let them change it before committing.
As a workaround, the user can say "Yes" when asked to use the commit message, and then call git commit --amend
to make some small adjustments. But the AI-generated commit message might not pass any git hooks that check the message's contents this way.
Happy to submit a PR if this sounds good.
Typically commit messages are written in present tense rather than past tense (as outlined in the Git docs). Would be awesome if this was the default option.
Thanks for writing this tool, very awesome! 🙇🏻♂️
Hi,
I used to add some common prefixes to my commit messages (like fix, feat, doc, etc.) also they have some emojis that I will always add them to the beginning of the messages..
Hi. First of all, really cool project!
Somehow this string ended up in the commit message:
Seems like it might be coming from the git diff output somehow, see here for some reference: https://thoughtbot.com/blog/no-newline-at-end-of-file
Thank you for building this, and this is a great help for opensource dev like me, I would recommend following the git message convention. I saw that your git commit is in the past tense instead of "imperative present tense" it is good to use that.
You can learn more about this here: https://news.ycombinator.com/item?id=2079612
Let me know if you have any other questions. Happy to contribute!
We should consider the GPG key to use gpg commits, to show if this commits is verified or not
I have implement it, so l will make a PR and make your review if there's smth else I should consider
Since I run aicommit
in my terminal, I get the message below:
Update PRINT opcode to join stack items with a space and print on a single line.
It save me time about thinking message, I love it, but I want to add refactor
prefix, so I copy this message and fill the message in the commit box of VSCode, but the VSCode errors me "40 characters over 50 in current line".
Could it support control commit message's length?
I am trying to use aicommits for the first time but it's returning this:
internal/modules/run_main.js:54
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader
node version: 14.4
platform: debian 10
any help here would be highly appreciated.
Thanks
Hey,
Is there coming support for Windows or how I export that env in windows? :D
The AI is analyzing your changes
└ ✖ read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)
aicommits v1.3.0
v1.3.0
System:
OS: macOS 12.6
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 81.37 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.20.1 - /usr/local/opt/node@14/bin/node
npm: 6.14.17 - /usr/local/opt/node@14/bin/npm
It would be cool if it could optionally automatically pick a nice emoji, for example following https://gitmoji.dev
It would be also great to have an extension for WebStorm (and other IDEs from JetBrains).
Related to: #21
I found aicommits a great example of how chatgpt can be used to help developers automate their tasks. I just think the recommended messages it gave are out of context, the package doesn't know what project I'm working on, what feature I'm developing, and why I'm writing this code that way, so it gives simple commit messages as "Added function X instead of function Y" which is great as a commit description not as a message.
I'm suggesting another approach, the developer should still the commit message writer (to make sure that the commit message relates to the project context) and chatgpt writes the commit description (to make sure that much details were written). This way, developers of the same team will understand each other easily as each of their commits will have enough info about the difference it makes to the product.
I hope you can test my approach in another version of your package, actually it could be offered as a paid feature for teams.
Good luck ^^
It would be nice if there is an option to use Conventional Commits.
I did install aicommit in ubuntu for windows, using python 3.10, but I got this error:
Traceback (most recent call last):
File "/usr/local/bin/aicommit", line 5, in <module>
from autocommit.commit import main
File "/usr/local/lib/python3.10/dist-packages/autocommit/commit.py", line 2, in <module>
from PyInquirer import prompt as py_inquirer_prompt, style_from_dict, Token
File "/usr/local/lib/python3.10/dist-packages/PyInquirer/__init__.py", line 6, in <module>
from prompt_toolkit.token import Token
File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/__init__.py", line 16, in <module>
from .interface import CommandLineInterface
File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/interface.py", line 19, in <module>
from .application import Application, AbortAction
File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/application.py", line 8, in <module>
from .key_binding.bindings.basic import load_basic_bindings
File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/key_binding/bindings/basic.py", line 9, in <module>
from prompt_toolkit.renderer import HeightIsUnknownError
File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/renderer.py", line 11, in <module>
from prompt_toolkit.styles import Style
File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/styles/__init__.py", line 8, in <module>
from .from_dict import *
File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/styles/from_dict.py", line 9, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
This is caused by a change in the collections interface starting with Python 3.10. To solve the issue for now it is possible to:
is it possible to make the library compatible with python 3.10?
Error while executing in windows.
fatal: ':(exclude)package-lock.json': no such path in the working tree.
Use 'git <command> -- <path>...' to specify paths that do not exist locally.
node:internal/errors:863
const err = new Error(message);
^
Error: Command failed: git diff --cached . ':(exclude)package-lock.json' ':(exclude)yarn.lock'
fatal: ':(exclude)package-lock.json': no such path in the working tree.
Use 'git <command> -- <path>...' to specify paths that do not exist locally.
This is because
Line 31 in b486837
execSync
I will create a PR soon
It's easier to manage CLI updates with Homebrew, you don't have to install NodeJS yourself and it's generally the best practice to allow the installation of CLI tools with Homebrew.
Please contribute a formula to the homebrew repository or create your own tap.
Re-generation of the commit message requires declining and re-running the tool.
An extra cli flag can be added along with yes/no
.
Proposed output:
Would you like to use this commit message? (Y / n / r)
Thanks a lot for your great work.
There are OpenAI keys that are shorter than 51 and work perfectly fine. I have one that's 43 characters long and works perfectly fine.
v1.3.0
*
Would it be possible to add support for Chinese and Japanese languages to this great productivity tool? It would be really helpful for a wider range of users.
First, thanks a lot for building this tool!
The current limitation of 200 lines could be improved by adding --ignore-all-space
flag, which will produce more concise diff, for example when you wrap some lines in extra if
or <div>
or anything that just shifts the indentation one way or another.
I guess the code changes will be minimal.
From this:
export const getStagedDiff = async () => {
const diffCached = ['diff', '--cached'];
const { stdout: files } = await execa(
'git',
To this:
export const getStagedDiff = async () => {
const diffCached = ['diff', '--cached', '--ignore-all-space'];
const { stdout: files } = await execa(
'git',
I doubt it makes sense to parameterize this change. Am I wrong?
Happy to create a PR if needed.
Advantages of having a flag to allow additional custom prompt:
Getting this error. (I have added a new API key from https://platform.openai.com/account/api-keys to my env.)
aicommits
▲ Welcome to AICommits!
▲ Generating your AI commit message...
/Users/graup/.nvm/versions/node/v18.13.0/lib/node_modules/aicommits/bin/aicommits.js:98
const aiCommit = json.choices[0].text;
^
TypeError: Cannot read properties of undefined (reading '0')
at /Users/graup/.nvm/versions/node/v18.13.0/lib/node_modules/aicommits/bin/aicommits.js:98:38
at Generator.next (<anonymous>)
at fulfilled (/Users/graup/.nvm/versions/node/v18.13.0/lib/node_modules/aicommits/bin/aicommits.js:6:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.13.0
if commit.gpgsign
is set to true
, it's fine. At least a prompt for signing or as an argument such as aicommits -S
.
Running aicommits
command when getaddrinfo ENOTFOUND api.openai.com
will raise an error Cannot read property 'statusText' of undefined
Hey, awesome stuff! Trying to run the command, I get
/Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/aicommits/bin/aicommits.js:98
const aiCommit = json.choices[0].text;
^
TypeError: Cannot read properties of undefined (reading '0')
at /Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/aicommits/bin/aicommits.js:98:38
at Generator.next (<anonymous>)
at fulfilled (/Users/fabian/.nvm/versions/node/v16.18.1/lib/node_modules/aicommits/bin/aicommits.js:6:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Using Node v16.18.1. Let me know which system details do you need
⚡ aicommits
┌ aicommits
│
○ Detected 5 staged files:
src/pages/toutiao/pages/article/hooks.ts
src/pages/toutiao/pages/article/index.tsx
src/pages/toutiao/pages/disease/index.tsx
src/pages/toutiao/route.ts
src/pages/toutiao/types.ts
│
○ The AI is analyzing your changes
│
└ ✖ The diff is too large for the OpenAI API
What happened?
i git init
on an existing project
git add .
then run aicommits
▲ Welcome to AICommits!
node:internal/errors:478
ErrorCaptureStackTrace(err);
^
<ref *1> Error: spawnSync /bin/sh ENOBUFS
at Object.spawnSync (node:internal/child_process:1119:20)
at spawnSync (node:child_process:847:24)
at execSync (node:child_process:927:15)
at /usr/local/lib/node_modules/aicommits/bin/aicommits.js:40:51
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/aicommits/bin/aicommits.js:9:71
at new Promise (<anonymous>)
at __awaiter (/usr/local/lib/node_modules/aicommits/bin/aicommits.js:5:12)
at main (/usr/local/lib/node_modules/aicommits/bin/aicommits.js:23:12)
at /usr/local/lib/node_modules/aicommits/bin/index.js:15:32 {
errno: -105,
code: 'ENOBUFS',
syscall: 'spawnSync /bin/sh',
path: '/bin/sh',
spawnargs: [
'-c',
'git diff --cached . ":(exclude)package-lock.json" ":(exclude)yarn.lock" ":(exclude)pnpm-lock.yaml"'
],
error: [Circular *1],
status: null,
signal: 'SIGTERM',
output: [
null,
'diff --git a/app.js b/app.js\n' +
'new file mode 100644\n' +
'index 0000000..2d0a470\n' +
'--- /dev/null\n' +
'+++ b/app.js\n' +
'@@ -0,0 +1,73 @@\n' +
"+const axios = require('axios');\n" +
"+const fs = require('fs');\n" +
"+const path = require('path');\n" +
'+\n' +
'+async function getData(url) {\n' +
'+ const response = await axios.get(url);\n' +
'+ return response.data;\n' +
'+}\n' +
'+\n' +
'+async function downloadImage(url, filename) {\n' +
'+ const response = await axios.get(url, {\n' +
"+ responseType: 'stream'\n" +
'+ });\n' +
'+ response.data.pipe(fs.createWriteStream(filename));\n' +
'+ console.log(`downloaded ${filename}`);\n' +
'+}\n' +
'+\n' +
'+let next = 40106098;\n' +
'+\n' +
'+ async function getImgs(){\n' +
'+ const initialUrl = `https://www.wwe.com/api/gallery/${next}/0/0/0`;\n' +
'+ const initialData = await getData(initialUrl);\n' +
'+ const totalImages = initialData.total_images;\n' +
'+\n' +
"+ const updatedUrl = initialUrl.replace('/0/', `/${totalImages}/`);\n" +
'+ const updatedData = await getData(updatedUrl);\n' +
'+ // console.log(updatedData);\n' +
'+ let {\n' +
'+ photos\n' +
'+ } = updatedData;\n' +
'+\n' +
'+ next = updatedData.next_gallery;\n' +
'+\n' +
'+ const regex = /src="(.*?)"/;\n' +
'+\n' +
'+ const srcValues = photos.map(({\n' +
'+ photo\n' +
'+ }) => {\n' +
'+ const match = photo.match(regex);\n' +
"+ return 'https://www.wwe.com'+match[1];\n" +
'+ });\n' +
'+\n' +
'+ console.log(srcValues);\n' +
'+\n' +
'+\n' +
'+ //download images\n' +
'+ const folderName = updatedData.title;\n' +
'+ if (!fs.existsSync(folderName)) {\n' +
'+ fs.mkdirSync(folderName);\n' +
'+ }\n' +
'+ \n' +
'+ let promises = [];\n' +
'+ srcValues.forEach((photo, index) => {\n' +
'+ const filename = path.join(folderName, `photo-${index}.jpg`);\n' +
'+ setTimeout(() => {\n' +
'+ promises.push(downloadImage(photo, filename));\n' +
'+ }, 1000);\n' +
'+ });\n' +
'+\n' +
'+ await Promise.all(promises)\n' +
'+ .then(() => {\n' +
'+ console.log("All images have been downloaded.");\n' +
'+ if (next) {\n' +
'+ setTimeout(() => {\n' +
'+ getImgs();\n' +
'+ }, 3000);\n' +
'+ } else {\n' +
'+ console.log("No more galleries to download.")\n' +
'+ }\n' +
'+ });\n' +
'+ };\n' +
'+\n' +
'+ getImgs();\n' +
'diff --git a/node_modules/.bin/playwright b/node_modules/.bin/playwright\n' +
'new file mode 120000\n' +
'index 0000000..50992a7\n' +
'--- /dev/null\n' +
'+++ b/node_modules/.bin/playwright\n' +
'@@ -0,0 +1 @@\n' +
'+../playwright/cli.js\n' +
'\\ No newline at end of file\n' +
'diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json\n' +
'new file mode 100644\n' +
'index 0000000..1db02d8\n' +
'--- /dev/null\n' +
'+++ b/node_modules/.package-lock.json\n' +
'@@ -0,0 +1,124 @@\n' +
'+{\n' +
'+ "name": "wwescrapper",\n' +
'+ "version": "1.0.0",\n' +
'+ "lockfileVersion": 3,\n' +
'+ "requires": true,\n' +
'+ "packages": {\n' +
'+ "node_modules/asynckit": {\n' +
'+ "version": "0.4.0",\n' +
'+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",\n' +
'+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="\n' +
'+ },\n' +
'+ "node_modules/axios": {\n' +
'+ "version": "1.3.1",\n' +
'+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.1.tgz",\n' +
'+ "integrity": "sha512-78pWJsQTceInlyaeBQeYZ/QgZeWS8hGeKiIJiDKQe3hEyBb7sEMq0K4gjx+Va6WHTYO4zI/RRl8qGRzn0YMadA==",\n' +
'+ "dependencies": {\n' +
'+ "follow-redirects": "^1.15.0",\n' +
'+ "form-data": "^4.0.0",\n' +
'+ "proxy-from-env": "^1.1.0"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/combined-stream": {\n' +
'+ "version": "1.0.8",\n' +
'+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",\n' +
'+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",\n' +
'+ "dependencies": {\n' +
'+ "delayed-stream": "~1.0.0"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">= 0.8"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/delayed-stream": {\n' +
'+ "version": "1.0.0",\n' +
'+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",\n' +
'+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",\n' +
'+ "engines": {\n' +
'+ "node": ">=0.4.0"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/follow-redirects": {\n' +
'+ "version": "1.15.2",\n' +
'+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",\n' +
'+ "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",\n' +
'+ "funding": [\n' +
'+ {\n' +
'+ "type": "individual",\n' +
'+ "url": "https://github.com/sponsors/RubenVerborgh"\n' +
'+ }\n' +
'+ ],\n' +
'+ "engines": {\n' +
'+ "node": ">=4.0"\n' +
'+ },\n' +
'+ "peerDependenciesMeta": {\n' +
'+ "debug": {\n' +
'+ "optional": true\n' +
'+ }\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/form-data": {\n' +
'+ "version": "4.0.0",\n' +
'+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",\n' +
'+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",\n' +
'+ "dependencies": {\n' +
'+ "asynckit": "^0.4.0",\n' +
'+ "combined-stream": "^1.0.8",\n' +
'+ "mime-types": "^2.1.12"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">= 6"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/mime-db": {\n' +
'+ "version": "1.52.0",\n' +
'+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",\n' +
'+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",\n' +
'+ "engines": {\n' +
'+ "node": ">= 0.6"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/mime-types": {\n' +
'+ "version": "2.1.35",\n' +
'+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",\n' +
'+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",\n' +
'+ "dependencies": {\n' +
'+ "mime-db": "1.52.0"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">= 0.6"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/playwright": {\n' +
'+ "version": "1.30.0",\n' +
'+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.30.0.tgz",\n' +
'+ "integrity": "sha512-ENbW5o75HYB3YhnMTKJLTErIBExrSlX2ZZ1C/FzmHjUYIfxj/UnI+DWpQr992m+OQVSg0rCExAOlRwB+x+yyIg==",\n' +
'+ "hasInstallScript": true,\n' +
'+ "dependencies": {\n' +
'+ "playwright-core": "1.30.0"\n' +
'+ },\n' +
'+ "bin": {\n' +
'+ "playwright": "cli.js"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">=14"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/playwright-core": {\n' +
'+ "version": "1.30.0",\n' +
'+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.30.0.tgz",\n' +
'+ "integrity": "sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==",\n' +
'+ "bin": {\n' +
'+ "playwright": "cli.js"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">=14"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/proxy-from-env": {\n' +
'+ "version": "1.1.0",\n' +
'+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",\n' +
'+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="\n' +
'+ }\n' +
'+ }\n' +
'+}\n' +
'diff --git a/node_modules/asynckit/LICENSE b/node_modules/asynckit/LICENSE\n' +
'new file mode 100644\n' +
'index 0000000..c9eca5d\n' +
'--- /dev/null\n' +
'+++ b/node_modules/asynckit/LICENSE\n' +
'@@ -0,0 +1,21 @@\n' +
'+The MIT License (MIT)\n' +
'+\n' +
'+Copyright (c) 2016 Alex Indigo\n' +
'+\n' +
'+Permission is hereby granted, free of charge, to any person obtaining a copy\n' +
'+of this software and associated documentation files (the "Software"), to deal\n' +
'+in the Software without restriction, including without limitation the rights\n' +
'+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n' +
'+copies of the Software, and to permit persons to whom the Software is\n' +
'+furnished to do so, subject to the following conditions:\n' +
'+\n' +
'+The above copyright notice and this permission notice shall be included in all\n' +
'+copies or substantial portions of the Software.\n' +
'+\n' +
'+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n' +
'+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n' +
'+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n' +
'+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n' +
'+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n' +
'+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n' +
'+SOFTWARE.\n' +
'diff --git a/node_modules/asynckit/README.md b/node_modules/asynckit/README.md\n' +
'new file mode 100644\n' +
'index 0000000..ddcc7e6\n' +
'--- /dev/null\n' +
'+++ b/node_modules/asynckit/README.md\n' +
'@@ -0,0 +1,233 @@\n' +
'+# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)\n' +
'+\n' +
'+Minimal async jobs utility library, with streams support.\n' +
'+\n' +
'+[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)\n' +
'+[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)\n' +
'+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)\n' +
'+\n' +
'+[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)\n' +
'+[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)\n' +
'+[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)\n' +
'+\n' +
'+<!-- [![Readme](https://img.shields.io/badge/readme-tested-brightgreen.svg?style=flat)](https://www.npmjs.com/package/reamde) -->\n' +
'+\n' +
'+AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.\n' +
'+Optionally it accepts abort function (should be synchronously return by iterator for each ite'... 1079464 more characters,
''
],
pid: 620400,
stdout: 'diff --git a/app.js b/app.js\n' +
'new file mode 100644\n' +
'index 0000000..2d0a470\n' +
'--- /dev/null\n' +
'+++ b/app.js\n' +
'@@ -0,0 +1,73 @@\n' +
"+const axios = require('axios');\n" +
"+const fs = require('fs');\n" +
"+const path = require('path');\n" +
'+\n' +
'+async function getData(url) {\n' +
'+ const response = await axios.get(url);\n' +
'+ return response.data;\n' +
'+}\n' +
'+\n' +
'+async function downloadImage(url, filename) {\n' +
'+ const response = await axios.get(url, {\n' +
"+ responseType: 'stream'\n" +
'+ });\n' +
'+ response.data.pipe(fs.createWriteStream(filename));\n' +
'+ console.log(`downloaded ${filename}`);\n' +
'+}\n' +
'+\n' +
'+let next = 40106098;\n' +
'+\n' +
'+ async function getImgs(){\n' +
'+ const initialUrl = `https://www.wwe.com/api/gallery/${next}/0/0/0`;\n' +
'+ const initialData = await getData(initialUrl);\n' +
'+ const totalImages = initialData.total_images;\n' +
'+\n' +
"+ const updatedUrl = initialUrl.replace('/0/', `/${totalImages}/`);\n" +
'+ const updatedData = await getData(updatedUrl);\n' +
'+ // console.log(updatedData);\n' +
'+ let {\n' +
'+ photos\n' +
'+ } = updatedData;\n' +
'+\n' +
'+ next = updatedData.next_gallery;\n' +
'+\n' +
'+ const regex = /src="(.*?)"/;\n' +
'+\n' +
'+ const srcValues = photos.map(({\n' +
'+ photo\n' +
'+ }) => {\n' +
'+ const match = photo.match(regex);\n' +
"+ return 'https://www.wwe.com'+match[1];\n" +
'+ });\n' +
'+\n' +
'+ console.log(srcValues);\n' +
'+\n' +
'+\n' +
'+ //download images\n' +
'+ const folderName = updatedData.title;\n' +
'+ if (!fs.existsSync(folderName)) {\n' +
'+ fs.mkdirSync(folderName);\n' +
'+ }\n' +
'+ \n' +
'+ let promises = [];\n' +
'+ srcValues.forEach((photo, index) => {\n' +
'+ const filename = path.join(folderName, `photo-${index}.jpg`);\n' +
'+ setTimeout(() => {\n' +
'+ promises.push(downloadImage(photo, filename));\n' +
'+ }, 1000);\n' +
'+ });\n' +
'+\n' +
'+ await Promise.all(promises)\n' +
'+ .then(() => {\n' +
'+ console.log("All images have been downloaded.");\n' +
'+ if (next) {\n' +
'+ setTimeout(() => {\n' +
'+ getImgs();\n' +
'+ }, 3000);\n' +
'+ } else {\n' +
'+ console.log("No more galleries to download.")\n' +
'+ }\n' +
'+ });\n' +
'+ };\n' +
'+\n' +
'+ getImgs();\n' +
'diff --git a/node_modules/.bin/playwright b/node_modules/.bin/playwright\n' +
'new file mode 120000\n' +
'index 0000000..50992a7\n' +
'--- /dev/null\n' +
'+++ b/node_modules/.bin/playwright\n' +
'@@ -0,0 +1 @@\n' +
'+../playwright/cli.js\n' +
'\\ No newline at end of file\n' +
'diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json\n' +
'new file mode 100644\n' +
'index 0000000..1db02d8\n' +
'--- /dev/null\n' +
'+++ b/node_modules/.package-lock.json\n' +
'@@ -0,0 +1,124 @@\n' +
'+{\n' +
'+ "name": "wwescrapper",\n' +
'+ "version": "1.0.0",\n' +
'+ "lockfileVersion": 3,\n' +
'+ "requires": true,\n' +
'+ "packages": {\n' +
'+ "node_modules/asynckit": {\n' +
'+ "version": "0.4.0",\n' +
'+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",\n' +
'+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="\n' +
'+ },\n' +
'+ "node_modules/axios": {\n' +
'+ "version": "1.3.1",\n' +
'+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.1.tgz",\n' +
'+ "integrity": "sha512-78pWJsQTceInlyaeBQeYZ/QgZeWS8hGeKiIJiDKQe3hEyBb7sEMq0K4gjx+Va6WHTYO4zI/RRl8qGRzn0YMadA==",\n' +
'+ "dependencies": {\n' +
'+ "follow-redirects": "^1.15.0",\n' +
'+ "form-data": "^4.0.0",\n' +
'+ "proxy-from-env": "^1.1.0"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/combined-stream": {\n' +
'+ "version": "1.0.8",\n' +
'+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",\n' +
'+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",\n' +
'+ "dependencies": {\n' +
'+ "delayed-stream": "~1.0.0"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">= 0.8"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/delayed-stream": {\n' +
'+ "version": "1.0.0",\n' +
'+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",\n' +
'+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",\n' +
'+ "engines": {\n' +
'+ "node": ">=0.4.0"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/follow-redirects": {\n' +
'+ "version": "1.15.2",\n' +
'+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",\n' +
'+ "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",\n' +
'+ "funding": [\n' +
'+ {\n' +
'+ "type": "individual",\n' +
'+ "url": "https://github.com/sponsors/RubenVerborgh"\n' +
'+ }\n' +
'+ ],\n' +
'+ "engines": {\n' +
'+ "node": ">=4.0"\n' +
'+ },\n' +
'+ "peerDependenciesMeta": {\n' +
'+ "debug": {\n' +
'+ "optional": true\n' +
'+ }\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/form-data": {\n' +
'+ "version": "4.0.0",\n' +
'+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",\n' +
'+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",\n' +
'+ "dependencies": {\n' +
'+ "asynckit": "^0.4.0",\n' +
'+ "combined-stream": "^1.0.8",\n' +
'+ "mime-types": "^2.1.12"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">= 6"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/mime-db": {\n' +
'+ "version": "1.52.0",\n' +
'+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",\n' +
'+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",\n' +
'+ "engines": {\n' +
'+ "node": ">= 0.6"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/mime-types": {\n' +
'+ "version": "2.1.35",\n' +
'+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",\n' +
'+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",\n' +
'+ "dependencies": {\n' +
'+ "mime-db": "1.52.0"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">= 0.6"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/playwright": {\n' +
'+ "version": "1.30.0",\n' +
'+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.30.0.tgz",\n' +
'+ "integrity": "sha512-ENbW5o75HYB3YhnMTKJLTErIBExrSlX2ZZ1C/FzmHjUYIfxj/UnI+DWpQr992m+OQVSg0rCExAOlRwB+x+yyIg==",\n' +
'+ "hasInstallScript": true,\n' +
'+ "dependencies": {\n' +
'+ "playwright-core": "1.30.0"\n' +
'+ },\n' +
'+ "bin": {\n' +
'+ "playwright": "cli.js"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">=14"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/playwright-core": {\n' +
'+ "version": "1.30.0",\n' +
'+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.30.0.tgz",\n' +
'+ "integrity": "sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==",\n' +
'+ "bin": {\n' +
'+ "playwright": "cli.js"\n' +
'+ },\n' +
'+ "engines": {\n' +
'+ "node": ">=14"\n' +
'+ }\n' +
'+ },\n' +
'+ "node_modules/proxy-from-env": {\n' +
'+ "version": "1.1.0",\n' +
'+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",\n' +
'+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="\n' +
'+ }\n' +
'+ }\n' +
'+}\n' +
'diff --git a/node_modules/asynckit/LICENSE b/node_modules/asynckit/LICENSE\n' +
'new file mode 100644\n' +
'index 0000000..c9eca5d\n' +
'--- /dev/null\n' +
'+++ b/node_modules/asynckit/LICENSE\n' +
'@@ -0,0 +1,21 @@\n' +
'+The MIT License (MIT)\n' +
'+\n' +
'+Copyright (c) 2016 Alex Indigo\n' +
'+\n' +
'+Permission is hereby granted, free of charge, to any person obtaining a copy\n' +
'+of this software and associated documentation files (the "Software"), to deal\n' +
'+in the Software without restriction, including without limitation the rights\n' +
'+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n' +
'+copies of the Software, and to permit persons to whom the Software is\n' +
'+furnished to do so, subject to the following conditions:\n' +
'+\n' +
'+The above copyright notice and this permission notice shall be included in all\n' +
'+copies or substantial portions of the Software.\n' +
'+\n' +
'+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n' +
'+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n' +
'+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n' +
'+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n' +
'+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n' +
'+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n' +
'+SOFTWARE.\n' +
'diff --git a/node_modules/asynckit/README.md b/node_modules/asynckit/README.md\n' +
'new file mode 100644\n' +
'index 0000000..ddcc7e6\n' +
'--- /dev/null\n' +
'+++ b/node_modules/asynckit/README.md\n' +
'@@ -0,0 +1,233 @@\n' +
'+# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)\n' +
'+\n' +
'+Minimal async jobs utility library, with streams support.\n' +
'+\n' +
'+[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)\n' +
'+[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)\n' +
'+[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)\n' +
'+\n' +
'+[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)\n' +
'+[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)\n' +
'+[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)\n' +
'+\n' +
'+<!-- [![Readme](https://img.shields.io/badge/readme-tested-brightgreen.svg?style=flat)](https://www.npmjs.com/package/reamde) -->\n' +
'+\n' +
'+AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.\n' +
'+Optionally it accepts abort function (should be synchronously return by iterator for each ite'... 1079464 more characters,
stderr: ''
}
Consider making an extension for Visual Studio Code. That would be awesome.
Feature request:
Please Provide a '-y' flag to non-interactively accept the comment
To hack around I did the following:
File: /usr/local/lib/node_modules/aicommits/dist/cli.js
// const confirmationMessage = yield inquirer_1.default.prompt([
// {
// name: 'useCommitMessage',
// message: 'Would you like to use this commit message? (Y / n)',
// choices: ['Y', 'y', 'n'],
// default: 'y',
// },
// ]);
//if (confirmationMessage.useCommitMessage === 'n') {
if (0) {
Thank you.
It would be great to have a flag -p
or --prefix
that would take an argument that would be prefixed into the final commit message.
aicommits -p web:
would yield this commit message web: <commit message generated by aicommits>
Why?
For monorepos it can be useful to prefix commits the name of the project you are working on. It would also allow us to make it possible to use semantic commits before we get that generated by GPT, while being more versatile.
Even though I exported the API key from the "config.fish" file it says that it is not exported please export it and try again. Then I decided to try it with the bash shell then it worked fine
When I run the command, I get this error. I installed the program through NPM exactly as shown in the README.
file:///usr/local/lib/node_modules/aicommits/dist/cli.mjs:9
`),t=[];for(let c=0;c<Math.max(n.length,i.length);c++)n[c]!==i[c]&&t.push(c);return t}const Vn=Symbol("clack:cancel");function Hn(e){return e===Vn}function Ze(e,a){e.isTTY&&e.setRawMode(a)}const Jr=new Set(["up","down","left","right","space","enter"]);class Gn{constructor({render:a,input:n=sn,output:i=on,...t},c=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=t,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=a.bind(this),this._track=c,this.input=n,this.output=i}prompt(){const a=new Ns(0);return a._write=(n,i,t)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),t()},this.input.pipe(a),this.rl=un.createInterface({input:this.input,output:a,tabSize:2,prompt:"",escapeCodeTimeout:50}),un.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Ze(this.input,!0),this.render(),new Promise((n,i)=>{this.once("submit",()=>{this.output.write(V.cursor.show),Ze(this.input,!1),n(this.value)}),this.once("cancel",()=>{this.output.write(V.cursor.show),Ze(this.input,!1),n(Vn)})})}on(a,n){const i=this.subscribers.get(a)??[];i.push({cb:n}),this.subscribers.set(a,i)}once(a,n){const i=this.subscribers.get(a)??[];i.push({cb:n,once:!0}),this.subscribers.set(a,i)}emit(a,...n){const i=this.subscribers.get(a)??[],t=[];for(const c of i)c.cb(...n),c.once&&t.push(()=>i.splice(i.indexOf(c),1));for(const c of t)c()}unsubscribe(){this.subscribers.clear()}onKeypress(a,n){if(this.state==="error"&&(this.state="active"),n?.name&&Jr.has(n.name)&&this.emit("cursor",n.name),a&&(a.toLowerCase()==="y"||a.toLowerCase()==="n")&&this.emit("confirm",a.toLowerCase()==="y"),n?.name==="return"){if("placeholder"in this.opts&&!this.value&&(this.value=this.opts.placeholder),this.opts.validate){const i=this.opts.validate(this.value);i&&(this.error=i,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}a===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
SyntaxError: Unexpected token '?'
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
⧗ input: Commit message: Add 3D card style module and modifications to 3D card component
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
husky - commit-msg hook exited with code 1 (error)
node:internal/errors:867
const err = new Error(message);
Thinking about introducing a second mode to address all the Git integration issues:
By running aicommits install-hook
, a prepare-commit-msg
hook will be installed to the current Git project.
The hook will be called whenever the user runs git commit
without a message. I'm still exploring this, but ideally there's a way to specify "AI mode". For example: git commit -F ai
or git commit -t ai
.
The hook will basically do the same thing this script does now: send the diff to OpenAI to get a message. However, there will only be a simple loading state and perhaps a selector prompt if multiple suggestions are returned.
To specify how many suggestions should be generated, we need to look into whether we can pass in a flag (or env vars?), but if not, we'd have to rely on the ~/.aicommits
config file.
With Git hook mode, we'll be able to integrate Git completely and support power users.
CLI mode is what we have now. Even though Git hook mode should be able to handle all use-cases, I think there's value in preserving the aicommits
command for a more user-friendly experience.
I was just wondering if the commits in this project are written by aicommits
🌝
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.