Commit graph

3167 commits

Author SHA1 Message Date
Paul Gauthier
eec174fae7 added tags.scm for C 2023-10-19 12:32:44 -07:00
Paul Gauthier
ce8b6523a6 aider: Refactor struct_specifier, function_declarator, type_definition, and enum_specifier to include the definition class in their respective queries.
# Aider chat conversation:

ASSISTANT: No changes are needed.
2023-10-19 12:27:24 -07:00
Paul Gauthier
f5a6edb568 Added tree-sitter-c-tags.scm for aider queries. 2023-10-19 12:27:23 -07:00
Paul Gauthier
c7f35b2ce5 add ts credits 2023-10-19 12:25:55 -07:00
Paul Gauthier
551dddd746 handle languages where tree-sitter only has definition tags 2023-10-19 12:25:01 -07:00
Paul Gauthier
056f4affa6 aider: Refactor tree-sitter-cpp-tags.scm to include the ".definition" property in the appropriate places.
# Aider chat conversation:

ASSISTANT: No changes are needed.
2023-10-19 11:19:07 -07:00
Paul Gauthier
6d1bd4fa01 Added tree-sitter-cpp-tags.scm for aider queries. 2023-10-19 11:19:05 -07:00
Paul Gauthier
998dedd2c6 Added grep-ast dependency 2023-10-19 10:30:18 -07:00
Paul Gauthier
cb8d9d6a64 Merge branch 'main' into sitter-map 2023-10-19 10:09:22 -07:00
Paul Gauthier
cd30e531be better warnings on files that are missing or not normal 2023-10-19 10:09:16 -07:00
Paul Gauthier
8b87c1291e new repomap article 2023-10-19 09:11:15 -07:00
Paul Gauthier
cba883d4cd fix sorting and whitespace in map 2023-10-19 08:15:28 -07:00
Paul Gauthier
0291a99257 use rel_fname 2023-10-19 08:10:45 -07:00
Paul Gauthier
cff5534fab show_top_of_file_parent_scope 2023-10-19 08:07:59 -07:00
Paul Gauthier
28bce3535a Merge branch 'main' into sitter-map 2023-10-19 08:01:37 -07:00
Paul Gauthier
54742a2d75 Updated HISTORY 2023-10-19 08:01:15 -07:00
Paul Gauthier
25c06940d6 re-enable twine/pypi 2023-10-19 07:09:09 -07:00
Paul Gauthier
02386c16aa setup multi-arch docker images 2023-10-19 07:00:23 -07:00
Paul Gauthier
9750fcd04a copy 2023-10-18 16:28:20 -07:00
Paul Gauthier
4c2125d289 cleanup 2023-10-18 16:18:59 -07:00
Paul Gauthier
2a1255ed07 cleanup 2023-10-18 16:12:07 -07:00
Paul Gauthier
40d702abd1 cleanup 2023-10-18 16:06:12 -07:00
Paul Gauthier
c0375d3328 fix tests; fix off-by-one bug in output of repomap 2023-10-18 15:42:38 -07:00
Paul Gauthier
10b856e0af cleanup 2023-10-18 15:18:12 -07:00
Paul Gauthier
2c98ea4448 Merge branch 'main' into sitter-map 2023-10-18 15:04:55 -07:00
Paul Gauthier
b2b78a98ee Added libportaudio2 to the docker container 2023-10-18 13:38:41 -07:00
Paul Gauthier
49b9034629 Added universal ctags to the docker image 2023-10-18 13:30:49 -07:00
Paul Gauthier
790f7ddee3 make the docker image a bit smaller 2023-10-18 13:26:20 -07:00
Paul Gauthier
ee3f3a44fd aider: Refactored Dockerfile to combine RUN commands, use --no-cache-dir option when installing Python packages, and remove unnecessary pip install --upgrade pip command.
# Aider chat conversation:

ASSISTANT: Yes, there are a few more things we can do to clean up the Dockerfile:

1. We can combine the `RUN` commands into a single command to reduce the number of layers in the Docker image. This can make the image smaller and faster to build.

2. We can use the `--no-cache-dir` option when installing Python packages with pip. This will prevent pip from caching downloaded packages, which can save space in the Docker image.

3. We can remove the `pip install --upgrade pip` command. The Python Docker images are regularly updated, so the version of pip included in the image is usually fairly recent.

Here's how we can make these changes:

```dockerfile
docker/Dockerfile
<<<<<<< HEAD
FROM python:3.10-slim
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
COPY . /aider
RUN pip install --upgrade pip && pip install /aider && rm -rf /aider
WORKDIR /app
ENTRYPOINT ["aider"]
=======
FROM python:3.10-slim
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* && \
    pip install --no-cache-dir /aider && rm -rf /aider
WORKDIR /app
ENTRYPOINT ["aider"]
>>>>>>> updated
```

Please note that these changes will make the Docker image smaller and faster to build, but they won't affect the functionality of the application.
2023-10-18 13:19:22 -07:00
Paul Gauthier
a6a49b13bb Remove the /aider directory after installing the package. 2023-10-18 13:19:21 -07:00
Paul Gauthier
8561bfde33 copy 2023-10-18 13:13:42 -07:00
Paul Gauthier
a4cd4ac65f Updated HISTORY 2023-10-18 13:09:59 -07:00
Paul Gauthier
88e42a124b copy 2023-10-18 12:47:26 -07:00
Paul Gauthier
dffeaac4d9 Added --commit command #283 2023-10-18 12:45:51 -07:00
Paul Gauthier
3f2dfa24ee aider: Add a --commit arg that commits all pending changes with a suitable commit message.
# Aider chat conversation:

USER: Add a --commit arg that will commit all pending changes with a suitable commit message

ASSISTANT: To add a `--commit` argument, we need to modify the `aider/main.py` file. Specifically, we will add a new argument to the `git_group` argument group in the `main` function.

Here is the proposed change:

```python
aider/main.py
<<<<<<< HEAD
    git_group.add_argument(
        "--dry-run",
        action=argparse.BooleanOptionalAction,
        default=False,
        help="Enable/disable performing a dry run without modifying files (default: False)",
    )
=======
    git_group.add_argument(
        "--dry-run",
        action=argparse.BooleanOptionalAction,
        default=False,
        help="Enable/disable performing a dry run without modifying files (default: False)",
    )
    git_group.add_argument(
        "--commit",
        action="store_true",
        help="Commit all pending changes with a suitable commit message",
        default=False,
    )
>>>>>>> updated
```

This change adds a new `--commit` argument that, when used, will trigger the commit of all pending changes. The default value is `False`, meaning that if the argument is not provided, no commit will be made. The help text provides a brief explanation of what the argument does.

After adding this argument, you will need to implement the functionality to commit changes when this argument is used. This will likely involve modifying the `GitRepo` class in the `aider/repo.py` file, but since that file is read-only, I can't provide the specific changes here.
2023-10-18 12:44:11 -07:00
Paul Gauthier
5756812938 Adopt subprocess.run(shell=True) for /git 2023-10-18 12:37:39 -07:00
paul-gauthier
44aa5c6d63
Merge pull request #272 from alexanderkjeldaas/ak/run-shell
fix: /run (cd ..; ls) should work
2023-10-18 12:35:17 -07:00
Paul Gauthier
1085549548 Give up testing aiderignore caching in github actions 2023-10-18 12:28:24 -07:00
Paul Gauthier
df27007c00 wtf 2023-10-18 12:22:01 -07:00
Paul Gauthier
1a2370f9ae sleep in the test 2023-10-18 12:15:11 -07:00
Paul Gauthier
b87c9f14fb put back caching, add debug output 2023-10-18 12:11:07 -07:00
Paul Gauthier
d1cd0f9860 do not cache aiderignore 2023-10-18 12:06:47 -07:00
Paul Gauthier
cf00037442 st_mtime_ns? 2023-10-18 12:04:09 -07:00
Paul Gauthier
a1cb6e4e7a More paranoid mtime check 2023-10-18 11:55:04 -07:00
Paul Gauthier
5e50307748 Added pathspec to reqs 2023-10-18 11:39:01 -07:00
Paul Gauthier
82dc995a04 Added helpful suggestions to /undo and /diff errors 2023-10-18 11:38:54 -07:00
Paul Gauthier
2e6c785c3b cache aiderignore 2023-10-18 10:39:07 -07:00
Paul Gauthier
583c3285ec added tests, fixed bug 2023-10-18 10:31:45 -07:00
Paul Gauthier
9725b236a3 roughed in .aiderignore 2023-10-18 10:26:43 -07:00
Paul Gauthier
f8e30ad7a0 aider: Added import for pathspec library and implemented filter_ignored_files method to filter filenames according to gitignore type specifications in self.aider_ignore_file.
# Aider chat conversation:

ASSISTANT: To implement the `filter_ignored_files` method, we need to use the `pathspec` library to filter the filenames according to the gitignore type specifications in `self.aider_ignore_file`.

The `pathspec` library is not currently imported in the `repo.py` file, so we need to add that import.

We also need to read the `aider_ignore_file` and use its contents to create a `pathspec` that we can use to filter the filenames.

Here are the changes:

```python
aider/repo.py
<<<<<<< HEAD
import os
from pathlib import Path, PurePosixPath

import git

from aider import models, prompts, utils
from aider.sendchat import simple_send_with_retries

from .dump import dump  # noqa: F401
=======
import os
import pathspec
from pathlib import Path, PurePosixPath

import git

from aider import models, prompts, utils
from aider.sendchat import simple_send_with_retries

from .dump import dump  # noqa: F401
>>>>>>> updated
```

```python
aider/repo.py
<<<<<<< HEAD
    def filter_ignored_files(self, fnames):
        if not self.aider_ignore_file:
            return

        # todo: use pathspec to filter fnames according to the gitignore type specs in self.aider_ignore_file
=======
    def filter_ignored_files(self, fnames):
        if not self.aider_ignore_file:
            return fnames

        with open(self.aider_ignore_file, 'r') as f:
            ignore_spec = pathspec.PathSpec.from_lines('gitwildmatch', f)

        return [fname for fname in fnames if not ignore_spec.match_file(fname)]
>>>>>>> updated
```

Please note that these changes assume that `self.aider_ignore_file` is a path to a file containing gitignore-style patterns, one per line. If `self.aider_ignore_file` is not in this format, the code may need to be adjusted.
2023-10-18 10:24:54 -07:00