chatmcp-cli 0.1.0__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 (228) hide show
  1. aider/__init__.py +20 -0
  2. aider/__main__.py +4 -0
  3. aider/_version.py +21 -0
  4. aider/analytics.py +250 -0
  5. aider/args.py +926 -0
  6. aider/args_formatter.py +228 -0
  7. aider/coders/__init__.py +34 -0
  8. aider/coders/architect_coder.py +48 -0
  9. aider/coders/architect_prompts.py +40 -0
  10. aider/coders/ask_coder.py +9 -0
  11. aider/coders/ask_prompts.py +35 -0
  12. aider/coders/base_coder.py +2483 -0
  13. aider/coders/base_prompts.py +60 -0
  14. aider/coders/chat_chunks.py +64 -0
  15. aider/coders/context_coder.py +53 -0
  16. aider/coders/context_prompts.py +75 -0
  17. aider/coders/editblock_coder.py +657 -0
  18. aider/coders/editblock_fenced_coder.py +10 -0
  19. aider/coders/editblock_fenced_prompts.py +143 -0
  20. aider/coders/editblock_func_coder.py +141 -0
  21. aider/coders/editblock_func_prompts.py +27 -0
  22. aider/coders/editblock_prompts.py +174 -0
  23. aider/coders/editor_diff_fenced_coder.py +9 -0
  24. aider/coders/editor_diff_fenced_prompts.py +11 -0
  25. aider/coders/editor_editblock_coder.py +8 -0
  26. aider/coders/editor_editblock_prompts.py +18 -0
  27. aider/coders/editor_whole_coder.py +8 -0
  28. aider/coders/editor_whole_prompts.py +10 -0
  29. aider/coders/help_coder.py +16 -0
  30. aider/coders/help_prompts.py +46 -0
  31. aider/coders/patch_coder.py +706 -0
  32. aider/coders/patch_prompts.py +161 -0
  33. aider/coders/search_replace.py +757 -0
  34. aider/coders/shell.py +37 -0
  35. aider/coders/single_wholefile_func_coder.py +102 -0
  36. aider/coders/single_wholefile_func_prompts.py +27 -0
  37. aider/coders/udiff_coder.py +429 -0
  38. aider/coders/udiff_prompts.py +115 -0
  39. aider/coders/udiff_simple.py +14 -0
  40. aider/coders/udiff_simple_prompts.py +25 -0
  41. aider/coders/wholefile_coder.py +144 -0
  42. aider/coders/wholefile_func_coder.py +134 -0
  43. aider/coders/wholefile_func_prompts.py +27 -0
  44. aider/coders/wholefile_prompts.py +67 -0
  45. aider/commands.py +1665 -0
  46. aider/copypaste.py +72 -0
  47. aider/deprecated.py +126 -0
  48. aider/diffs.py +128 -0
  49. aider/dump.py +29 -0
  50. aider/editor.py +147 -0
  51. aider/exceptions.py +107 -0
  52. aider/format_settings.py +26 -0
  53. aider/gui.py +545 -0
  54. aider/help.py +163 -0
  55. aider/help_pats.py +19 -0
  56. aider/history.py +143 -0
  57. aider/io.py +1175 -0
  58. aider/linter.py +304 -0
  59. aider/llm.py +47 -0
  60. aider/main.py +1267 -0
  61. aider/mdstream.py +243 -0
  62. aider/models.py +1286 -0
  63. aider/onboarding.py +428 -0
  64. aider/openrouter.py +128 -0
  65. aider/prompts.py +64 -0
  66. aider/queries/tree-sitter-language-pack/README.md +7 -0
  67. aider/queries/tree-sitter-language-pack/arduino-tags.scm +5 -0
  68. aider/queries/tree-sitter-language-pack/c-tags.scm +9 -0
  69. aider/queries/tree-sitter-language-pack/chatito-tags.scm +16 -0
  70. aider/queries/tree-sitter-language-pack/commonlisp-tags.scm +122 -0
  71. aider/queries/tree-sitter-language-pack/cpp-tags.scm +15 -0
  72. aider/queries/tree-sitter-language-pack/csharp-tags.scm +26 -0
  73. aider/queries/tree-sitter-language-pack/d-tags.scm +26 -0
  74. aider/queries/tree-sitter-language-pack/dart-tags.scm +92 -0
  75. aider/queries/tree-sitter-language-pack/elisp-tags.scm +5 -0
  76. aider/queries/tree-sitter-language-pack/elixir-tags.scm +54 -0
  77. aider/queries/tree-sitter-language-pack/elm-tags.scm +19 -0
  78. aider/queries/tree-sitter-language-pack/gleam-tags.scm +41 -0
  79. aider/queries/tree-sitter-language-pack/go-tags.scm +42 -0
  80. aider/queries/tree-sitter-language-pack/java-tags.scm +20 -0
  81. aider/queries/tree-sitter-language-pack/javascript-tags.scm +88 -0
  82. aider/queries/tree-sitter-language-pack/lua-tags.scm +34 -0
  83. aider/queries/tree-sitter-language-pack/ocaml-tags.scm +115 -0
  84. aider/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +98 -0
  85. aider/queries/tree-sitter-language-pack/pony-tags.scm +39 -0
  86. aider/queries/tree-sitter-language-pack/properties-tags.scm +5 -0
  87. aider/queries/tree-sitter-language-pack/python-tags.scm +14 -0
  88. aider/queries/tree-sitter-language-pack/r-tags.scm +21 -0
  89. aider/queries/tree-sitter-language-pack/racket-tags.scm +12 -0
  90. aider/queries/tree-sitter-language-pack/ruby-tags.scm +64 -0
  91. aider/queries/tree-sitter-language-pack/rust-tags.scm +60 -0
  92. aider/queries/tree-sitter-language-pack/solidity-tags.scm +43 -0
  93. aider/queries/tree-sitter-language-pack/swift-tags.scm +51 -0
  94. aider/queries/tree-sitter-language-pack/udev-tags.scm +20 -0
  95. aider/queries/tree-sitter-languages/README.md +23 -0
  96. aider/queries/tree-sitter-languages/c-tags.scm +9 -0
  97. aider/queries/tree-sitter-languages/c_sharp-tags.scm +46 -0
  98. aider/queries/tree-sitter-languages/cpp-tags.scm +15 -0
  99. aider/queries/tree-sitter-languages/dart-tags.scm +91 -0
  100. aider/queries/tree-sitter-languages/elisp-tags.scm +8 -0
  101. aider/queries/tree-sitter-languages/elixir-tags.scm +54 -0
  102. aider/queries/tree-sitter-languages/elm-tags.scm +19 -0
  103. aider/queries/tree-sitter-languages/go-tags.scm +30 -0
  104. aider/queries/tree-sitter-languages/hcl-tags.scm +77 -0
  105. aider/queries/tree-sitter-languages/java-tags.scm +20 -0
  106. aider/queries/tree-sitter-languages/javascript-tags.scm +88 -0
  107. aider/queries/tree-sitter-languages/kotlin-tags.scm +27 -0
  108. aider/queries/tree-sitter-languages/ocaml-tags.scm +115 -0
  109. aider/queries/tree-sitter-languages/ocaml_interface-tags.scm +98 -0
  110. aider/queries/tree-sitter-languages/php-tags.scm +26 -0
  111. aider/queries/tree-sitter-languages/python-tags.scm +12 -0
  112. aider/queries/tree-sitter-languages/ql-tags.scm +26 -0
  113. aider/queries/tree-sitter-languages/ruby-tags.scm +64 -0
  114. aider/queries/tree-sitter-languages/rust-tags.scm +60 -0
  115. aider/queries/tree-sitter-languages/scala-tags.scm +65 -0
  116. aider/queries/tree-sitter-languages/typescript-tags.scm +41 -0
  117. aider/reasoning_tags.py +82 -0
  118. aider/repo.py +623 -0
  119. aider/repomap.py +847 -0
  120. aider/report.py +200 -0
  121. aider/resources/__init__.py +3 -0
  122. aider/resources/model-metadata.json +468 -0
  123. aider/resources/model-settings.yml +1767 -0
  124. aider/run_cmd.py +132 -0
  125. aider/scrape.py +284 -0
  126. aider/sendchat.py +61 -0
  127. aider/special.py +203 -0
  128. aider/urls.py +17 -0
  129. aider/utils.py +338 -0
  130. aider/versioncheck.py +113 -0
  131. aider/voice.py +187 -0
  132. aider/waiting.py +221 -0
  133. aider/watch.py +318 -0
  134. aider/watch_prompts.py +12 -0
  135. aider/website/Gemfile +8 -0
  136. aider/website/_includes/blame.md +162 -0
  137. aider/website/_includes/get-started.md +22 -0
  138. aider/website/_includes/help-tip.md +5 -0
  139. aider/website/_includes/help.md +24 -0
  140. aider/website/_includes/install.md +5 -0
  141. aider/website/_includes/keys.md +4 -0
  142. aider/website/_includes/model-warnings.md +67 -0
  143. aider/website/_includes/multi-line.md +22 -0
  144. aider/website/_includes/python-m-aider.md +5 -0
  145. aider/website/_includes/recording.css +228 -0
  146. aider/website/_includes/recording.md +34 -0
  147. aider/website/_includes/replit-pipx.md +9 -0
  148. aider/website/_includes/works-best.md +1 -0
  149. aider/website/_sass/custom/custom.scss +103 -0
  150. aider/website/docs/config/adv-model-settings.md +1881 -0
  151. aider/website/docs/config/aider_conf.md +527 -0
  152. aider/website/docs/config/api-keys.md +90 -0
  153. aider/website/docs/config/dotenv.md +478 -0
  154. aider/website/docs/config/editor.md +127 -0
  155. aider/website/docs/config/model-aliases.md +103 -0
  156. aider/website/docs/config/options.md +843 -0
  157. aider/website/docs/config/reasoning.md +209 -0
  158. aider/website/docs/config.md +44 -0
  159. aider/website/docs/faq.md +378 -0
  160. aider/website/docs/git.md +76 -0
  161. aider/website/docs/index.md +47 -0
  162. aider/website/docs/install/codespaces.md +39 -0
  163. aider/website/docs/install/docker.md +57 -0
  164. aider/website/docs/install/optional.md +100 -0
  165. aider/website/docs/install/replit.md +8 -0
  166. aider/website/docs/install.md +115 -0
  167. aider/website/docs/languages.md +264 -0
  168. aider/website/docs/legal/contributor-agreement.md +111 -0
  169. aider/website/docs/legal/privacy.md +104 -0
  170. aider/website/docs/llms/anthropic.md +77 -0
  171. aider/website/docs/llms/azure.md +48 -0
  172. aider/website/docs/llms/bedrock.md +132 -0
  173. aider/website/docs/llms/cohere.md +34 -0
  174. aider/website/docs/llms/deepseek.md +32 -0
  175. aider/website/docs/llms/gemini.md +49 -0
  176. aider/website/docs/llms/github.md +105 -0
  177. aider/website/docs/llms/groq.md +36 -0
  178. aider/website/docs/llms/lm-studio.md +39 -0
  179. aider/website/docs/llms/ollama.md +75 -0
  180. aider/website/docs/llms/openai-compat.md +39 -0
  181. aider/website/docs/llms/openai.md +58 -0
  182. aider/website/docs/llms/openrouter.md +78 -0
  183. aider/website/docs/llms/other.md +103 -0
  184. aider/website/docs/llms/vertex.md +50 -0
  185. aider/website/docs/llms/warnings.md +10 -0
  186. aider/website/docs/llms/xai.md +53 -0
  187. aider/website/docs/llms.md +54 -0
  188. aider/website/docs/more/analytics.md +122 -0
  189. aider/website/docs/more/edit-formats.md +116 -0
  190. aider/website/docs/more/infinite-output.md +137 -0
  191. aider/website/docs/more-info.md +8 -0
  192. aider/website/docs/recordings/auto-accept-architect.md +31 -0
  193. aider/website/docs/recordings/dont-drop-original-read-files.md +35 -0
  194. aider/website/docs/recordings/index.md +21 -0
  195. aider/website/docs/recordings/model-accepts-settings.md +69 -0
  196. aider/website/docs/recordings/tree-sitter-language-pack.md +80 -0
  197. aider/website/docs/repomap.md +112 -0
  198. aider/website/docs/scripting.md +100 -0
  199. aider/website/docs/troubleshooting/aider-not-found.md +24 -0
  200. aider/website/docs/troubleshooting/edit-errors.md +76 -0
  201. aider/website/docs/troubleshooting/imports.md +62 -0
  202. aider/website/docs/troubleshooting/models-and-keys.md +54 -0
  203. aider/website/docs/troubleshooting/support.md +79 -0
  204. aider/website/docs/troubleshooting/token-limits.md +96 -0
  205. aider/website/docs/troubleshooting/warnings.md +12 -0
  206. aider/website/docs/troubleshooting.md +11 -0
  207. aider/website/docs/usage/browser.md +57 -0
  208. aider/website/docs/usage/caching.md +49 -0
  209. aider/website/docs/usage/commands.md +132 -0
  210. aider/website/docs/usage/conventions.md +119 -0
  211. aider/website/docs/usage/copypaste.md +121 -0
  212. aider/website/docs/usage/images-urls.md +48 -0
  213. aider/website/docs/usage/lint-test.md +118 -0
  214. aider/website/docs/usage/modes.md +211 -0
  215. aider/website/docs/usage/not-code.md +179 -0
  216. aider/website/docs/usage/notifications.md +87 -0
  217. aider/website/docs/usage/tips.md +79 -0
  218. aider/website/docs/usage/tutorials.md +30 -0
  219. aider/website/docs/usage/voice.md +121 -0
  220. aider/website/docs/usage/watch.md +294 -0
  221. aider/website/docs/usage.md +92 -0
  222. aider/website/share/index.md +101 -0
  223. chatmcp_cli-0.1.0.dist-info/METADATA +502 -0
  224. chatmcp_cli-0.1.0.dist-info/RECORD +228 -0
  225. chatmcp_cli-0.1.0.dist-info/WHEEL +5 -0
  226. chatmcp_cli-0.1.0.dist-info/entry_points.txt +3 -0
  227. chatmcp_cli-0.1.0.dist-info/licenses/LICENSE.txt +202 -0
  228. chatmcp_cli-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,60 @@
