Commit graph

3108 commits

Author SHA1 Message Date
paul-gauthier
a6dfd10f65
Update benchmarks-1106.md 2023-11-06 21:06:52 -08:00
paul-gauthier
d14aa23ece
Update benchmarks-1106.md 2023-11-06 21:06:15 -08:00
paul-gauthier
e9254070b1
Update benchmarks-1106.md 2023-11-06 21:05:12 -08:00
Paul Gauthier
beb026cc25 copy 2023-11-06 20:46:17 -08:00
Paul Gauthier
0253588616 set version to 0.17.1-dev 2023-11-06 20:27:37 -08:00
Paul Gauthier
393878120e version bump to 0.17.0 2023-11-06 20:27:12 -08:00
Paul Gauthier
dfb921c509 copy 2023-11-06 20:24:44 -08:00
Paul Gauthier
6b6935e56d Updated HISTORY 2023-11-06 20:21:10 -08:00
Paul Gauthier
5098be6172 Add context windows and pricing for 1106 models 2023-11-06 20:18:40 -08:00
paul-gauthier
c8b95b486f
Update benchmarks-1106.md 2023-11-06 19:50:23 -08:00
paul-gauthier
a2d52536a5
Update benchmarks-1106.md 2023-11-06 19:48:30 -08:00
Paul Gauthier
a6027721c1 copy 2023-11-06 19:15:01 -08:00
Paul Gauthier
2675ed5e87 copy 2023-11-06 19:12:22 -08:00
Paul Gauthier
15a1c754a4 copy 2023-11-06 18:58:24 -08:00
Paul Gauthier
11424739a0 copy 2023-11-06 18:56:21 -08:00
Paul Gauthier
e91b12c71c copy 2023-11-06 18:53:49 -08:00
Paul Gauthier
c55fbe582a copy 2023-11-06 18:51:45 -08:00
Paul Gauthier
87d3e6d763 copy 2023-11-06 18:50:33 -08:00
Paul Gauthier
df7f254b38 copy 2023-11-06 18:48:42 -08:00
Paul Gauthier
35754247b4 copy 2023-11-06 18:48:14 -08:00
Paul Gauthier
93aa497220 copy 2023-11-06 18:37:13 -08:00
Paul Gauthier
f658a6575a copy 2023-11-06 18:30:48 -08:00
Paul Gauthier
a238ab9bd5 copy 2023-11-06 18:30:26 -08:00
Paul Gauthier
08fd051a37 new benchmark results 2023-11-06 18:26:14 -08:00
Paul Gauthier
976fc7a836 update benchmarking script 2023-11-06 18:26:02 -08:00
Paul Gauthier
5ddda920b3 new benchmark results 2023-11-06 18:25:52 -08:00
Paul Gauthier
44388dbc6d Updated dev-requirements.in to include all benchmark dependencies 2023-11-06 13:08:48 -08:00
Paul Gauthier
af71638b06 less simple, but docker image builds 2023-11-03 14:53:22 -07:00
Paul Gauthier
208fc7ae78 simpler 2023-11-03 14:45:49 -07:00
Paul Gauthier
65f9d39d95 copy 2023-11-03 14:42:47 -07:00
Paul Gauthier
c16210cdd7 copy 2023-11-03 14:39:47 -07:00
Paul Gauthier
87ab5495a7 Simplify scripting aider 2023-11-03 14:29:45 -07:00
Paul Gauthier
51425faff6 added scripting docs 2023-11-03 14:24:33 -07:00
Paul Gauthier
1fe48fd161 Updated /help messages 2023-11-03 09:23:04 -07:00
Paul Gauthier
d868e96467 Abandon checking gitignore if can not read file 2023-11-03 08:33:32 -07:00
Paul Gauthier
c4f6ce6435 handle encoding error when checking .gitignore 2023-11-03 08:12:01 -07:00
Paul Gauthier
f3d3815201 Armor AutoCompleter against unicode errors #305 2023-11-03 07:26:21 -07:00
Paul Gauthier
efb3f03a62 added dev-requirements 2023-11-03 06:42:52 -07:00
Paul Gauthier
3bdae96396 Updated all dependencies via pip-compile #319 2023-11-03 06:41:50 -07:00
Paul Gauthier
997d7a995d cleanup inside GitTemporaryDirectory 2023-11-02 16:24:28 -07:00
Paul Gauthier
6b3342a150 really cleanup for winsows 2023-11-02 16:20:04 -07:00
Paul Gauthier
a7e89ea965 commit the dirty repo 2023-11-02 16:11:26 -07:00
Paul Gauthier
2e232b1d20 Ignore PermissionError when testing too 2023-11-02 16:07:08 -07:00
Paul Gauthier
d720bfe459 Properly test if /added file is already in the repo #314 2023-11-02 15:50:30 -07:00
Paul Gauthier
2609ec1b06 find_original_update_blocks now accepts fence param, raises on mangled <source>filename.ext #317 2023-11-02 12:05:39 -07:00
Paul Gauthier
f0711d4b96 Disable pretty when the fence is an html tag not triple-backticks 2023-11-02 10:52:55 -07:00
Paul Gauthier
00cd460ed8 Updated HISTORY 2023-11-02 10:50:48 -07:00
Paul Gauthier
b3bc8b0f2b Ask for concise S/R blocks 2023-11-02 10:09:18 -07:00
Paul Gauthier
5c9275191e aider: Refused to add blocked file by .gitignore and printed error message.
# Aider chat conversation:

USER: crash when /add a file which is blocked by .gitignore; we should catch the error, print a tool_error an

d refuse to /add the file
. > /add tmp/wordpress.py

Traceback (most recent call last):
  File "/home/m/.local/bin/aider", line 8, in <module>
    sys.exit(main())
  File "/home/m/.local/lib/python3.10/site-packages/aider/main.py", line 564, in main
    coder.run()
  File "/home/m/.local/lib/python3.10/site-packages/aider/coders/base_coder.py", line 319, in run
    new_user_message = self.run_loop()
  File "/home/m/.local/lib/python3.10/site-packages/aider/coders/base_coder.py", line 398, in run_loop
    return self.commands.run(inp)
  File "/home/m/.local/lib/python3.10/site-packages/aider/commands.py", line 73, in run
    return self.do_run(matching_commands[0][1:], rest_inp)
  File "/home/m/.local/lib/python3.10/site-packages/aider/commands.py", line 51, in do_run
    return cmd_method(args)
  File "/home/m/.local/lib/python3.10/site-packages/aider/commands.py", line 316, in cmd_add
    self.coder.repo.repo.git.add(abs_file_path)
  File "/home/m/.local/lib/python3.10/site-packages/git/cmd.py", line 741, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/home/m/.local/lib/python3.10/site-packages/git/cmd.py", line 1315, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/home/m/.local/lib/python3.10/site-packages/git/cmd.py", line 1109, in execute
    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git add /home/m/Private/Projects/Freelance/nbdter69/pars_porntube/tmp/wordpress.py
  stderr: 'The following paths are ignored by one of your .gitignore files:
tmp
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"'

ASSISTANT: To handle this issue, we need to modify the `cmd_add` method in the `Commands` class in the `aider/commands.py` file. We will add a check to see if the file is ignored by git before trying to add it. If it is ignored, we will print an error message and skip adding the file.

Here is the *SEARCH/REPLACE block* for the change:

<source>python
aider/commands.py
<<<<<<< SEARCH
        for matched_file in all_matched_files:
            abs_file_path = self.coder.abs_root_path(matched_file)

            if not abs_file_path.startswith(self.coder.root):
                self.io.tool_error(
                    f"Can not add {abs_file_path}, which is not within {self.coder.root}"
                )
                continue

            if self.coder.repo and matched_file not in git_files:
                self.coder.repo.repo.git.add(abs_file_path)
                git_added.append(matched_file)

            if abs_file_path in self.coder.abs_fnames:
                self.io.tool_error(f"{matched_file} is already in the chat")
            else:
                content = self.io.read_text(abs_file_path)
                if content is None:
                    self.io.tool_error(f"Unable to read {matched_file}")
                else:
                    self.coder.abs_fnames.add(abs_file_path)
                    self.io.tool_output(f"Added {matched_file} to the chat")
                    added_fnames.append(matched_file)
=======
        for matched_file in all_matched_files:
            abs_file_path = self.coder.abs_root_path(matched_file)

            if not abs_file_path.startswith(self.coder.root):
                self.io.tool_error(
                    f"Can not add {abs_file_path}, which is not within {self.coder.root}"
                )
                continue

            if self.coder.repo and matched_file not in git_files:
                try:
                    self.coder.repo.repo.git.add(abs_file_path)
                    git_added.append(matched_file)
                except git.exc.GitCommandError as e:
                    self.io.tool_error(f"Unable to add {matched_file}: {str(e)}")
                    continue

            if abs_file_path in self.coder.abs_fnames:
                self.io.tool_error(f"{matched_file} is already in the chat")
            else:
                content = self.io.read_text(abs_file_path)
                if content is None:
                    self.io.tool_error(f"Unable to read {matched_file}")
                else:
                    self.coder.abs_fnames.add(abs_file_path)
                    self.io.tool_output(f"Added {matched_file} to the chat")
                    added_fnames.append(matched_file)
>>>>>>> REPLACE
</source>
2023-11-02 10:08:25 -07:00
Paul Gauthier
6556265c23 added test for #310 2023-11-02 09:45:16 -07:00