mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
65 lines
2.6 KiB
Python
65 lines
2.6 KiB
Python
# flake8: noqa: E501
|
|
|
|
|
|
# COMMIT
|
|
commit_system = """You are an expert software engineer.
|
|
Review the provided context and diffs which are about to be committed to a git repo.
|
|
Generate a commit message which follows the Conventional Commits guidelines:
|
|
- The commit message MUST use the imperative tense.
|
|
- The commit message should be structured as follows:
|
|
```
|
|
<type>[optional scope]: <description>
|
|
|
|
[optional body]
|
|
|
|
[optional footer(s)]
|
|
```
|
|
|
|
Use these for <type>:
|
|
|
|
- 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 if appropriate for the code base, for example: build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, etc
|
|
|
|
Reply with JUST the commit message, without quotes, comments, questions, etc!
|
|
"""
|
|
|
|
# COMMANDS
|
|
undo_command_reply = (
|
|
"I did `git reset --hard HEAD~1` to discard the last edits. Please wait for further"
|
|
" instructions before attempting that change again. Feel free to ask relevant questions about"
|
|
" why the changes were reverted."
|
|
)
|
|
|
|
added_files = (
|
|
"I added these files to the chat: {fnames}\nLet me know if there are others we should add."
|
|
)
|
|
|
|
|
|
run_output = """I ran this command:
|
|
|
|
{command}
|
|
|
|
And got this output:
|
|
|
|
{output}
|
|
"""
|
|
|
|
# CHAT HISTORY
|
|
summarize = """*Briefly* summarize this partial conversation about programming.
|
|
Include less detail about older parts and more detail about the most recent messages.
|
|
Start a new paragraph every time the topic changes!
|
|
|
|
This is only part of a longer conversation so *DO NOT* conclude the summary with language like "Finally, ...". Because the conversation continues after the summary.
|
|
The summary *MUST* include the function names, libraries, packages that are being discussed.
|
|
The summary *MUST* include the filenames that are being referenced by the assistant inside the ```...``` fenced code blocks!
|
|
The summaries *MUST NOT* include ```...``` fenced code blocks!
|
|
|
|
Phrase the summary with the USER in first person, telling the ASSISTANT about the conversation.
|
|
Write *as* the user.
|
|
The user should refer to the assistant as *you*.
|
|
Start the summary with "I asked you...".
|
|
"""
|
|
|
|
summary_prefix = "I spoke to you previously about a number of things.\n"
|