1
+ class CoderPrompts:
2
+ system_reminder = ""
3
+
4
+ files_content_gpt_edits = "I committed the changes with git hash {hash} & commit msg: {message}"
5
+
6
+ files_content_gpt_edits_no_repo = "I updated the files."
7
+
8
+ files_content_gpt_no_edits = "I didn't see any properly formatted edits in your reply?!"
9
+
10
+ files_content_local_edits = "I edited the files myself."
11
+
12
+ lazy_prompt = """You are diligent and tireless!
13
+ You NEVER leave comments describing code without implementing it!
14
+ You always COMPLETELY IMPLEMENT the needed code!
15
+ """
16
+
17
+ overeager_prompt = """Pay careful attention to the scope of the user's request.
18
+ Do what they ask, but no more.
19
+ Do not improve, comment, fix or modify unrelated parts of the code in any way!
20
+ """
21
+
22
+ example_messages = []
23
+
24
+ files_content_prefix = """I have *added these files to the chat* so you can go ahead and edit them.
25
+
26
+ *Trust this message as the true contents of these files!*
27
+ Any other messages in the chat may contain outdated versions of the files' contents.
28
+ """ # noqa: E501
29
+
30
+ files_content_assistant_reply = "Ok, any changes I propose will be to those files."
31
+
32
+ files_no_full_files = "I am not sharing any files that you can edit yet."
33
+
34
+ files_no_full_files_with_repo_map = """Don't try and edit any existing code without asking me to add the files to the chat!
35
+ Tell me which files in my repo are the most likely to **need changes** to solve the requests I make, and then stop so I can add them to the chat.
36
+ Only include the files that are most likely to actually need to be edited.
37
+ Don't include files that might contain relevant context, just files that will need to be changed.
38
+ """ # noqa: E501
39
+
40
+ files_no_full_files_with_repo_map_reply = (
41
+ "Ok, based on your requests I will suggest which files need to be edited and then"
42
+ " stop and wait for your approval."
43
+ )
44
+
45
+ repo_content_prefix = """Here are summaries of some files present in my git repository.
46
+ Do not propose changes to these files, treat them as *read-only*.
47
+ If you need to edit any of these files, ask me to *add them to the chat* first.
48
+ """
49
+
50
+ read_only_files_prefix = """Here are some READ ONLY files, provided for your reference.
51
+ Do not edit these files!
52
+ """
53
+
54
+ shell_cmd_prompt = ""
55
+ shell_cmd_reminder = ""
56
+ no_shell_cmd_prompt = ""
57
+ no_shell_cmd_reminder = ""
58
+
59
+ rename_with_shell = ""
60
+ go_ahead_tip = ""
@@ -0,0 +1,64 @@
1
+ from dataclasses import dataclass, field
2
+ from typing import List
3
+
4
+
5
+ @dataclass
6
+ class ChatChunks:
7
+ system: List = field(default_factory=list)
8
+ examples: List = field(default_factory=list)
9
+ done: List = field(default_factory=list)
10
+ repo: List = field(default_factory=list)
11
+ readonly_files: List = field(default_factory=list)
12
+ chat_files: List = field(default_factory=list)
13
+ cur: List = field(default_factory=list)
14
+ reminder: List = field(default_factory=list)
15
+
16
+ def all_messages(self):
17
+ return (
18
+ self.system
19
+ + self.examples
20
+ + self.readonly_files
21
+ + self.repo
22
+ + self.done
23
+ + self.chat_files
24
+ + self.cur
25
+ + self.reminder
26
+ )
27
+
28
+ def add_cache_control_headers(self):
29
+ if self.examples:
30
+ self.add_cache_control(self.examples)
31
+ else:
32
+ self.add_cache_control(self.system)
33
+
34
+ if self.repo:
35
+ # this will mark both the readonly_files and repomap chunk as cacheable
36
+ self.add_cache_control(self.repo)
37
+ else:
38
+ # otherwise, just cache readonly_files if there are any
39
+ self.add_cache_control(self.readonly_files)
40
+
41
+ self.add_cache_control(self.chat_files)
42
+
43
+ def add_cache_control(self, messages):
44
+ if not messages:
45
+ return
46
+
47
+ content = messages[-1]["content"]
48
+ if type(content) is str:
49
+ content = dict(
50
+ type="text",
51
+ text=content,
52
+ )
53
+ content["cache_control"] = {"type": "ephemeral"}
54
+
55
+ messages[-1]["content"] = [content]
56
+
57
+ def cacheable_messages(self):
58
+ messages = self.all_messages()
59
+ for i, message in enumerate(reversed(messages)):
60
+ if isinstance(message.get("content"), list) and message["content"][0].get(
61
+ "cache_control"
62
+ ):
63
+ return messages[: len(messages) - i]
64
+ return messages
@@ -0,0 +1,53 @@
1
+ from .base_coder import Coder
2
+ from .context_prompts import ContextPrompts
3
+
4
+
5
+ class ContextCoder(Coder):
6
+ """Identify which files need to be edited for a given request."""
7
+
8
+ edit_format = "context"
9
+ gpt_prompts = ContextPrompts()
10
+
11
+ def __init__(self, *args, **kwargs):
12
+ super().__init__(*args, **kwargs)
13
+
14
+ if not self.repo_map:
15
+ return
16
+
17
+ self.repo_map.refresh = "always"
18
+ self.repo_map.max_map_tokens *= self.repo_map.map_mul_no_files
19
+ self.repo_map.map_mul_no_files = 1.0
20
+
21
+ def reply_completed(self):
22
+ content = self.partial_response_content
23
+ if not content or not content.strip():
24
+ return True
25
+
26
+ # dump(repr(content))
27
+ current_rel_fnames = set(self.get_inchat_relative_files())
28
+ mentioned_rel_fnames = set(self.get_file_mentions(content, ignore_current=True))
29
+
30
+ # dump(current_rel_fnames)
31
+ # dump(mentioned_rel_fnames)
32
+ # dump(current_rel_fnames == mentioned_rel_fnames)
33
+
34
+ if mentioned_rel_fnames == current_rel_fnames:
35
+ return True
36
+
37
+ if self.num_reflections >= self.max_reflections - 1:
38
+ return True
39
+
40
+ self.abs_fnames = set()
41
+ for fname in mentioned_rel_fnames:
42
+ self.add_rel_fname(fname)
43
+ # dump(self.get_inchat_relative_files())
44
+
45
+ self.reflected_message = self.gpt_prompts.try_again
46
+
47
+ # mentioned_idents = self.get_ident_mentions(cur_msg_text)
48
+ # if mentioned_idents:
49
+
50
+ return True
51
+
52
+ def check_for_file_mentions(self, content):
53
+ pass
@@ -0,0 +1,75 @@
1
+ # flake8: noqa: E501
2
+
3
+ from .base_prompts import CoderPrompts
4
+
5
+
6
+ class ContextPrompts(CoderPrompts):
7
+ main_system = """Act as an expert code analyst.
8
+ Understand the user's question or request, solely to determine ALL the existing sources files which will need to be modified.
9
+ Return the *complete* list of files which will need to be modified based on the user's request.
10
+ Explain why each file is needed, including names of key classes/functions/methods/variables.
11
+ Be sure to include or omit the names of files already added to the chat, based on whether they are actually needed or not.
12
+
13
+ The user will use every file you mention, regardless of your commentary.
14
+ So *ONLY* mention the names of relevant files.
15
+ If a file is not relevant DO NOT mention it.
16
+
17
+ Only return files that will need to be modified, not files that contain useful/relevant functions.
18
+
19
+ You are only to discuss EXISTING files and symbols.
20
+ Only return existing files, don't suggest the names of new files or functions that we will need to create.
21
+
22
+ Always reply to the user in {language}.
23
+
24
+ Be concise in your replies.
25
+ Return:
26
+ 1. A bulleted list of files the will need to be edited, and symbols that are highly relevant to the user's request.
27
+ 2. A list of classes/functions/methods/variables that are located OUTSIDE those files which will need to be understood. Just the symbols names, *NOT* file names.
28
+
29
+ # Your response *MUST* use this format:
30
+
31
+ ## ALL files we need to modify, with their relevant symbols:
32
+
33
+ - alarms/buzz.py
34
+ - `Buzzer` class which can make the needed sound
35
+ - `Buzzer.buzz_buzz()` method triggers the sound
36
+ - alarms/time.py
37
+ - `Time.set_alarm(hour, minute)` to set the alarm
38
+
39
+ ## Relevant symbols from OTHER files:
40
+
41
+ - AlarmManager class for setup/teardown of alarms
42
+ - SoundFactory will be used to create a Buzzer
43
+ """
44
+
45
+ example_messages = []
46
+
47
+ files_content_prefix = """These files have been *added these files to the chat* so we can see all of their contents.
48
+ *Trust this message as the true contents of the files!*
49
+ Other messages in the chat may contain outdated versions of the files' contents.
50
+ """ # noqa: E501
51
+
52
+ files_content_assistant_reply = (
53
+ "Ok, I will use that as the true, current contents of the files."
54
+ )
55
+
56
+ files_no_full_files = "I am not sharing the full contents of any files with you yet."
57
+
58
+ files_no_full_files_with_repo_map = ""
59
+ files_no_full_files_with_repo_map_reply = ""
60
+
61
+ repo_content_prefix = """I am working with you on code in a git repository.
62
+ Here are summaries of some files present in my git repo.
63
+ If you need to see the full contents of any files to answer my questions, ask me to *add them to the chat*.
64
+ """
65
+
66
+ system_reminder = """
67
+ NEVER RETURN CODE!
68
+ """
69
+
70
+ try_again = """I have updated the set of files added to the chat.
71
+ Review them to decide if this is the correct set of files or if we need to add more or remove files.
72
+
73
+ If this is the right set, just return the current list of files.
74
+ Or return a smaller or larger set of files which need to be edited, with symbols that are highly relevant to the user's request.
75
+ """