Commit graph

99 commits

Author SHA1 Message Date
Paul Gauthier (aider)
50c987e261 style: Simplify function call 2024-08-23 14:18:38 -07:00
Paul Gauthier (aider)
12551c9563 feat: add extra_headers to commit message generation 2024-08-23 14:18:35 -07:00
Paul Gauthier (aider)
e3ad45f34e feat: change attribute_commit_message to attribute_commit_message_author 2024-08-10 11:08:39 -07:00
Paul Gauthier (aider)
0666b5f971 feat: add attribute_commit_message_committer param to prepend "aider: " to every commit message 2024-08-10 11:06:21 -07:00
Paul Gauthier
8769f31640 fix: Handle empty commit history in cmd_diff 2024-08-10 09:11:16 -07:00
Paul Gauthier (aider)
ca9ef60ede feat: Add GitRepo.get_head() method 2024-08-09 19:41:19 -04:00
Paul Gauthier
9cf672b428 fix: Add bold formatting to announcement messages
feat: Add bold formatting to commit message output
refactor: Simplify tool_output method in io.py
2024-08-09 19:26:22 -04:00
Paul Gauthier
72572f06d9 fix: Improve commit message generation by handling large diffs 2024-08-07 07:45:22 -03:00
Paul Gauthier (aider)
b6994aacee fix: Normalize current working directory in ignored_file_raw method 2024-08-06 10:25:27 -03:00
Paul Gauthier
4d0934f0a8 fix subtree logic for windows 2024-08-06 10:01:23 -03:00
Paul Gauthier
768d7af32e fix normlize_path logic 2024-08-06 09:38:51 -03:00
Paul Gauthier
4e5e9b4a1a fix: move dict init into __init__ 2024-08-06 09:34:25 -03:00
Paul Gauthier
152188389c fix 2024-08-06 08:32:48 -03:00
Paul Gauthier
793035b2e0 improve perf of repomap and other file intensive actions 2024-08-05 16:05:19 -03:00
Paul Gauthier
da3e507ec4 Revert "rename simple_send_with_retries -> send_with_retries"
This reverts commit d619edf6e9.
2024-08-02 10:49:44 -03:00
Paul Gauthier
d619edf6e9 rename simple_send_with_retries -> send_with_retries 2024-08-02 10:35:10 -03:00
Paul Gauthier (aider)
ca0ee9e9ba style: Fix import order in aider/repo.py 2024-08-01 17:19:31 -03:00
Paul Gauthier (aider)
a36861a01a refactor: Implement once-per-second check for aider ignore file 2024-08-01 17:19:27 -03:00
Paul Gauthier
33ff801f82 feat: Add refresh_aider_ignore method to GitRepo class 2024-08-01 17:19:26 -03:00
Paul Gauthier
103452aa21 fix: Remove unnecessary file caching and simplify subtree-only check 2024-08-01 16:37:38 -03:00
Paul Gauthier (aider)
24aa48198b fix: Use os.path.commonpath() to check if fname_path is below cwd_path 2024-08-01 16:28:10 -03:00
Paul Gauthier
f26862d92c fix: Add caching and logging for ignored file checks 2024-08-01 16:28:09 -03:00
Paul Gauthier (aider)
1c6cdb97ae refactor: Split ignored_file into ignored_file and ignored_file_raw 2024-08-01 16:25:41 -03:00
Paul Gauthier
17e2c02a47 fix: Improve handling of ignored files in GitRepo class 2024-08-01 16:25:40 -03:00
Paul Gauthier
f458fa86ac feat: implement caching for ignored files in GitRepo class 2024-08-01 16:02:53 -03:00
Paul Gauthier (aider)
b8dfb18aa9 feat: Add subtree_only attribute to GitRepo class 2024-08-01 15:57:43 -03:00
Paul Gauthier (aider)
d05f1e6446 feat: Add subtree_only functionality to GitRepo class 2024-08-01 15:56:45 -03:00
Paul Gauthier (aider)
1275171b90 feat: add support for the new commit_prompt arg to override prompts.commit_system
The GitRepo class in the aider/repo.py file has been updated to support a new `commit_prompt` argument. This allows overriding the default `prompts.commit_system` when generating commit messages.

The changes include:

1. Adding the `commit_prompt` parameter to the `__init__` method of the `GitRepo` class.
2. Storing the `commit_prompt` value in the `self.commit_prompt` attribute.
3. Modifying the `get_commit_message` method to use the `self.commit_prompt` value if it's provided, otherwise falling back to the default `prompts.commit_system`.

