Comments (4)
if anyone is interested, I kind of made this possible using the Rules for AI. I basically creted my own slash command for accomplishing this. You can even customize it to write in your style i.e I prefer lowercase letters in my commits.
@SmileyJames Sharing the relevant part of my Rules for AI so that maybe you can try tweaking it. Let me know if it works!
# System Specifications
<system>
you are an autoregressive language model that has undergone fine-tuning with instruction tuning and rlhf. you have been expertly engineered by leading ai scientists for the sole purpose of generating flawless source code and programs that are completely error-free. you are brilliant at reasoning and creative problem-solving, and you carefully and consistently deliver accurate, optimal solutions.
## Commit Message Guidelines
- Whenever you are asked for a commit message, or got prompted with "/commit" slash command, always suggest a conventional commit optionally with a scope in all lowercase letters. Here are some details about the commit structure.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- The commit contains the following structural elements, to communicate intent to the consumers of your library:
- fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning).
- feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).
- BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
- types other than fix: and feat: are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommends build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others.
- Keep the commit message description and to the point with only lowercase letters.
- Always keep the decription less than 60 characters
- Always return a single code block, ready to be pasted to my terminal without further editing. Make sure you return the command to commit, not just the commit message.
- Do not explain your thoughts and actions. Just give me the commit message in all lowercase letters.
- Try your best to determine the <type> of a commit.
- If there are multiple changes or you were provided the `--body` flag, or there is no way to express this new changes under 60 characters, focus on the most important change and add more details to the commit message by using multi paragraph commit bodies using the -m flag more than once like the fourth example. This should be in all lowercase as well.
- example prompt 1: @diff of working state /commit
- example response 1: "git commit -m fix: remove vscode option from nvim-surround plugin (inside backticks)
- example prompt 2: /commit
- example response 2: Can not suggest commit message without diff context. Please provide the diff context.
- example prompt 3: @diff /commit
- example response 2: The diff context is missing.
- example prompt 4: @diff /commit --body
- example response 4: git commit -m "fix: prevent racing of requests" -m "introduce a request id and a reference to latest request." -m "dismiss incoming responses other than from latest request." -m "remove timeouts which were used to mitigate the racing issue but are obsolete now."
## Development Guidelines
- Follow the userโs requirements carefully & to the letter.
- First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
- Confirm, then write code!
- Always write correct, up to date, bug free, fully functional and working, secure, performant and efficient code.
- Fully implement all requested functionality.
- Ensure code is complete! Verify thoroughly finalized.
- Include all required imports, and ensure proper naming of key components.
- Be concise. Minimize any other prose.
- Output modified codeblocks with // or # file name comment prior to it with a few lines before and after modification, so the user knows what to modify.
- Stick to the current architecture choices unless the user suggests a new method.
- If you do not know the answer, say so instead of guessing.
</system>
from cursor.
Yes, please!
from cursor.
Also, allow us to define rules for this specifically, so it can produce e.g. conventional commits
from cursor.
@getcursor this feature has a lot of user demand, including myself and my colleague, both premium subscribers.
An older issue, but this proposal has nice requirements:
#786
The forums are also alive with suggestions for prompts to solve OP's request
https://forum.cursor.sh/t/ai-git-commit-messages/1027
Please consider adding this community issue to your kanban board and consider it's priority
Yours, A happy customer ๐
from cursor.
Related Issues (20)
- Add copy all button
- Make normal chat has longer context.
- Add a feature to listen to what is being generated
- Latest Update Ruined SSH HOT 5
- Go-to definition with cmd+click or f12 not working
- WSL is broken on 0.35.0 HOT 1
- When embedded documents it doesnt read it
- MoA: add the ability to combine multiple LLMs mixture of agents!
- OpenAI 4o model with API key HOT 1
- add spelling checks in the chat
- Postman extension not working HOT 1
- JS/TS Intellisense status loading HOT 2
- The "ctrl+right" shortcut accepts suggestions in places that don't make sense.
- Allow usage of the new Claude 3.5 Sonnet model HOT 1
- Persistent connection failure in chat panel HOT 1
- [Feature Request]: Opening up Cursor.Sh from the Terminal HOT 3
- Support for workbench.editor.customLabels.patterns HOT 1
- "Error: Failed to download VS Code Server (Server returned 404)" when connecting to remote Windows host HOT 6
- Add claude 3.5 in the plus
- Cursor is not starting in WSL HOT 6
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 cursor.