Comments (10)
Thanks for the suggestion @spenserblack, I agreed that this would be great! @privatenumber has a PR #64 that when merged, should enable us to do this well. I'll let you two chat about implementation details :)
from aicommits.
I'm working on a Git hook in #83 so using the editor configured in Git will open via git commit
with AI generated messages.
For CLI mode, @Nutlope wants a more user-friendly editor inline.
from aicommits.
A git hook is an interesting idea 👍
Assuming that some users may want to use aicommits in all repositories via the hook, I wonder if it would make sense to document how to use a template directory so that all new repos come with the hook pre-installed.
from aicommits.
Closed via #95
from aicommits.
This makes it possible to edit when using the hook integration.
But I think it would still be useful to hit E
to edit the commit, when using the aicommits
command on an un-hooked project.
Why? I jump around lots of projects, and occasionally call on aicommits
. I would like to have this feature without needing to set up the hook integration.
from aicommits.
That idea was tabled because we'll need to maintain a CLI text editor which would be a huge maintenance risk if people keep asking for more features.
from aicommits.
we'll need to maintain a CLI text editor
Can't you just start a text editor subprocess? Git picks the editor to use in this order:
$GIT_EDITOR
- core.editor config value
$VISUAL
$EDITOR
E.g. GIT_EDITOR=vi git commit
.
So instead of building out a CLI text editor, why not try to resolve an editor from these and try to execute them in a subprocess, in a way similar to git?
from aicommits.
That's what was implemented with the git hook.
from aicommits.
I agree with the implication in @joeytwiddle's comment that installing a hook in many repositories can get repetitive. TBH I usually limit hooks to what must be used to contribute to a repo (linters, formatters, etc.).
Maybe I'm misunderstanding your definition of "CLI text editor," but what I'm asking is if E
should remain tabled if you don't need to maintain a CLI text editor.
from aicommits.
Instead of aicommits opening an editor, perhaps we could ask git to do it.
For example, after running git commit -m ...
aicommits/src/commands/aicommits.ts
Line 101 in 578572b
We could immediately run git commit --amend
(iff the user had pressed E
)
from aicommits.
Related Issues (20)
- Prompt shouldn't include Character limit
- Generate Message Body
- aicommits hides the output of husky HOT 1
- Option to skip precommit checks HOT 1
- Error: Too many requests HOT 1
- Extract issue name from branch and append to commit message HOT 2
- Message sanitization should not always remove newlines
- Feature: Ollama integration HOT 6
- self-signed certificate in certificate chain
- Unable to Set OpenAI API Key HOT 4
- How to setting max tokens? HOT 2
- Timeout Error in aicommits v1.11.0 on Large File Commit HOT 1
- Customize generated commit message HOT 1
- Add support for custom OpenAI base url (LocalAI integration) HOT 4
- at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
- certificate is not yet valid
- Integrate with copilot-gpt4-service
- Prompt fine-tuning HOT 1
- More customizable commit message template, auto commit, support for other LLMs, and Perforce VCS HOT 2
- Random "<commit message>" appears in message
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aicommits.