aider-ce 0.88.20__py3-none-any.whl → 0.88.38__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aider/__init__.py +1 -1
- aider/_version.py +2 -2
- aider/args.py +63 -43
- aider/coders/agent_coder.py +331 -79
- aider/coders/agent_prompts.py +3 -15
- aider/coders/architect_coder.py +21 -5
- aider/coders/base_coder.py +661 -413
- aider/coders/base_prompts.py +6 -3
- aider/coders/chat_chunks.py +39 -17
- aider/commands.py +79 -15
- aider/diffs.py +10 -9
- aider/exceptions.py +1 -1
- aider/helpers/coroutines.py +8 -0
- aider/helpers/requests.py +45 -0
- aider/history.py +5 -0
- aider/io.py +179 -25
- aider/main.py +86 -35
- aider/models.py +16 -8
- aider/queries/tree-sitter-language-pack/c-tags.scm +3 -0
- aider/queries/tree-sitter-language-pack/clojure-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/commonlisp-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/cpp-tags.scm +3 -0
- aider/queries/tree-sitter-language-pack/csharp-tags.scm +6 -0
- aider/queries/tree-sitter-language-pack/dart-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/elixir-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/elm-tags.scm +3 -0
- aider/queries/tree-sitter-language-pack/go-tags.scm +7 -0
- aider/queries/tree-sitter-language-pack/java-tags.scm +6 -0
- aider/queries/tree-sitter-language-pack/javascript-tags.scm +8 -0
- aider/queries/tree-sitter-language-pack/lua-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +3 -0
- aider/queries/tree-sitter-language-pack/python-tags.scm +10 -0
- aider/queries/tree-sitter-language-pack/r-tags.scm +6 -0
- aider/queries/tree-sitter-language-pack/ruby-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/rust-tags.scm +3 -0
- aider/queries/tree-sitter-language-pack/solidity-tags.scm +1 -1
- aider/queries/tree-sitter-language-pack/swift-tags.scm +4 -1
- aider/queries/tree-sitter-languages/c-tags.scm +3 -0
- aider/queries/tree-sitter-languages/c_sharp-tags.scm +6 -0
- aider/queries/tree-sitter-languages/cpp-tags.scm +3 -0
- aider/queries/tree-sitter-languages/dart-tags.scm +2 -1
- aider/queries/tree-sitter-languages/elixir-tags.scm +5 -0
- aider/queries/tree-sitter-languages/elm-tags.scm +3 -0
- aider/queries/tree-sitter-languages/fortran-tags.scm +3 -0
- aider/queries/tree-sitter-languages/go-tags.scm +6 -0
- aider/queries/tree-sitter-languages/haskell-tags.scm +2 -0
- aider/queries/tree-sitter-languages/java-tags.scm +6 -0
- aider/queries/tree-sitter-languages/javascript-tags.scm +8 -0
- aider/queries/tree-sitter-languages/julia-tags.scm +2 -2
- aider/queries/tree-sitter-languages/kotlin-tags.scm +3 -0
- aider/queries/tree-sitter-languages/ocaml_interface-tags.scm +6 -0
- aider/queries/tree-sitter-languages/php-tags.scm +6 -0
- aider/queries/tree-sitter-languages/python-tags.scm +10 -0
- aider/queries/tree-sitter-languages/ruby-tags.scm +5 -0
- aider/queries/tree-sitter-languages/rust-tags.scm +3 -0
- aider/queries/tree-sitter-languages/scala-tags.scm +2 -3
- aider/queries/tree-sitter-languages/typescript-tags.scm +3 -0
- aider/queries/tree-sitter-languages/zig-tags.scm +20 -3
- aider/repomap.py +71 -11
- aider/resources/model-metadata.json +27335 -635
- aider/resources/model-settings.yml +190 -0
- aider/scrape.py +2 -0
- aider/tools/__init__.py +2 -0
- aider/tools/command.py +84 -94
- aider/tools/command_interactive.py +95 -110
- aider/tools/delete_block.py +131 -159
- aider/tools/delete_line.py +97 -132
- aider/tools/delete_lines.py +120 -160
- aider/tools/extract_lines.py +288 -312
- aider/tools/finished.py +30 -43
- aider/tools/git_branch.py +107 -109
- aider/tools/git_diff.py +44 -56
- aider/tools/git_log.py +39 -53
- aider/tools/git_remote.py +37 -51
- aider/tools/git_show.py +33 -47
- aider/tools/git_status.py +30 -44
- aider/tools/grep.py +214 -242
- aider/tools/indent_lines.py +175 -201
- aider/tools/insert_block.py +220 -253
- aider/tools/list_changes.py +65 -80
- aider/tools/ls.py +64 -80
- aider/tools/make_editable.py +57 -73
- aider/tools/make_readonly.py +50 -66
- aider/tools/remove.py +64 -80
- aider/tools/replace_all.py +96 -109
- aider/tools/replace_line.py +118 -156
- aider/tools/replace_lines.py +160 -197
- aider/tools/replace_text.py +159 -160
- aider/tools/show_numbered_context.py +115 -141
- aider/tools/thinking.py +52 -0
- aider/tools/undo_change.py +78 -91
- aider/tools/update_todo_list.py +130 -138
- aider/tools/utils/base_tool.py +64 -0
- aider/tools/utils/output.py +118 -0
- aider/tools/view.py +38 -54
- aider/tools/view_files_matching.py +131 -134
- aider/tools/view_files_with_symbol.py +108 -120
- aider/urls.py +1 -1
- aider/versioncheck.py +4 -3
- aider/website/docs/config/adv-model-settings.md +237 -0
- aider/website/docs/config/agent-mode.md +36 -3
- aider/website/docs/config/model-aliases.md +2 -1
- aider/website/docs/faq.md +6 -11
- aider/website/docs/languages.md +2 -2
- aider/website/docs/more/infinite-output.md +27 -0
- {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/METADATA +112 -70
- {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/RECORD +112 -107
- aider_ce-0.88.38.dist-info/entry_points.txt +6 -0
- aider_ce-0.88.20.dist-info/entry_points.txt +0 -2
- /aider/tools/{tool_utils.py → utils/helpers.py} +0 -0
- {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/WHEEL +0 -0
- {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/licenses/LICENSE.txt +0 -0
- {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/top_level.txt +0 -0
aider/coders/agent_prompts.py
CHANGED
|
@@ -25,8 +25,8 @@ class AgentPrompts(CoderPrompts):
|
|
|
25
25
|
<context name="workflow_and_tool_usage">
|
|
26
26
|
## Core Workflow
|
|
27
27
|
1. **Plan**: Determine the necessary changes. Use the `UpdateTodoList` tool to manage your plan. Always begin by the todo list.
|
|
28
|
-
2. **Explore**: Use discovery tools (`ViewFilesAtGlob`, `ViewFilesMatching`, `Ls`, `Grep`) to find relevant files. These tools add files to context as read-only. Use `Grep` first for broad searches to avoid context clutter.
|
|
29
|
-
3. **Think**: Given the contents of your exploration, reason through the edits that need to be made to accomplish the goal. For complex edits, briefly outline your plan for the user.
|
|
28
|
+
2. **Explore**: Use discovery tools (`ViewFilesAtGlob`, `ViewFilesMatching`, `Ls`, `Grep`) to find relevant files. These tools add files to context as read-only. Use `Grep` first for broad searches to avoid context clutter. Concisely describe your search strategy with the `Thinking` tool.
|
|
29
|
+
3. **Think**: Given the contents of your exploration, concisely reason through the edits with the `Thinking` tool that need to be made to accomplish the goal. For complex edits, briefly outline your plan for the user.
|
|
30
30
|
4. **Execute**: Use the appropriate editing tool. Remember to use `MakeEditable` on a file before modifying it. Break large edits (those greater than 100 lines) into multiple steps
|
|
31
31
|
5. **Verify & Recover**: After every edit, check the resulting diff snippet. If an edit is incorrect, **immediately** use `UndoChange` in your very next message before attempting any other action.
|
|
32
32
|
6. **Finished**: Use the `Finished` tool when all tasks and changes needed to accomplish the goal are finished
|
|
@@ -49,17 +49,6 @@ Use these for precision and safety.
|
|
|
49
49
|
1. **Turn 1**: Use `ShowNumberedContext` to get the exact, current line numbers.
|
|
50
50
|
2. **Turn 2**: In your *next* message, use the line-based editing tool (`ReplaceLines`, etc.) with the verified numbers.
|
|
51
51
|
|
|
52
|
-
### 2. SEARCH/REPLACE (Last Resort Only)
|
|
53
|
-
Use this format **only** when granular tools are demonstrably insufficient for the task (e.g., a complex, non-contiguous pattern change). Using SEARCH/REPLACE for tasks achievable by tools like `ReplaceLines` is a violation of your instructions.
|
|
54
|
-
|
|
55
|
-
**You MUST include a justification comment explaining why granular tools cannot be used.**
|
|
56
|
-
|
|
57
|
-
Justification: I'm using SEARCH/REPLACE because [specific reason granular tools are insufficient].
|
|
58
|
-
path/to/file.ext <<<<<<< SEARCH Original code to be replaced.
|
|
59
|
-
New code to insert.
|
|
60
|
-
|
|
61
|
-
REPLACE
|
|
62
|
-
|
|
63
52
|
</context>
|
|
64
53
|
|
|
65
54
|
Always reply to the user in {language}.
|
|
@@ -89,9 +78,8 @@ I am working with code in a git repository. Here are summaries of some files:
|
|
|
89
78
|
<context name="critical_reminders">
|
|
90
79
|
## Reminders
|
|
91
80
|
- Any tool call automatically continues to the next turn. Provide no tool calls in your final answer.
|
|
92
|
-
- Prioritize granular tools. Using SEARCH/REPLACE unnecessarily is incorrect.
|
|
93
|
-
- For SEARCH/REPLACE, you MUST provide a justification.
|
|
94
81
|
- Use context blocks (directory structure, git status) to orient yourself.
|
|
82
|
+
- Remove files you are done with viewing/editing from the context with the `Remove` tool. It is fine to re-add them later
|
|
95
83
|
|
|
96
84
|
{lazy_prompt}
|
|
97
85
|
{shell_cmd_reminder}
|
aider/coders/architect_coder.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
from ..commands import SwitchCoder
|
|
1
4
|
from .architect_prompts import ArchitectPrompts
|
|
2
5
|
from .ask_coder import AskCoder
|
|
3
6
|
from .base_coder import Coder
|
|
@@ -14,9 +17,17 @@ class ArchitectCoder(AskCoder):
|
|
|
14
17
|
if not content or not content.strip():
|
|
15
18
|
return
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
tweak_responses = getattr(self.args, "tweak_responses", False)
|
|
21
|
+
confirmation = await self.io.confirm_ask("Edit the files?", allow_tweak=tweak_responses)
|
|
22
|
+
|
|
23
|
+
if not self.auto_accept_architect and not confirmation:
|
|
18
24
|
return
|
|
19
25
|
|
|
26
|
+
if confirmation == "tweak":
|
|
27
|
+
content = self.io.edit_in_editor(content)
|
|
28
|
+
|
|
29
|
+
await asyncio.sleep(0.1)
|
|
30
|
+
|
|
20
31
|
kwargs = dict()
|
|
21
32
|
|
|
22
33
|
# Use the editor_model from the main_model if it exists, otherwise use the main_model itself
|
|
@@ -24,6 +35,7 @@ class ArchitectCoder(AskCoder):
|
|
|
24
35
|
|
|
25
36
|
kwargs["main_model"] = editor_model
|
|
26
37
|
kwargs["edit_format"] = self.main_model.editor_edit_format
|
|
38
|
+
kwargs["args"] = self.args
|
|
27
39
|
kwargs["suggest_shell_commands"] = False
|
|
28
40
|
kwargs["map_tokens"] = 0
|
|
29
41
|
kwargs["total_cost"] = self.total_cost
|
|
@@ -41,8 +53,12 @@ class ArchitectCoder(AskCoder):
|
|
|
41
53
|
if self.verbose:
|
|
42
54
|
editor_coder.show_announcements()
|
|
43
55
|
|
|
44
|
-
|
|
56
|
+
try:
|
|
57
|
+
await editor_coder.generate(user_message=content, preproc=False)
|
|
58
|
+
self.move_back_cur_messages("I made those changes to the files.")
|
|
59
|
+
self.total_cost = editor_coder.total_cost
|
|
60
|
+
self.aider_commit_hashes = editor_coder.aider_commit_hashes
|
|
61
|
+
except Exception as e:
|
|
62
|
+
self.io.tool_error(e)
|
|
45
63
|
|
|
46
|
-
self.
|
|
47
|
-
self.total_cost = editor_coder.total_cost
|
|
48
|
-
self.aider_commit_hashes = editor_coder.aider_commit_hashes
|
|
64
|
+
raise SwitchCoder(main_model=self.main_model, edit_format="architect")
|