This change provides more flexibility in customizing the commit message generation process, allowing users to provide their own custom prompts if needed.
2024-07-31 09:47:49 -03:00
Paul Gauthier
16856bb4ca Give the commit message model the chat context #748 2024-06-30 13:02:23 -07:00
Paul Gauthier
9c214e0faf Implemented option to attribute commit messages in GitRepo class. 2024-06-27 10:21:04 -07:00
Paul Gauthier
34e83f9580 Implemented commit message attribution for Aider-generated edits. 2024-06-27 10:19:42 -07:00
Paul Gauthier
c207c7839a Added --attribute-author/committer options #698 2024-06-21 17:14:21 -07:00
Paul Gauthier
9e228670a2 append (aider) to author if aider wrote the code 2024-06-18 11:18:52 -07:00
Paul Gauthier
5a3627de6e finish removing aider: prefix 2024-06-18 08:37:13 -07:00
Paul Gauthier
0cc00f2a1e Removed setting and restoring GIT_COMMITTER_NAME in GitRepo class. 2024-06-18 08:15:02 -07:00
Paul Gauthier
40c28ff7d8 aider: Set committer name to include "aider" and restore original committer name after commit. 2024-06-18 08:11:54 -07:00
Paul Gauthier
01242b256c Set committer name to include "aider" and restore original committer name after commit. 2024-06-18 08:11:53 -07:00
Paul Gauthier
6216a273fe drop context at the caller 2024-06-11 13:33:46 -07:00
Paul Gauthier
20f730a673 stop including chat conversation in commits 2024-06-11 13:19:02 -07:00
Paul Gauthier
7b8e603249 aider: Shortened the docstring in aider/repo.py to comply with the 100 characters line length limit.
# Aider chat conversation:

USER: I ran this command:

 pre-commit run --files aider/repo.py

And got this output:

isort....................................................................Passed
black....................................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

aider/repo.py:247:101: E501 line too long (111 > 100 characters)
        """
        Returns a list of all files which are dirty (not committed), either staged or in the working directory.
        """

                                                                                        ^

ASSISTANT: Please add the file `aider/repo.py` to the chat so I can make the necessary changes.

USER: I added these files to the chat: aider/repo.py

ASSISTANT: To fix the flake8 error, we need to shorten the docstring to comply with the line length limit of 100 characters.

Here is the *SEARCH/REPLACE* block:

aider/repo.py
```python
<<<<<<< SEARCH
        """
        Returns a list of all files which are dirty (not committed), either staged or in the working directory.
        """
=======
        """
        Returns a list of all files which are dirty (not committed), either staged or in the working
        directory.
        """
>>>>>>> REPLACE
```
2024-05-18 18:30:51 -07:00
Paul Gauthier
abbe5416a1 Refactored GitRepo class to use consistent quotation marks for git commands. 2024-05-18 18:30:50 -07:00
Paul Gauthier
5d8ed278aa aider: Add get_dirty_files() method to return all dirty files staged or in the working directory.
# Aider chat conversation:

USER: add a get_dirty_files() method which returns all the files which are dirty (not committed) either staged or in the working dir.

ASSISTANT: To add the `get_dirty_files()` method, we need to:

1. Define the new method in the `GitRepo` class.
2. Implement the logic to return all dirty files, both staged and in the working directory.

Here is the *SEARCH/REPLACE* block:

aider/repo.py
```python
<<<<<<< SEARCH
    def is_dirty(self, path=None):
=======
    def get_dirty_files(self):
        """
        Returns a list of all files which are dirty (not committed), either staged or in the working directory.
        """
        dirty_files = set()

        # Get staged files
        staged_files = self.repo.git.diff('--name-only', '--cached').splitlines()
        dirty_files.update(staged_files)

        # Get unstaged files
        unstaged_files = self.repo.git.diff('--name-only').splitlines()
        dirty_files.update(unstaged_files)

        return list(dirty_files)

>>>>>>> REPLACE
```

aider/repo.py
```python
<<<<<<< SEARCH
        return self.repo.is_dirty(path=path)
=======
        return self.repo.is_dirty(path=path)
>>>>>>> REPLACE
```
2024-05-18 18:13:08 -07:00
Paul Gauthier
b882d5db4c Do not require gpt-3.5 in GitRepo 2024-04-20 09:47:43 -07:00
Paul Gauthier
4e50f0d095 Support weak_model=False 2024-04-19 14:05:58 -07:00
Paul Gauthier
f81b62dfea Added --require-model-info 2024-04-19 14:01:02 -07:00
Paul Gauthier
f0f0c330d7 cleanup 2024-04-19 12:14:58 -07:00
Paul Gauthier
733c09d30f fixed test_repo 2024-04-18 14:55:56 -07:00
Paul Gauthier
c770fc4380 cleaned up client refs 2024-04-17 15:47:07 -07:00
Paul Gauthier
f1a31d3944 pass in commit models to gitrepo 2024-04-17 15:41:30 -07:00
Paul Gauthier
a84b4f8144 Add the ability to add images that are located outside the git repo #519 2024-04-12 08:26:49 -07:00