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.
Files changed (113) hide show
  1. aider/__init__.py +1 -1
  2. aider/_version.py +2 -2
  3. aider/args.py +63 -43
  4. aider/coders/agent_coder.py +331 -79
  5. aider/coders/agent_prompts.py +3 -15
  6. aider/coders/architect_coder.py +21 -5
  7. aider/coders/base_coder.py +661 -413
  8. aider/coders/base_prompts.py +6 -3
  9. aider/coders/chat_chunks.py +39 -17
  10. aider/commands.py +79 -15
  11. aider/diffs.py +10 -9
  12. aider/exceptions.py +1 -1
  13. aider/helpers/coroutines.py +8 -0
  14. aider/helpers/requests.py +45 -0
  15. aider/history.py +5 -0
  16. aider/io.py +179 -25
  17. aider/main.py +86 -35
  18. aider/models.py +16 -8
  19. aider/queries/tree-sitter-language-pack/c-tags.scm +3 -0
  20. aider/queries/tree-sitter-language-pack/clojure-tags.scm +5 -0
  21. aider/queries/tree-sitter-language-pack/commonlisp-tags.scm +5 -0
  22. aider/queries/tree-sitter-language-pack/cpp-tags.scm +3 -0
  23. aider/queries/tree-sitter-language-pack/csharp-tags.scm +6 -0
  24. aider/queries/tree-sitter-language-pack/dart-tags.scm +5 -0
  25. aider/queries/tree-sitter-language-pack/elixir-tags.scm +5 -0
  26. aider/queries/tree-sitter-language-pack/elm-tags.scm +3 -0
  27. aider/queries/tree-sitter-language-pack/go-tags.scm +7 -0
  28. aider/queries/tree-sitter-language-pack/java-tags.scm +6 -0
  29. aider/queries/tree-sitter-language-pack/javascript-tags.scm +8 -0
  30. aider/queries/tree-sitter-language-pack/lua-tags.scm +5 -0
  31. aider/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +3 -0
  32. aider/queries/tree-sitter-language-pack/python-tags.scm +10 -0
  33. aider/queries/tree-sitter-language-pack/r-tags.scm +6 -0
  34. aider/queries/tree-sitter-language-pack/ruby-tags.scm +5 -0
  35. aider/queries/tree-sitter-language-pack/rust-tags.scm +3 -0
  36. aider/queries/tree-sitter-language-pack/solidity-tags.scm +1 -1
  37. aider/queries/tree-sitter-language-pack/swift-tags.scm +4 -1
  38. aider/queries/tree-sitter-languages/c-tags.scm +3 -0
  39. aider/queries/tree-sitter-languages/c_sharp-tags.scm +6 -0
  40. aider/queries/tree-sitter-languages/cpp-tags.scm +3 -0
  41. aider/queries/tree-sitter-languages/dart-tags.scm +2 -1
  42. aider/queries/tree-sitter-languages/elixir-tags.scm +5 -0
  43. aider/queries/tree-sitter-languages/elm-tags.scm +3 -0
  44. aider/queries/tree-sitter-languages/fortran-tags.scm +3 -0
  45. aider/queries/tree-sitter-languages/go-tags.scm +6 -0
  46. aider/queries/tree-sitter-languages/haskell-tags.scm +2 -0
  47. aider/queries/tree-sitter-languages/java-tags.scm +6 -0
  48. aider/queries/tree-sitter-languages/javascript-tags.scm +8 -0
  49. aider/queries/tree-sitter-languages/julia-tags.scm +2 -2
  50. aider/queries/tree-sitter-languages/kotlin-tags.scm +3 -0
  51. aider/queries/tree-sitter-languages/ocaml_interface-tags.scm +6 -0
  52. aider/queries/tree-sitter-languages/php-tags.scm +6 -0
  53. aider/queries/tree-sitter-languages/python-tags.scm +10 -0
  54. aider/queries/tree-sitter-languages/ruby-tags.scm +5 -0
  55. aider/queries/tree-sitter-languages/rust-tags.scm +3 -0
  56. aider/queries/tree-sitter-languages/scala-tags.scm +2 -3
  57. aider/queries/tree-sitter-languages/typescript-tags.scm +3 -0
  58. aider/queries/tree-sitter-languages/zig-tags.scm +20 -3
  59. aider/repomap.py +71 -11
  60. aider/resources/model-metadata.json +27335 -635
  61. aider/resources/model-settings.yml +190 -0
  62. aider/scrape.py +2 -0
  63. aider/tools/__init__.py +2 -0
  64. aider/tools/command.py +84 -94
  65. aider/tools/command_interactive.py +95 -110
  66. aider/tools/delete_block.py +131 -159
  67. aider/tools/delete_line.py +97 -132
  68. aider/tools/delete_lines.py +120 -160
  69. aider/tools/extract_lines.py +288 -312
  70. aider/tools/finished.py +30 -43
  71. aider/tools/git_branch.py +107 -109
  72. aider/tools/git_diff.py +44 -56
  73. aider/tools/git_log.py +39 -53
  74. aider/tools/git_remote.py +37 -51
  75. aider/tools/git_show.py +33 -47
  76. aider/tools/git_status.py +30 -44
  77. aider/tools/grep.py +214 -242
  78. aider/tools/indent_lines.py +175 -201
  79. aider/tools/insert_block.py +220 -253
  80. aider/tools/list_changes.py +65 -80
  81. aider/tools/ls.py +64 -80
  82. aider/tools/make_editable.py +57 -73
  83. aider/tools/make_readonly.py +50 -66
  84. aider/tools/remove.py +64 -80
  85. aider/tools/replace_all.py +96 -109
  86. aider/tools/replace_line.py +118 -156
  87. aider/tools/replace_lines.py +160 -197
  88. aider/tools/replace_text.py +159 -160
  89. aider/tools/show_numbered_context.py +115 -141
  90. aider/tools/thinking.py +52 -0
  91. aider/tools/undo_change.py +78 -91
  92. aider/tools/update_todo_list.py +130 -138
  93. aider/tools/utils/base_tool.py +64 -0
  94. aider/tools/utils/output.py +118 -0
  95. aider/tools/view.py +38 -54
  96. aider/tools/view_files_matching.py +131 -134
  97. aider/tools/view_files_with_symbol.py +108 -120
  98. aider/urls.py +1 -1
  99. aider/versioncheck.py +4 -3
  100. aider/website/docs/config/adv-model-settings.md +237 -0
  101. aider/website/docs/config/agent-mode.md +36 -3
  102. aider/website/docs/config/model-aliases.md +2 -1
  103. aider/website/docs/faq.md +6 -11
  104. aider/website/docs/languages.md +2 -2
  105. aider/website/docs/more/infinite-output.md +27 -0
  106. {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/METADATA +112 -70
  107. {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/RECORD +112 -107
  108. aider_ce-0.88.38.dist-info/entry_points.txt +6 -0
  109. aider_ce-0.88.20.dist-info/entry_points.txt +0 -2
  110. /aider/tools/{tool_utils.py → utils/helpers.py} +0 -0
  111. {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/WHEEL +0 -0
  112. {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/licenses/LICENSE.txt +0 -0
  113. {aider_ce-0.88.20.dist-info → aider_ce-0.88.38.dist-info}/top_level.txt +0 -0
@@ -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}
@@ -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
- if not self.auto_accept_architect and not await self.io.confirm_ask("Edit the files?"):
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
- await editor_coder.run(with_message=content, preproc=False)
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.move_back_cur_messages("I made those changes to the files.")
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")