From 352917de7bbc719f8ba42d99876699a87a27b03e Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 25 Jun 2024 15:08:18 -0700 Subject: [PATCH 01/39] Implemented a help module to provide documentation-based answers to user questions about the Aider program. --- aider/help.py | 191 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100755 aider/help.py diff --git a/aider/help.py b/aider/help.py new file mode 100755 index 000000000..5f914b579 --- /dev/null +++ b/aider/help.py @@ -0,0 +1,191 @@ +#!/usr/bin/env python + +import json +import os +import sys +import time +from collections import defaultdict +from pathlib import Path + +import litellm + +litellm.suppress_debug_info = True + +import faiss +from dump import dump +from llama_index.core import ( + Document, + SimpleDirectoryReader, + StorageContext, + VectorStoreIndex, + load_index_from_storage, +) +from llama_index.core.ingestion import IngestionPipeline +from llama_index.core.node_parser import MarkdownNodeParser +from llama_index.core.storage.docstore import SimpleDocumentStore +from llama_index.core.storage.index_store import SimpleIndexStore +from llama_index.readers.file import FlatReader + + +def should_skip_dir(dirname): + if dirname.startswith("OLD"): + return True + if dirname.startswith("tmp"): + return True + if dirname == "examples": + return True + if dirname == "_posts": + return True + + +def walk_subdirs_for_files(root_dir): + root_path = Path(root_dir) + for path in root_path.rglob("*.md"): + if any(should_skip_dir(part) for part in path.parts): + continue + yield str(path) + + +def execute(question, text): + sys_content = """Answer questions about how to use the Aider program. +Give answers about how to use aider to accomplish the user's questions, +not general advice on how to use other tools or approaches. + +Use the provided aider documentation *if it is relevant to the user's questions*. + +Include a urls to the aider docs that might be relevant for the user to read +. + +If you don't know the answer, say so and suggest some relevant aider doc urls. +If the user asks how to do something that aider doesn't support, tell them that. + +Be helpful but concise. + +Unless the question indicates otherwise, assume the user wants to use +aider as a CLI tool. +""" + + usage = Path("website/docs/usage.md").read_text() + + content = f"""# Question: + +{question} + + +# Relevant documentation: + +{text} + +##### + +{usage} +""" + + messages = [ + dict( + role="system", + content=sys_content, + ), + dict( + role="user", + content=content, + ), + ] + + res = litellm.completion( + messages=messages, + # model="gpt-3.5-turbo", + model="gpt-4o", + ) + + return res + + +def fname_to_url(filepath): + if filepath.startswith("website/_includes/"): + docid = "" + else: + website = "website/" + assert filepath.startswith(website), filepath + docid = filepath[len(website) :] + docid = "https://aider.chat/" + filepath + + return docid + + +def get_index(): + dname = Path("storage") + if dname.exists(): + storage_context = StorageContext.from_defaults( + persist_dir=dname, + ) + index = load_index_from_storage(storage_context) + else: + parser = MarkdownNodeParser() + + nodes = [] + for fname in walk_subdirs_for_files("website"): + dump(fname) + # doc = FlatReader().load_data(Path(fname)) + fname = Path(fname) + doc = Document( + text=fname.read_text(), + metadata=dict( + filename=fname.name, + extension=fname.suffix, + url=fname_to_url(str(fname)), + ), + ) + nodes += parser.get_nodes_from_documents([doc]) + + index = VectorStoreIndex(nodes) + index.storage_context.persist(dname) + + return index + + +when = time.time() + +index = get_index() + +print("get_index", time.time() - when) +when = time.time() + +retriever = index.as_retriever(similarity_top_k=20) + +# question = "how can i convert a python script to js" +# question = "i am getting an error message about unknown context window" +# question = "i am getting an error message about exhausted context window" +# question = "The chat session is larger than the context window!" +# question = "how do i add deepseek api key to yaml" +question = ( + "It would be great if I could give aider an example github PR and instruct it to do the same" + " exact thing for another integration." +) + +nodes = retriever.retrieve(question) + +print("retrieve", time.time() - when) +when = time.time() + +dump(len(nodes)) + +context = "" +for node in nodes: + fname = node.metadata["filename"] + url = node.metadata.get("url", "") + if url: + url = f' from_url="{url}"' + + context += f"\n" + context += node.text + context += "\n\n\n" + +# dump(context) + +res = execute(question, context) +content = res.choices[0].message.content +dump(content) + +print("llm", time.time() - when) +when = time.time() From d3e0091346cb7fc80ce1b0795fc7d1aa509eb1d0 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 25 Jun 2024 15:08:20 -0700 Subject: [PATCH 02/39] Removed unused imports and simplified the help.py file. --- aider/help.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/aider/help.py b/aider/help.py index 5f914b579..6b73597c8 100755 --- a/aider/help.py +++ b/aider/help.py @@ -1,30 +1,19 @@ #!/usr/bin/env python -import json -import os -import sys import time -from collections import defaultdict from pathlib import Path import litellm - -litellm.suppress_debug_info = True - -import faiss from dump import dump from llama_index.core import ( Document, - SimpleDirectoryReader, StorageContext, VectorStoreIndex, load_index_from_storage, ) -from llama_index.core.ingestion import IngestionPipeline from llama_index.core.node_parser import MarkdownNodeParser -from llama_index.core.storage.docstore import SimpleDocumentStore -from llama_index.core.storage.index_store import SimpleIndexStore -from llama_index.readers.file import FlatReader + +litellm.suppress_debug_info = True def should_skip_dir(dirname): From eab1b0ee4bf153201d76c1ebb3e3da488f7507d6 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 25 Jun 2024 15:08:53 -0700 Subject: [PATCH 03/39] noop --- aider/help.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/help.py b/aider/help.py index 6b73597c8..07625ac71 100755 --- a/aider/help.py +++ b/aider/help.py @@ -142,6 +142,7 @@ when = time.time() retriever = index.as_retriever(similarity_top_k=20) +# # question = "how can i convert a python script to js" # question = "i am getting an error message about unknown context window" # question = "i am getting an error message about exhausted context window" From 9f39c8db44486531a438ae436eb30bc68918a460 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 4 Jul 2024 14:29:19 -0300 Subject: [PATCH 04/39] added HelpCoder --- aider/coders/__init__.py | 2 + aider/coders/base_coder.py | 3 + aider/coders/help_coder.py | 17 ++++ aider/coders/help_prompts.py | 31 +++++++ aider/commands.py | 37 ++++++-- aider/help.py | 175 +++++++++++++---------------------- requirements.in | 4 +- 7 files changed, 150 insertions(+), 119 deletions(-) create mode 100644 aider/coders/help_coder.py create mode 100644 aider/coders/help_prompts.py diff --git a/aider/coders/__init__.py b/aider/coders/__init__.py index 19d12b0d7..08126bae5 100644 --- a/aider/coders/__init__.py +++ b/aider/coders/__init__.py @@ -2,6 +2,7 @@ from .base_coder import Coder from .editblock_coder import EditBlockCoder from .editblock_fenced_coder import EditBlockFencedCoder from .editblock_func_coder import EditBlockFunctionCoder +from .help_coder import HelpCoder from .single_wholefile_func_coder import SingleWholeFileFunctionCoder from .udiff_coder import UnifiedDiffCoder from .wholefile_coder import WholeFileCoder @@ -16,4 +17,5 @@ __all__ = [ EditBlockFunctionCoder, SingleWholeFileFunctionCoder, UnifiedDiffCoder, + HelpCoder, ] diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 662bd7912..a25bdab0f 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -80,6 +80,7 @@ class Coder: from . import ( EditBlockCoder, EditBlockFencedCoder, + HelpCoder, UnifiedDiffCoder, WholeFileCoder, ) @@ -130,6 +131,8 @@ class Coder: res = WholeFileCoder(main_model, io, **kwargs) elif edit_format == "udiff": res = UnifiedDiffCoder(main_model, io, **kwargs) + elif edit_format == "help": + res = HelpCoder(main_model, io, **kwargs) else: raise ValueError(f"Unknown edit format {edit_format}") diff --git a/aider/coders/help_coder.py b/aider/coders/help_coder.py new file mode 100644 index 000000000..1225b7b97 --- /dev/null +++ b/aider/coders/help_coder.py @@ -0,0 +1,17 @@ +from ..dump import dump # noqa: F401 +from .base_coder import Coder +from .help_prompts import HelpPrompts + + +class HelpCoder(Coder): + edit_format = "help" + + def __init__(self, *args, **kwargs): + self.gpt_prompts = HelpPrompts() + super().__init__(*args, **kwargs) + + def get_edits(self, mode="update"): + return [] + + def apply_edits(self, edits): + pass diff --git a/aider/coders/help_prompts.py b/aider/coders/help_prompts.py new file mode 100644 index 000000000..205b1ccd9 --- /dev/null +++ b/aider/coders/help_prompts.py @@ -0,0 +1,31 @@ +# flake8: noqa: E501 + +from .base_prompts import CoderPrompts + + +class HelpPrompts(CoderPrompts): + main_system = """You are an expert on the AI coding tool called Aider. +Answer the user's questions about how to use aider. + +The user is currently chatting with you using aider, to write and edit code. + +Use the provided aider documentation *if it is relevant to the user's question*. + +Include a bulleted list of urls to the aider docs that might be relevant for the user to read. +Include *bare* urls. *Do not* make [markdown links](http://...). +For example: +- https://aider.chat/docs/usage.html +- https://aider.chat/docs/faq.html + +If you don't know the answer, say so and suggest some relevant aider doc urls. + +If asks for something that isn't possible with aider, be clear about that. +Don't suggest a solution that isn't supported. + +Be helpful but concise. + +Unless the question indicates otherwise, assume the user wants to use aider as a CLI tool. +""" + + example_messages = [] + system_reminder = "" diff --git a/aider/commands.py b/aider/commands.py index fd129dc3c..440c0a179 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -7,6 +7,7 @@ from pathlib import Path import git from aider import models, prompts, voice +from aider.help import Help from aider.llm import litellm from aider.scrape import Scraper from aider.utils import is_image_file @@ -32,6 +33,8 @@ class Commands: self.voice_language = voice_language + self.help = None + def cmd_model(self, args): "Switch to a new LLM" @@ -622,15 +625,31 @@ class Commands: def cmd_help(self, args): "Show help about all commands" - commands = sorted(self.get_commands()) - for cmd in commands: - cmd_method_name = f"cmd_{cmd[1:]}" - cmd_method = getattr(self, cmd_method_name, None) - if cmd_method: - description = cmd_method.__doc__ - self.io.tool_output(f"{cmd} {description}") - else: - self.io.tool_output(f"{cmd} No description available.") + + from aider.coders import Coder + + if not self.help: + self.help = Help() + + coder = Coder.create( + main_model=self.coder.main_model, + io=self.io, + from_coder=self.coder, + edit_format="help", + ) + user_msg = self.help.ask(args) + user_msg += """ +# Announcement lines from when this session of aider was launched: + +""" + user_msg += "\n".join(self.coder.get_announcements()) + "\n" + + assistant_msg = coder.run(user_msg) + + self.coder.cur_messages += [ + dict(role="user", content=user_msg), + dict(role="assistant", content=assistant_msg), + ] def get_help_md(self): "Show help about all commands in markdown" diff --git a/aider/help.py b/aider/help.py index 07625ac71..566ce85da 100755 --- a/aider/help.py +++ b/aider/help.py @@ -1,19 +1,15 @@ #!/usr/bin/env python -import time +import os +import sys +import warnings from pathlib import Path -import litellm -from dump import dump -from llama_index.core import ( - Document, - StorageContext, - VectorStoreIndex, - load_index_from_storage, -) -from llama_index.core.node_parser import MarkdownNodeParser +from tqdm import tqdm -litellm.suppress_debug_info = True +from aider.dump import dump # noqa: F401 + +warnings.simplefilter("ignore", category=FutureWarning) def should_skip_dir(dirname): @@ -35,75 +31,38 @@ def walk_subdirs_for_files(root_dir): yield str(path) -def execute(question, text): - sys_content = """Answer questions about how to use the Aider program. -Give answers about how to use aider to accomplish the user's questions, -not general advice on how to use other tools or approaches. - -Use the provided aider documentation *if it is relevant to the user's questions*. - -Include a urls to the aider docs that might be relevant for the user to read -. - -If you don't know the answer, say so and suggest some relevant aider doc urls. -If the user asks how to do something that aider doesn't support, tell them that. - -Be helpful but concise. - -Unless the question indicates otherwise, assume the user wants to use -aider as a CLI tool. -""" - - usage = Path("website/docs/usage.md").read_text() - - content = f"""# Question: - -{question} - - -# Relevant documentation: - -{text} - -##### - -{usage} -""" - - messages = [ - dict( - role="system", - content=sys_content, - ), - dict( - role="user", - content=content, - ), - ] - - res = litellm.completion( - messages=messages, - # model="gpt-3.5-turbo", - model="gpt-4o", - ) - - return res - - def fname_to_url(filepath): + website = "website/" + index = "/index.md" + md = ".md" + + docid = "" if filepath.startswith("website/_includes/"): - docid = "" - else: - website = "website/" - assert filepath.startswith(website), filepath + pass + elif filepath.startswith(website): docid = filepath[len(website) :] + + if filepath.endswith(index): + filepath = filepath[: -len(index)] + "/" + elif filepath.endswith(md): + filepath = filepath[: -len(md)] + ".html" + docid = "https://aider.chat/" + filepath return docid def get_index(): - dname = Path("storage") + from llama_index.core import ( + Document, + StorageContext, + VectorStoreIndex, + load_index_from_storage, + ) + from llama_index.core.node_parser import MarkdownNodeParser + + dname = Path.home() / ".aider" / "help" + if dname.exists(): storage_context = StorageContext.from_defaults( persist_dir=dname, @@ -113,9 +72,7 @@ def get_index(): parser = MarkdownNodeParser() nodes = [] - for fname in walk_subdirs_for_files("website"): - dump(fname) - # doc = FlatReader().load_data(Path(fname)) + for fname in tqdm(list(walk_subdirs_for_files("website"))): fname = Path(fname) doc = Document( text=fname.read_text(), @@ -128,19 +85,44 @@ def get_index(): nodes += parser.get_nodes_from_documents([doc]) index = VectorStoreIndex(nodes) + dname.parent.mkdir(exist_ok=True) index.storage_context.persist(dname) return index -when = time.time() +class Help: + def __init__(self): + from llama_index.core import Settings + from llama_index.embeddings.huggingface import HuggingFaceEmbedding -index = get_index() + os.environ["TOKENIZERS_PARALLELISM"] = "true" + Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5") -print("get_index", time.time() - when) -when = time.time() + index = get_index() + + self.retriever = index.as_retriever(similarity_top_k=20) + + def ask(self, question): + nodes = self.retriever.retrieve(question) + + context = f"""# Question: {question} + +# Relevant docs: + +""" + + for node in nodes: + url = node.metadata.get("url", "") + if url: + url = f' from_url="{url}"' + + context += f"\n" + context += node.text + context += "\n\n\n" + + return context -retriever = index.as_retriever(similarity_top_k=20) # # question = "how can i convert a python script to js" @@ -148,34 +130,9 @@ retriever = index.as_retriever(similarity_top_k=20) # question = "i am getting an error message about exhausted context window" # question = "The chat session is larger than the context window!" # question = "how do i add deepseek api key to yaml" -question = ( - "It would be great if I could give aider an example github PR and instruct it to do the same" - " exact thing for another integration." -) +# question = ( +# "It would be great if I could give aider an example github PR and instruct it to do the same" +# " exact thing for another integration." +# ) -nodes = retriever.retrieve(question) - -print("retrieve", time.time() - when) -when = time.time() - -dump(len(nodes)) - -context = "" -for node in nodes: - fname = node.metadata["filename"] - url = node.metadata.get("url", "") - if url: - url = f' from_url="{url}"' - - context += f"\n" - context += node.text - context += "\n\n\n" - -# dump(context) - -res = execute(question, context) -content = res.choices[0].message.content -dump(content) - -print("llm", time.time() - when) -when = time.time() +question = " ".join(sys.argv[1:]) diff --git a/requirements.in b/requirements.in index 72b929e84..411d46e8b 100644 --- a/requirements.in +++ b/requirements.in @@ -27,6 +27,8 @@ google-generativeai streamlit watchdog flake8 +llama-index-core +llama-index-embeddings-huggingface # v3.3 no longer works on python 3.9 networkx<3.3 @@ -40,4 +42,4 @@ scipy<1.14 # GitHub Release action failing on "KeyError: 'home-page'" # https://github.com/pypa/twine/blob/6fbf880ee60915cf1666348c4bdd78a10415f2ac/twine/__init__.py#L40 # Uses importlib-metadata -importlib-metadata<8.0.0 \ No newline at end of file +importlib-metadata<8.0.0 From ca6fcc42c80784b57a49d94b77919bf1c91aed63 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 4 Jul 2024 14:47:49 -0300 Subject: [PATCH 05/39] restored basic help --- aider/commands.py | 22 +++++++++++++++++++++- aider/help.py | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index 440c0a179..949d7c599 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -623,8 +623,28 @@ class Commands: for file in chat_files: self.io.tool_output(f" {file}") + def basic_help(self): + commands = sorted(self.get_commands()) + pad = max(len(cmd) for cmd in commands) + pad = "{cmd:" + str(pad) + "}" + for cmd in commands: + cmd_method_name = f"cmd_{cmd[1:]}" + cmd_method = getattr(self, cmd_method_name, None) + cmd = pad.format(cmd=cmd) + if cmd_method: + description = cmd_method.__doc__ + self.io.tool_output(f"{cmd} {description}") + else: + self.io.tool_output(f"{cmd} No description available.") + self.io.tool_output() + self.io.tool_output("Use `/help ` to ask questions about how to use aider.") + def cmd_help(self, args): - "Show help about all commands" + "Ask questions about aider" + + if not args.strip(): + self.basic_help() + return from aider.coders import Coder diff --git a/aider/help.py b/aider/help.py index 566ce85da..b668a0319 100755 --- a/aider/help.py +++ b/aider/help.py @@ -39,6 +39,9 @@ def fname_to_url(filepath): docid = "" if filepath.startswith("website/_includes/"): pass + elif "HISTORY.html" in filepath: + # too much stale info + pass elif filepath.startswith(website): docid = filepath[len(website) :] From 6db8501891ed34d600d2e079b6e159da10a45eea Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 4 Jul 2024 15:01:17 -0300 Subject: [PATCH 06/39] Added the website directory and all MD files in its subdirectories to the package data and packages in the setup.py file. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d31d87a77..b343d6021 100644 --- a/setup.py +++ b/setup.py @@ -15,10 +15,11 @@ with open("README.md", "r", encoding="utf-8") as f: setup( name="aider-chat", version=__version__, - packages=find_packages(), + packages=find_packages() + ['website'], include_package_data=True, package_data={ "aider": ["queries/*"], + "": ["website/**/*.md"], }, install_requires=requirements, python_requires=">=3.9,<3.13", From 98c0621e4414dbbf6baa8d403cbd0b3efc807291 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 4 Jul 2024 15:05:07 -0300 Subject: [PATCH 07/39] Used the website files that are part of the package per setup.py instead of walking the real website directory. --- aider/help.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/aider/help.py b/aider/help.py index b668a0319..c87d7694a 100755 --- a/aider/help.py +++ b/aider/help.py @@ -6,29 +6,18 @@ import warnings from pathlib import Path from tqdm import tqdm +import importlib_resources from aider.dump import dump # noqa: F401 warnings.simplefilter("ignore", category=FutureWarning) -def should_skip_dir(dirname): - if dirname.startswith("OLD"): - return True - if dirname.startswith("tmp"): - return True - if dirname == "examples": - return True - if dirname == "_posts": - return True - - -def walk_subdirs_for_files(root_dir): - root_path = Path(root_dir) - for path in root_path.rglob("*.md"): - if any(should_skip_dir(part) for part in path.parts): - continue - yield str(path) +def get_package_files(): + website_files = importlib_resources.files('website') + for path in website_files.rglob('*.md'): + if not any(part.startswith(('OLD', 'tmp')) or part in ('examples', '_posts') for part in path.parts): + yield str(path) def fname_to_url(filepath): @@ -75,10 +64,10 @@ def get_index(): parser = MarkdownNodeParser() nodes = [] - for fname in tqdm(list(walk_subdirs_for_files("website"))): + for fname in tqdm(list(get_package_files())): fname = Path(fname) doc = Document( - text=fname.read_text(), + text=importlib_resources.files('website').joinpath(fname).read_text(), metadata=dict( filename=fname.name, extension=fname.suffix, From 4ad6eef1a3254705253aaa81a45fb7a4d00a1c06 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 4 Jul 2024 15:07:48 -0300 Subject: [PATCH 08/39] Added a call to the `dump()` function in the `get_package_files()` function. --- aider/help.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/help.py b/aider/help.py index c87d7694a..7f1a7a1e3 100755 --- a/aider/help.py +++ b/aider/help.py @@ -17,6 +17,7 @@ def get_package_files(): website_files = importlib_resources.files('website') for path in website_files.rglob('*.md'): if not any(part.startswith(('OLD', 'tmp')) or part in ('examples', '_posts') for part in path.parts): + dump(path) yield str(path) From 4030fdb5746d6e7ce8c99dd7b6d46667fedf7049 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 4 Jul 2024 15:07:49 -0300 Subject: [PATCH 09/39] Improved the `get_package_files()` function to handle the `MultiplexedPath` object and avoid the `AttributeError`. --- aider/help.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/aider/help.py b/aider/help.py index 7f1a7a1e3..c2b3ab6fd 100755 --- a/aider/help.py +++ b/aider/help.py @@ -15,10 +15,16 @@ warnings.simplefilter("ignore", category=FutureWarning) def get_package_files(): website_files = importlib_resources.files('website') - for path in website_files.rglob('*.md'): - if not any(part.startswith(('OLD', 'tmp')) or part in ('examples', '_posts') for part in path.parts): - dump(path) - yield str(path) + for path in importlib_resources.files('website').iterdir(): + if path.is_file() and path.name.endswith('.md'): + if not any(part.startswith(('OLD', 'tmp')) or part in ('examples', '_posts') for part in path.parts): + dump(path) + yield str(path) + elif path.is_dir(): + for subpath in path.rglob('*.md'): + if not any(part.startswith(('OLD', 'tmp')) or part in ('examples', '_posts') for part in subpath.parts): + dump(subpath) + yield str(subpath) def fname_to_url(filepath): From fceaa0504c18b52836b7a59de179ce3773ea7870 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 4 Jul 2024 15:23:05 -0300 Subject: [PATCH 10/39] Added files and directories to the package_data, excluding the website/_posts subdirectory. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b343d6021..ff6fe433f 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( include_package_data=True, package_data={ "aider": ["queries/*"], - "": ["website/**/*.md"], + "": ["website/**/*", "!website/_posts/**/*"], }, install_requires=requirements, python_requires=">=3.9,<3.13", From af48cc3e4cef22cb993fb68cae12da615f46ea5c Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 4 Jul 2024 16:06:12 -0300 Subject: [PATCH 11/39] wip --- aider/coders/base_coder.py | 20 ++--- aider/coders/base_prompts.py | 5 ++ aider/coders/help_prompts.py | 12 +++ aider/commands.py | 1 + aider/help.py | 28 +++--- requirements.in | 1 + requirements.txt | 160 +++++++++++++++++++++++++++++------ 7 files changed, 180 insertions(+), 47 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index a25bdab0f..7def7b52d 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -75,6 +75,7 @@ class Coder: edit_format=None, io=None, from_coder=None, + summarize_from_coder=True, **kwargs, ): from . import ( @@ -108,7 +109,7 @@ class Coder: # confused the new LLM. It may try and imitate it, disobeying # the system prompt. done_messages = from_coder.done_messages - if edit_format != from_coder.edit_format and done_messages: + if edit_format != from_coder.edit_format and done_messages and summarize_from_coder: done_messages = from_coder.summarizer.summarize_all(done_messages) # Bring along context from the old Coder @@ -550,18 +551,16 @@ class Coder: files_reply = "Ok, any changes I propose will be to those files." elif repo_content: files_content = self.gpt_prompts.files_no_full_files_with_repo_map - files_reply = ( - "Ok, based on your requests I will suggest which files need to be edited and then" - " stop and wait for your approval." - ) + files_reply = self.gpt_prompts.files_no_full_files_with_repo_map_reply else: files_content = self.gpt_prompts.files_no_full_files files_reply = "Ok." - files_messages += [ - dict(role="user", content=files_content), - dict(role="assistant", content=files_reply), - ] + if files_content: + files_messages += [ + dict(role="user", content=files_content), + dict(role="assistant", content=files_reply), + ] images_message = self.get_images_message() if images_message is not None: @@ -734,7 +733,8 @@ class Coder: example_messages = [] if self.main_model.examples_as_sys_msg: - main_sys += "\n# Example conversations:\n\n" + if self.gpt_prompts.example_messages: + main_sys += "\n# Example conversations:\n\n" for msg in self.gpt_prompts.example_messages: role = msg["role"] content = self.fmt_system_prompt(msg["content"]) diff --git a/aider/coders/base_prompts.py b/aider/coders/base_prompts.py index 79ca13c20..c6c5f2d43 100644 --- a/aider/coders/base_prompts.py +++ b/aider/coders/base_prompts.py @@ -28,6 +28,11 @@ Only include the files that are most likely to actually need to be edited. Don't include files that might contain relevant context, just files that will need to be changed. """ # noqa: E501 + files_no_full_files_with_repo_map_reply = ( + "Ok, based on your requests I will suggest which files need to be edited and then" + " stop and wait for your approval." + ) + repo_content_prefix = """Here are summaries of some files present in my git repository. Do not propose changes to these files, treat them as *read-only*. If you need to edit any of these files, ask me to *add them to the chat* first. diff --git a/aider/coders/help_prompts.py b/aider/coders/help_prompts.py index 205b1ccd9..f85f41f50 100644 --- a/aider/coders/help_prompts.py +++ b/aider/coders/help_prompts.py @@ -29,3 +29,15 @@ Unless the question indicates otherwise, assume the user wants to use aider as a example_messages = [] system_reminder = "" + + files_content_prefix = """These are some files we have been discussing that we may want to edit after you answer my questions: +""" + + files_no_full_files = "I am not sharing any files with you." + + files_no_full_files_with_repo_map = "" + files_no_full_files_with_repo_map_reply = "" + + repo_content_prefix = """Here are summaries of some files present in my git repository. +We may look at these in more detail after you answer my questions. +""" diff --git a/aider/commands.py b/aider/commands.py index 949d7c599..b42894e27 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -656,6 +656,7 @@ class Commands: io=self.io, from_coder=self.coder, edit_format="help", + summarize_from_coder=False, ) user_msg = self.help.ask(args) user_msg += """ diff --git a/aider/help.py b/aider/help.py index c2b3ab6fd..e07ead148 100755 --- a/aider/help.py +++ b/aider/help.py @@ -5,8 +5,8 @@ import sys import warnings from pathlib import Path -from tqdm import tqdm import importlib_resources +from tqdm import tqdm from aider.dump import dump # noqa: F401 @@ -14,16 +14,20 @@ warnings.simplefilter("ignore", category=FutureWarning) def get_package_files(): - website_files = importlib_resources.files('website') - for path in importlib_resources.files('website').iterdir(): - if path.is_file() and path.name.endswith('.md'): - if not any(part.startswith(('OLD', 'tmp')) or part in ('examples', '_posts') for part in path.parts): - dump(path) + for path in importlib_resources.files("website").iterdir(): + dump(path) + if path.is_file() and path.name.endswith(".md"): + if not any( + part.startswith(("OLD", "tmp")) or part in ("examples", "_posts") + for part in path.parts + ): yield str(path) elif path.is_dir(): - for subpath in path.rglob('*.md'): - if not any(part.startswith(('OLD', 'tmp')) or part in ('examples', '_posts') for part in subpath.parts): - dump(subpath) + for subpath in path.rglob("*.md"): + if not any( + part.startswith(("OLD", "tmp")) or part in ("examples", "_posts") + for part in subpath.parts + ): yield str(subpath) @@ -35,9 +39,6 @@ def fname_to_url(filepath): docid = "" if filepath.startswith("website/_includes/"): pass - elif "HISTORY.html" in filepath: - # too much stale info - pass elif filepath.startswith(website): docid = filepath[len(website) :] @@ -73,8 +74,9 @@ def get_index(): nodes = [] for fname in tqdm(list(get_package_files())): fname = Path(fname) + dump(fname) doc = Document( - text=importlib_resources.files('website').joinpath(fname).read_text(), + text=importlib_resources.files("website").joinpath(fname).read_text(), metadata=dict( filename=fname.name, extension=fname.suffix, diff --git a/requirements.in b/requirements.in index 411d46e8b..92912c60d 100644 --- a/requirements.in +++ b/requirements.in @@ -29,6 +29,7 @@ watchdog flake8 llama-index-core llama-index-embeddings-huggingface +importlib_resources # v3.3 no longer works on python 3.9 networkx<3.3 diff --git a/requirements.txt b/requirements.txt index 321dd1ae0..edc5c5e73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,10 @@ # pip-compile requirements.in # aiohttp==3.9.5 - # via litellm + # via + # huggingface-hub + # litellm + # llama-index-core aiosignal==1.3.1 # via aiohttp altair==5.3.0 @@ -31,7 +34,7 @@ cachetools==5.3.3 # via # google-auth # streamlit -certifi==2024.6.2 +certifi==2024.7.4 # via # httpcore # httpx @@ -45,17 +48,27 @@ charset-normalizer==3.3.2 click==8.1.7 # via # litellm + # nltk # streamlit configargparse==1.7 # via -r requirements.in +dataclasses-json==0.6.7 + # via llama-index-core +deprecated==1.2.14 + # via llama-index-core diff-match-patch==20230430 # via -r requirements.in +dirtyjson==1.0.8 + # via llama-index-core diskcache==5.6.3 # via -r requirements.in distro==1.9.0 # via openai filelock==3.15.4 - # via huggingface-hub + # via + # huggingface-hub + # torch + # transformers flake8==7.1.0 # via -r requirements.in frozenlist==1.4.1 @@ -63,7 +76,10 @@ frozenlist==1.4.1 # aiohttp # aiosignal fsspec==2024.6.1 - # via huggingface-hub + # via + # huggingface-hub + # llama-index-core + # torch gitdb==4.0.11 # via gitpython gitpython==3.1.43 @@ -77,9 +93,9 @@ google-api-core[grpc]==2.19.1 # google-ai-generativelanguage # google-api-python-client # google-generativeai -google-api-python-client==2.135.0 +google-api-python-client==2.136.0 # via google-generativeai -google-auth==2.30.0 +google-auth==2.31.0 # via # google-ai-generativelanguage # google-api-core @@ -95,7 +111,9 @@ googleapis-common-protos==1.63.2 # google-api-core # grpcio-status greenlet==3.0.3 - # via playwright + # via + # playwright + # sqlalchemy grep-ast==0.3.2 # via -r requirements.in grpcio==1.64.1 @@ -113,17 +131,22 @@ httplib2==0.22.0 # google-api-python-client # google-auth-httplib2 httpx==0.27.0 - # via openai -huggingface-hub==0.23.4 - # via tokenizers + # via + # llama-cloud + # llama-index-core + # openai +huggingface-hub[inference]==0.23.4 + # via + # llama-index-embeddings-huggingface + # sentence-transformers + # tokenizers + # transformers idna==3.7 # via # anyio # httpx # requests # yarl -ijson==3.3.0 - # via litellm importlib-metadata==7.2.1 # via # -r requirements.in @@ -133,60 +156,99 @@ jinja2==3.1.4 # altair # litellm # pydeck + # torch +joblib==1.4.2 + # via + # nltk + # scikit-learn jsonschema==4.22.0 # via # -r requirements.in # altair + # litellm jsonschema-specifications==2023.12.1 # via jsonschema -litellm==1.41.0 +litellm==1.41.6 + # via -r requirements.in +llama-cloud==0.0.6 + # via llama-index-core +llama-index-core==0.10.52.post2 + # via + # -r requirements.in + # llama-index-embeddings-huggingface +llama-index-embeddings-huggingface==0.2.2 # via -r requirements.in markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 # via jinja2 +marshmallow==3.21.3 + # via dataclasses-json mccabe==0.7.0 # via flake8 mdurl==0.1.2 # via markdown-it-py +minijinja==2.0.1 + # via huggingface-hub +mpmath==1.3.0 + # via sympy multidict==6.0.5 # via # aiohttp # yarl +mypy-extensions==1.0.0 + # via typing-inspect +nest-asyncio==1.6.0 + # via llama-index-core networkx==3.2.1 - # via -r requirements.in -numpy==2.0.0 + # via + # -r requirements.in + # llama-index-core + # torch +nltk==3.8.1 + # via llama-index-core +numpy==1.26.4 # via # -r requirements.in # altair + # llama-index-core # pandas # pyarrow # pydeck + # scikit-learn # scipy + # sentence-transformers # streamlit -openai==1.35.7 + # transformers +openai==1.35.10 # via # -r requirements.in # litellm + # llama-index-core packaging==24.1 # via # -r requirements.in # altair # huggingface-hub + # marshmallow # streamlit + # transformers pandas==2.2.2 # via # altair + # llama-index-core # streamlit pathspec==0.12.1 # via # -r requirements.in # grep-ast -pillow==10.3.0 +pillow==10.4.0 # via # -r requirements.in + # llama-index-core + # sentence-transformers # streamlit -playwright==1.44.0 +playwright==1.45.0 # via -r requirements.in prompt-toolkit==3.0.47 # via -r requirements.in @@ -215,12 +277,13 @@ pycodestyle==2.12.0 # via flake8 pycparser==2.22 # via cffi -pydantic==2.7.4 +pydantic==2.8.2 # via # google-generativeai # litellm + # llama-cloud # openai -pydantic-core==2.18.4 +pydantic-core==2.20.1 # via pydantic pydeck==0.9.1 # via streamlit @@ -244,19 +307,26 @@ pyyaml==6.0.1 # via # -r requirements.in # huggingface-hub + # llama-index-core + # transformers referencing==0.35.1 # via # jsonschema # jsonschema-specifications regex==2024.5.15 - # via tiktoken + # via + # nltk + # tiktoken + # transformers requests==2.32.3 # via # google-api-core # huggingface-hub # litellm + # llama-index-core # streamlit # tiktoken + # transformers rich==13.7.1 # via # -r requirements.in @@ -267,8 +337,17 @@ rpds-py==0.18.1 # referencing rsa==4.9 # via google-auth +safetensors==0.4.3 + # via transformers +scikit-learn==1.5.1 + # via sentence-transformers scipy==1.13.1 - # via -r requirements.in + # via + # -r requirements.in + # scikit-learn + # sentence-transformers +sentence-transformers==3.0.1 + # via llama-index-embeddings-huggingface six==1.16.0 # via python-dateutil smmap==5.0.1 @@ -284,27 +363,48 @@ soundfile==0.12.1 # via -r requirements.in soupsieve==2.5 # via beautifulsoup4 +sqlalchemy[asyncio]==2.0.31 + # via + # llama-index-core + # sqlalchemy streamlit==1.36.0 # via -r requirements.in +sympy==1.12.1 + # via torch tenacity==8.4.2 - # via streamlit + # via + # llama-index-core + # streamlit +threadpoolctl==3.5.0 + # via scikit-learn tiktoken==0.7.0 # via # -r requirements.in # litellm + # llama-index-core tokenizers==0.19.1 - # via litellm + # via + # litellm + # transformers toml==0.10.2 # via streamlit toolz==0.12.1 # via altair +torch==2.2.2 + # via sentence-transformers tornado==6.4.1 # via streamlit tqdm==4.66.4 # via # google-generativeai # huggingface-hub + # llama-index-core + # nltk # openai + # sentence-transformers + # transformers +transformers==4.42.3 + # via sentence-transformers tree-sitter==0.21.3 # via # -r requirements.in @@ -315,11 +415,19 @@ typing-extensions==4.12.2 # via # google-generativeai # huggingface-hub + # llama-index-core # openai # pydantic # pydantic-core # pyee + # sqlalchemy # streamlit + # torch + # typing-inspect +typing-inspect==0.9.0 + # via + # dataclasses-json + # llama-index-core tzdata==2024.1 # via pandas uritemplate==4.1.1 @@ -330,6 +438,10 @@ watchdog==4.0.1 # via -r requirements.in wcwidth==0.2.13 # via prompt-toolkit +wrapt==1.16.0 + # via + # deprecated + # llama-index-core yarl==1.9.4 # via aiohttp zipp==3.19.2 From dcc542f7efb94bcf194cf60e943f3c6ec5d46798 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 4 Jul 2024 16:34:29 -0300 Subject: [PATCH 12/39] undo setup.py changes --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ff6fe433f..d31d87a77 100644 --- a/setup.py +++ b/setup.py @@ -15,11 +15,10 @@ with open("README.md", "r", encoding="utf-8") as f: setup( name="aider-chat", version=__version__, - packages=find_packages() + ['website'], + packages=find_packages(), include_package_data=True, package_data={ "aider": ["queries/*"], - "": ["website/**/*", "!website/_posts/**/*"], }, install_requires=requirements, python_requires=">=3.9,<3.13", From e6e581f5cdfe8f55b89c3e3035161f26b618e2f6 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 4 Jul 2024 16:36:10 -0300 Subject: [PATCH 13/39] Added debug print statements to discover and display the packages and package data being included in the distribution. --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index d31d87a77..36d279d06 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,14 @@ with open("README.md", "r", encoding="utf-8") as f: long_description = re.sub(r"\n!\[.*\]\(.*\)", "", long_description) # long_description = re.sub(r"\n- \[.*\]\(.*\)", "", long_description) +# Debug: Print discovered packages +packages = find_packages() +print("Discovered packages:", packages) + +# Debug: Print package data +package_data = {"aider": ["queries/*"]} +print("Package data:", package_data) + setup( name="aider-chat", version=__version__, From 644412bd8c6e3b4af7fb0edebcc9fdec28de6f6f Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 4 Jul 2024 16:37:40 -0300 Subject: [PATCH 14/39] Added a note explaining that the 'build' directory is populated when running commands like 'python setup.py sdist bdist_wheel' to build distribution packages. --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 36d279d06..ebce167f9 100644 --- a/setup.py +++ b/setup.py @@ -20,6 +20,10 @@ print("Discovered packages:", packages) package_data = {"aider": ["queries/*"]} print("Package data:", package_data) +# Note: The 'build' directory is populated when running commands like +# 'python setup.py sdist bdist_wheel', which use this setup() configuration +# to build distribution packages. + setup( name="aider-chat", version=__version__, From e951974c4351c8e5faa6166435706fd5b1a495cc Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 4 Jul 2024 20:53:03 -0300 Subject: [PATCH 15/39] fix pip-compile so dev-req and req agree --- dev-requirements.in | 1 + dev-requirements.txt | 89 ++++++++++++++++++++++++++++++++------------ requirements.txt | 2 + 3 files changed, 69 insertions(+), 23 deletions(-) diff --git a/dev-requirements.in b/dev-requirements.in index 48dfe58c0..ded94b556 100644 --- a/dev-requirements.in +++ b/dev-requirements.in @@ -1,3 +1,4 @@ +-c requirements.txt # # pip-compile --output-file=dev-requirements.txt dev-requirements.in --upgrade # diff --git a/dev-requirements.txt b/dev-requirements.txt index 3c679cc6a..9e014122a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -10,14 +10,19 @@ babel==2.15.0 # via sphinx build==1.2.1 # via pip-tools -certifi==2024.6.2 - # via requests +certifi==2024.7.4 + # via + # -c requirements.txt + # requests cfgv==3.4.0 # via pre-commit charset-normalizer==3.3.2 - # via requests + # via + # -c requirements.txt + # requests click==8.1.7 # via + # -c requirements.txt # pip-tools # typer cogapp==3.4.1 @@ -37,13 +42,17 @@ docutils==0.20.1 # sphinx # sphinx-rtd-theme filelock==3.15.4 - # via virtualenv + # via + # -c requirements.txt + # virtualenv fonttools==4.53.0 # via matplotlib identify==2.5.36 # via pre-commit idna==3.7 - # via requests + # via + # -c requirements.txt + # requests imagesize==1.4.1 # via sphinx imgcat==0.5.0 @@ -51,40 +60,54 @@ imgcat==0.5.0 iniconfig==2.0.0 # via pytest jinja2==3.1.4 - # via sphinx + # via + # -c requirements.txt + # sphinx kiwisolver==1.4.5 # via matplotlib lox==0.12.0 # via -r dev-requirements.in markdown-it-py==3.0.0 - # via rich + # via + # -c requirements.txt + # rich markupsafe==2.1.5 - # via jinja2 -matplotlib==3.9.0 + # via + # -c requirements.txt + # jinja2 +matplotlib==3.9.1 # via -r dev-requirements.in mdurl==0.1.2 - # via markdown-it-py + # via + # -c requirements.txt + # markdown-it-py multiprocess==0.70.16 # via pathos nodeenv==1.9.1 # via pre-commit -numpy==2.0.0 +numpy==1.26.4 # via + # -c requirements.txt # contourpy # matplotlib # pandas packaging==24.1 # via + # -c requirements.txt # build # matplotlib # pytest # sphinx pandas==2.2.2 - # via -r dev-requirements.in + # via + # -c requirements.txt + # -r dev-requirements.in pathos==0.3.2 # via lox -pillow==10.3.0 - # via matplotlib +pillow==10.4.0 + # via + # -c requirements.txt + # matplotlib pip-tools==7.4.1 # via -r dev-requirements.in platformdirs==4.2.2 @@ -99,10 +122,13 @@ pre-commit==3.7.1 # via -r dev-requirements.in pygments==2.18.0 # via + # -c requirements.txt # rich # sphinx pyparsing==3.1.2 - # via matplotlib + # via + # -c requirements.txt + # matplotlib pyproject-hooks==1.1.0 # via # build @@ -111,20 +137,31 @@ pytest==8.2.2 # via -r dev-requirements.in python-dateutil==2.9.0.post0 # via + # -c requirements.txt # matplotlib # pandas pytz==2024.1 - # via pandas + # via + # -c requirements.txt + # pandas pyyaml==6.0.1 - # via pre-commit + # via + # -c requirements.txt + # pre-commit requests==2.32.3 - # via sphinx + # via + # -c requirements.txt + # sphinx rich==13.7.1 - # via typer + # via + # -c requirements.txt + # typer shellingham==1.5.4 # via typer six==1.16.0 - # via python-dateutil + # via + # -c requirements.txt + # python-dateutil snowballstemmer==2.2.0 # via sphinx sphinx==7.3.7 @@ -150,11 +187,17 @@ sphinxcontrib-serializinghtml==1.1.10 typer==0.12.3 # via -r dev-requirements.in typing-extensions==4.12.2 - # via typer + # via + # -c requirements.txt + # typer tzdata==2024.1 - # via pandas + # via + # -c requirements.txt + # pandas urllib3==2.2.2 - # via requests + # via + # -c requirements.txt + # requests virtualenv==20.26.3 # via pre-commit wheel==0.43.0 diff --git a/requirements.txt b/requirements.txt index edc5c5e73..b275cb61c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -151,6 +151,8 @@ importlib-metadata==7.2.1 # via # -r requirements.in # litellm +importlib-resources==6.4.0 + # via -r requirements.in jinja2==3.1.4 # via # altair From e3877b9855b0f475a348a6827a3627b012aaa3f6 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 09:21:24 -0300 Subject: [PATCH 16/39] Implemented a more efficient file filtering mechanism for the website content indexing process. --- aider/help.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/aider/help.py b/aider/help.py index e07ead148..871e915e8 100755 --- a/aider/help.py +++ b/aider/help.py @@ -12,23 +12,25 @@ from aider.dump import dump # noqa: F401 warnings.simplefilter("ignore", category=FutureWarning) +exclude_website_pats = [ + "examples/**", + "_posts/**", + "HISTORY.md", + "docs/benchmarks*md", + "docs/ctags.md", + "docs/unified-diffs.md", + "docs/leaderboards/index.md", + "assets/**", +] + def get_package_files(): for path in importlib_resources.files("website").iterdir(): - dump(path) - if path.is_file() and path.name.endswith(".md"): - if not any( - part.startswith(("OLD", "tmp")) or part in ("examples", "_posts") - for part in path.parts - ): - yield str(path) + if path.is_file(): + yield path elif path.is_dir(): for subpath in path.rglob("*.md"): - if not any( - part.startswith(("OLD", "tmp")) or part in ("examples", "_posts") - for part in subpath.parts - ): - yield str(subpath) + yield subpath def fname_to_url(filepath): @@ -74,7 +76,7 @@ def get_index(): nodes = [] for fname in tqdm(list(get_package_files())): fname = Path(fname) - dump(fname) + # todo: skip if matches exclude website pats doc = Document( text=importlib_resources.files("website").joinpath(fname).read_text(), metadata=dict( @@ -85,7 +87,7 @@ def get_index(): ) nodes += parser.get_nodes_from_documents([doc]) - index = VectorStoreIndex(nodes) + index = VectorStoreIndex(nodes, show_progress=True) dname.parent.mkdir(exist_ok=True) index.storage_context.persist(dname) From b1feb53e9ccede61f5c9648170ba575cc6298137 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 5 Jul 2024 09:21:41 -0300 Subject: [PATCH 17/39] Implemented skip for files matching exclude_website_pats patterns. --- aider/help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/help.py b/aider/help.py index 871e915e8..f484c041a 100755 --- a/aider/help.py +++ b/aider/help.py @@ -76,7 +76,8 @@ def get_index(): nodes = [] for fname in tqdm(list(get_package_files())): fname = Path(fname) - # todo: skip if matches exclude website pats + if any(fname.match(pat) for pat in exclude_website_pats): + continue doc = Document( text=importlib_resources.files("website").joinpath(fname).read_text(), metadata=dict( From 9f7197974ffade2d2d9a3e27ec9d42ceebc92745 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 09:29:35 -0300 Subject: [PATCH 18/39] refactored exclude_website_pats --- aider/help.py | 4 ++-- setup.py | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/aider/help.py b/aider/help.py index f484c041a..ae5aa8200 100755 --- a/aider/help.py +++ b/aider/help.py @@ -6,7 +6,6 @@ import warnings from pathlib import Path import importlib_resources -from tqdm import tqdm from aider.dump import dump # noqa: F401 @@ -74,10 +73,11 @@ def get_index(): parser = MarkdownNodeParser() nodes = [] - for fname in tqdm(list(get_package_files())): + for fname in get_package_files(): fname = Path(fname) if any(fname.match(pat) for pat in exclude_website_pats): continue + doc = Document( text=importlib_resources.files("website").joinpath(fname).read_text(), metadata=dict( diff --git a/setup.py b/setup.py index ebce167f9..4c01eccbd 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ with open("requirements.txt") as f: requirements = f.read().splitlines() from aider import __version__ +from aider.help import exclude_website_pats with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() @@ -13,13 +14,9 @@ with open("README.md", "r", encoding="utf-8") as f: # long_description = re.sub(r"\n- \[.*\]\(.*\)", "", long_description) # Debug: Print discovered packages -packages = find_packages() +packages = find_packages() + ["website"] print("Discovered packages:", packages) -# Debug: Print package data -package_data = {"aider": ["queries/*"]} -print("Package data:", package_data) - # Note: The 'build' directory is populated when running commands like # 'python setup.py sdist bdist_wheel', which use this setup() configuration # to build distribution packages. @@ -27,11 +24,13 @@ print("Package data:", package_data) setup( name="aider-chat", version=__version__, - packages=find_packages(), + packages=packages, include_package_data=True, package_data={ - "aider": ["queries/*"], + "aider": ["queries/*.scm"], + "website": ["**/*.md"], }, + exclude_package_data={"website": exclude_website_pats}, install_requires=requirements, python_requires=">=3.9,<3.13", entry_points={ From eb80b3291592a3e8ef5253a7523c6a70da798350 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 09:34:16 -0300 Subject: [PATCH 19/39] Added the `exclude=["benchmark"]` parameter to the `find_packages()` function to exclude the 'benchmark' package from the discovered packages. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4c01eccbd..1d7d36ae7 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ with open("README.md", "r", encoding="utf-8") as f: # long_description = re.sub(r"\n- \[.*\]\(.*\)", "", long_description) # Debug: Print discovered packages -packages = find_packages() + ["website"] +packages = find_packages(exclude=["benchmark"]) + ["website"] print("Discovered packages:", packages) # Note: The 'build' directory is populated when running commands like From 22a494bb59e11e9cfa7842a8c1a8b6324b2ade67 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 10:01:30 -0300 Subject: [PATCH 20/39] moved website/ -> aider/website/ --- .github/workflows/pages.yml | 8 ++++---- aider/help.py | 4 ++-- {website => aider/website}/Gemfile | 0 {website => aider/website}/HISTORY.md | 0 {website => aider/website}/_config.yml | 0 .../website}/_data/edit_leaderboard.yml | 0 .../website}/_data/refactor_leaderboard.yml | 0 {website => aider/website}/_includes/get-started.md | 0 .../website}/_includes/head_custom.html | 0 {website => aider/website}/_includes/help.md | 0 .../website}/_includes/model-warnings.md | 0 {website => aider/website}/_includes/multi-line.md | 0 .../website}/_includes/nav_footer_custom.html | 0 .../website}/_includes/special-keys.md | 0 {website => aider/website}/_layouts/redirect.html | 0 .../website}/_posts/2023-05-25-ctags.md | 0 .../website}/_posts/2023-07-02-benchmarks.md | 0 .../website}/_posts/2023-10-22-repomap.md | 0 .../website}/_posts/2023-11-06-benchmarks-1106.md | 0 .../_posts/2023-11-06-benchmarks-speed-1106.md | 0 .../website}/_posts/2023-12-21-unified-diffs.md | 0 .../website}/_posts/2024-01-25-benchmarks-0125.md | 0 .../website}/_posts/2024-03-08-claude-3.md | 0 .../website}/_posts/2024-04-09-gpt-4-turbo.md | 0 .../website}/_posts/2024-05-02-browser.md | 0 .../website}/_posts/2024-05-13-models-over-time.md | 0 .../website}/_posts/2024-05-22-draft.md | 0 .../website}/_posts/2024-05-22-linting.md | 0 .../website}/_posts/2024-05-22-swe-bench-lite.md | 0 .../website}/_posts/2024-05-24-self-assembly.md | 0 .../website}/_posts/2024-06-02-main-swe-bench.md | 0 .../website}/_posts/2024-07-01-sonnet-not-lazy.md | 0 {website => aider/website}/_sass/custom/custom.scss | 0 .../website}/assets/2024-03-07-claude-3.jpg | Bin .../website}/assets/2024-03-07-claude-3.svg | 0 .../assets/2024-04-09-gpt-4-turbo-laziness.jpg | Bin .../assets/2024-04-09-gpt-4-turbo-laziness.svg | 0 .../website}/assets/2024-04-09-gpt-4-turbo.jpg | Bin .../website}/assets/2024-04-09-gpt-4-turbo.svg | 0 .../website}/assets/aider-browser-social.mp4 | Bin {website => aider/website}/assets/aider-square.jpg | Bin {website => aider/website}/assets/aider.jpg | Bin .../website}/assets/benchmarks-0125.jpg | Bin .../website}/assets/benchmarks-0125.svg | 0 .../website}/assets/benchmarks-1106.jpg | Bin .../website}/assets/benchmarks-1106.svg | 0 .../website}/assets/benchmarks-speed-1106.jpg | Bin .../website}/assets/benchmarks-speed-1106.svg | 0 .../website}/assets/benchmarks-udiff.jpg | Bin .../website}/assets/benchmarks-udiff.svg | 0 {website => aider/website}/assets/benchmarks.jpg | Bin {website => aider/website}/assets/benchmarks.svg | 0 {website => aider/website}/assets/browser.jpg | Bin {website => aider/website}/assets/codespaces.jpg | Bin {website => aider/website}/assets/codespaces.mp4 | Bin {website => aider/website}/assets/figure.png | Bin .../assets/icons/android-chrome-192x192.png | Bin .../assets/icons/android-chrome-384x384.png | Bin .../website}/assets/icons/apple-touch-icon.png | Bin .../website}/assets/icons/browserconfig.xml | 0 .../website}/assets/icons/favicon-16x16.png | Bin .../website}/assets/icons/favicon-32x32.png | Bin {website => aider/website}/assets/icons/favicon.ico | Bin .../website}/assets/icons/mstile-150x150.png | Bin .../website}/assets/icons/safari-pinned-tab.svg | 0 .../website}/assets/icons/site.webmanifest | 0 {website => aider/website}/assets/install.jpg | Bin {website => aider/website}/assets/install.mp4 | Bin {website => aider/website}/assets/leaderboard.jpg | Bin {website => aider/website}/assets/linting.jpg | Bin {website => aider/website}/assets/llms.jpg | Bin .../website}/assets/models-over-time.png | Bin .../website}/assets/models-over-time.svg | 0 {website => aider/website}/assets/robot-ast.png | Bin .../website}/assets/robot-flowchart.png | Bin .../website}/assets/sample.aider.conf.yml | 0 {website => aider/website}/assets/sample.env | 0 {website => aider/website}/assets/screencast.svg | 0 {website => aider/website}/assets/screenshot.png | Bin {website => aider/website}/assets/self-assembly.jpg | Bin .../website}/assets/sonnet-not-lazy.jpg | Bin {website => aider/website}/assets/swe_bench.jpg | Bin {website => aider/website}/assets/swe_bench.svg | 0 .../website}/assets/swe_bench_lite.jpg | Bin .../website}/assets/swe_bench_lite.svg | 0 {website => aider/website}/assets/udiffs.jpg | Bin {website => aider/website}/blog/index.html | 0 {website => aider/website}/docs/benchmarks-0125.md | 0 {website => aider/website}/docs/benchmarks-1106.md | 0 .../website}/docs/benchmarks-speed-1106.md | 0 {website => aider/website}/docs/benchmarks.md | 0 {website => aider/website}/docs/browser.md | 0 {website => aider/website}/docs/commands.md | 0 {website => aider/website}/docs/config.md | 0 .../website}/docs/config/adv-model-settings.md | 0 .../website}/docs/config/aider_conf.md | 0 {website => aider/website}/docs/config/dotenv.md | 0 {website => aider/website}/docs/config/options.md | 0 {website => aider/website}/docs/conventions.md | 0 {website => aider/website}/docs/ctags.md | 0 {website => aider/website}/docs/faq.md | 0 {website => aider/website}/docs/git.md | 0 {website => aider/website}/docs/images-urls.md | 0 {website => aider/website}/docs/install.md | 0 .../website}/docs/install/codespaces.md | 0 {website => aider/website}/docs/install/docker.md | 0 {website => aider/website}/docs/install/install.md | 0 {website => aider/website}/docs/install/optional.md | 0 {website => aider/website}/docs/install/pipx.md | 0 {website => aider/website}/docs/languages.md | 0 .../website}/docs/leaderboards/index.md | 0 {website => aider/website}/docs/llms.md | 0 {website => aider/website}/docs/llms/anthropic.md | 0 {website => aider/website}/docs/llms/azure.md | 0 {website => aider/website}/docs/llms/cohere.md | 0 {website => aider/website}/docs/llms/deepseek.md | 0 .../website}/docs/llms/editing-format.md | 0 {website => aider/website}/docs/llms/gemini.md | 0 {website => aider/website}/docs/llms/groq.md | 0 {website => aider/website}/docs/llms/ollama.md | 0 .../website}/docs/llms/openai-compat.md | 0 {website => aider/website}/docs/llms/openai.md | 0 {website => aider/website}/docs/llms/openrouter.md | 0 {website => aider/website}/docs/llms/other.md | 0 {website => aider/website}/docs/llms/warnings.md | 0 {website => aider/website}/docs/more-info.md | 0 {website => aider/website}/docs/repomap.md | 0 {website => aider/website}/docs/scripting.md | 0 {website => aider/website}/docs/tips.md | 0 {website => aider/website}/docs/troubleshooting.md | 0 .../website}/docs/troubleshooting/edit-errors.md | 0 .../website}/docs/troubleshooting/support.md | 0 .../website}/docs/troubleshooting/token-limits.md | 0 .../website}/docs/troubleshooting/warnings.md | 0 {website => aider/website}/docs/tutorials.md | 0 {website => aider/website}/docs/unified-diffs.md | 0 {website => aider/website}/docs/usage.md | 0 {website => aider/website}/docs/voice.md | 0 {website => aider/website}/examples/2048-game.md | 0 {website => aider/website}/examples/README.md | 0 {website => aider/website}/examples/add-test.md | 0 {website => aider/website}/examples/asciinema.md | 0 {website => aider/website}/examples/census.md | 0 .../website}/examples/chat-transcript-css.md | 0 .../website}/examples/complex-change.md | 0 .../website}/examples/css-exercises.md | 0 .../website}/examples/hello-world-flask.md | 0 {website => aider/website}/examples/hello.md | 0 {website => aider/website}/examples/no-color.md | 0 {website => aider/website}/examples/pong.md | 0 .../website}/examples/semantic-search-replace.md | 0 {website => aider/website}/examples/update-docs.md | 0 {website => aider/website}/index.md | 0 {website => aider/website}/share/index.md | 0 setup.py | 6 +++--- 155 files changed, 9 insertions(+), 9 deletions(-) rename {website => aider/website}/Gemfile (100%) rename {website => aider/website}/HISTORY.md (100%) rename {website => aider/website}/_config.yml (100%) rename {website => aider/website}/_data/edit_leaderboard.yml (100%) rename {website => aider/website}/_data/refactor_leaderboard.yml (100%) rename {website => aider/website}/_includes/get-started.md (100%) rename {website => aider/website}/_includes/head_custom.html (100%) rename {website => aider/website}/_includes/help.md (100%) rename {website => aider/website}/_includes/model-warnings.md (100%) rename {website => aider/website}/_includes/multi-line.md (100%) rename {website => aider/website}/_includes/nav_footer_custom.html (100%) rename {website => aider/website}/_includes/special-keys.md (100%) rename {website => aider/website}/_layouts/redirect.html (100%) rename {website => aider/website}/_posts/2023-05-25-ctags.md (100%) rename {website => aider/website}/_posts/2023-07-02-benchmarks.md (100%) rename {website => aider/website}/_posts/2023-10-22-repomap.md (100%) rename {website => aider/website}/_posts/2023-11-06-benchmarks-1106.md (100%) rename {website => aider/website}/_posts/2023-11-06-benchmarks-speed-1106.md (100%) rename {website => aider/website}/_posts/2023-12-21-unified-diffs.md (100%) rename {website => aider/website}/_posts/2024-01-25-benchmarks-0125.md (100%) rename {website => aider/website}/_posts/2024-03-08-claude-3.md (100%) rename {website => aider/website}/_posts/2024-04-09-gpt-4-turbo.md (100%) rename {website => aider/website}/_posts/2024-05-02-browser.md (100%) rename {website => aider/website}/_posts/2024-05-13-models-over-time.md (100%) rename {website => aider/website}/_posts/2024-05-22-draft.md (100%) rename {website => aider/website}/_posts/2024-05-22-linting.md (100%) rename {website => aider/website}/_posts/2024-05-22-swe-bench-lite.md (100%) rename {website => aider/website}/_posts/2024-05-24-self-assembly.md (100%) rename {website => aider/website}/_posts/2024-06-02-main-swe-bench.md (100%) rename {website => aider/website}/_posts/2024-07-01-sonnet-not-lazy.md (100%) rename {website => aider/website}/_sass/custom/custom.scss (100%) rename {website => aider/website}/assets/2024-03-07-claude-3.jpg (100%) rename {website => aider/website}/assets/2024-03-07-claude-3.svg (100%) rename {website => aider/website}/assets/2024-04-09-gpt-4-turbo-laziness.jpg (100%) rename {website => aider/website}/assets/2024-04-09-gpt-4-turbo-laziness.svg (100%) rename {website => aider/website}/assets/2024-04-09-gpt-4-turbo.jpg (100%) rename {website => aider/website}/assets/2024-04-09-gpt-4-turbo.svg (100%) rename {website => aider/website}/assets/aider-browser-social.mp4 (100%) rename {website => aider/website}/assets/aider-square.jpg (100%) rename {website => aider/website}/assets/aider.jpg (100%) rename {website => aider/website}/assets/benchmarks-0125.jpg (100%) rename {website => aider/website}/assets/benchmarks-0125.svg (100%) rename {website => aider/website}/assets/benchmarks-1106.jpg (100%) rename {website => aider/website}/assets/benchmarks-1106.svg (100%) rename {website => aider/website}/assets/benchmarks-speed-1106.jpg (100%) rename {website => aider/website}/assets/benchmarks-speed-1106.svg (100%) rename {website => aider/website}/assets/benchmarks-udiff.jpg (100%) rename {website => aider/website}/assets/benchmarks-udiff.svg (100%) rename {website => aider/website}/assets/benchmarks.jpg (100%) rename {website => aider/website}/assets/benchmarks.svg (100%) rename {website => aider/website}/assets/browser.jpg (100%) rename {website => aider/website}/assets/codespaces.jpg (100%) rename {website => aider/website}/assets/codespaces.mp4 (100%) rename {website => aider/website}/assets/figure.png (100%) rename {website => aider/website}/assets/icons/android-chrome-192x192.png (100%) rename {website => aider/website}/assets/icons/android-chrome-384x384.png (100%) rename {website => aider/website}/assets/icons/apple-touch-icon.png (100%) rename {website => aider/website}/assets/icons/browserconfig.xml (100%) rename {website => aider/website}/assets/icons/favicon-16x16.png (100%) rename {website => aider/website}/assets/icons/favicon-32x32.png (100%) rename {website => aider/website}/assets/icons/favicon.ico (100%) rename {website => aider/website}/assets/icons/mstile-150x150.png (100%) rename {website => aider/website}/assets/icons/safari-pinned-tab.svg (100%) rename {website => aider/website}/assets/icons/site.webmanifest (100%) rename {website => aider/website}/assets/install.jpg (100%) rename {website => aider/website}/assets/install.mp4 (100%) rename {website => aider/website}/assets/leaderboard.jpg (100%) rename {website => aider/website}/assets/linting.jpg (100%) rename {website => aider/website}/assets/llms.jpg (100%) rename {website => aider/website}/assets/models-over-time.png (100%) rename {website => aider/website}/assets/models-over-time.svg (100%) rename {website => aider/website}/assets/robot-ast.png (100%) rename {website => aider/website}/assets/robot-flowchart.png (100%) rename {website => aider/website}/assets/sample.aider.conf.yml (100%) rename {website => aider/website}/assets/sample.env (100%) rename {website => aider/website}/assets/screencast.svg (100%) rename {website => aider/website}/assets/screenshot.png (100%) rename {website => aider/website}/assets/self-assembly.jpg (100%) rename {website => aider/website}/assets/sonnet-not-lazy.jpg (100%) rename {website => aider/website}/assets/swe_bench.jpg (100%) rename {website => aider/website}/assets/swe_bench.svg (100%) rename {website => aider/website}/assets/swe_bench_lite.jpg (100%) rename {website => aider/website}/assets/swe_bench_lite.svg (100%) rename {website => aider/website}/assets/udiffs.jpg (100%) rename {website => aider/website}/blog/index.html (100%) rename {website => aider/website}/docs/benchmarks-0125.md (100%) rename {website => aider/website}/docs/benchmarks-1106.md (100%) rename {website => aider/website}/docs/benchmarks-speed-1106.md (100%) rename {website => aider/website}/docs/benchmarks.md (100%) rename {website => aider/website}/docs/browser.md (100%) rename {website => aider/website}/docs/commands.md (100%) rename {website => aider/website}/docs/config.md (100%) rename {website => aider/website}/docs/config/adv-model-settings.md (100%) rename {website => aider/website}/docs/config/aider_conf.md (100%) rename {website => aider/website}/docs/config/dotenv.md (100%) rename {website => aider/website}/docs/config/options.md (100%) rename {website => aider/website}/docs/conventions.md (100%) rename {website => aider/website}/docs/ctags.md (100%) rename {website => aider/website}/docs/faq.md (100%) rename {website => aider/website}/docs/git.md (100%) rename {website => aider/website}/docs/images-urls.md (100%) rename {website => aider/website}/docs/install.md (100%) rename {website => aider/website}/docs/install/codespaces.md (100%) rename {website => aider/website}/docs/install/docker.md (100%) rename {website => aider/website}/docs/install/install.md (100%) rename {website => aider/website}/docs/install/optional.md (100%) rename {website => aider/website}/docs/install/pipx.md (100%) rename {website => aider/website}/docs/languages.md (100%) rename {website => aider/website}/docs/leaderboards/index.md (100%) rename {website => aider/website}/docs/llms.md (100%) rename {website => aider/website}/docs/llms/anthropic.md (100%) rename {website => aider/website}/docs/llms/azure.md (100%) rename {website => aider/website}/docs/llms/cohere.md (100%) rename {website => aider/website}/docs/llms/deepseek.md (100%) rename {website => aider/website}/docs/llms/editing-format.md (100%) rename {website => aider/website}/docs/llms/gemini.md (100%) rename {website => aider/website}/docs/llms/groq.md (100%) rename {website => aider/website}/docs/llms/ollama.md (100%) rename {website => aider/website}/docs/llms/openai-compat.md (100%) rename {website => aider/website}/docs/llms/openai.md (100%) rename {website => aider/website}/docs/llms/openrouter.md (100%) rename {website => aider/website}/docs/llms/other.md (100%) rename {website => aider/website}/docs/llms/warnings.md (100%) rename {website => aider/website}/docs/more-info.md (100%) rename {website => aider/website}/docs/repomap.md (100%) rename {website => aider/website}/docs/scripting.md (100%) rename {website => aider/website}/docs/tips.md (100%) rename {website => aider/website}/docs/troubleshooting.md (100%) rename {website => aider/website}/docs/troubleshooting/edit-errors.md (100%) rename {website => aider/website}/docs/troubleshooting/support.md (100%) rename {website => aider/website}/docs/troubleshooting/token-limits.md (100%) rename {website => aider/website}/docs/troubleshooting/warnings.md (100%) rename {website => aider/website}/docs/tutorials.md (100%) rename {website => aider/website}/docs/unified-diffs.md (100%) rename {website => aider/website}/docs/usage.md (100%) rename {website => aider/website}/docs/voice.md (100%) rename {website => aider/website}/examples/2048-game.md (100%) rename {website => aider/website}/examples/README.md (100%) rename {website => aider/website}/examples/add-test.md (100%) rename {website => aider/website}/examples/asciinema.md (100%) rename {website => aider/website}/examples/census.md (100%) rename {website => aider/website}/examples/chat-transcript-css.md (100%) rename {website => aider/website}/examples/complex-change.md (100%) rename {website => aider/website}/examples/css-exercises.md (100%) rename {website => aider/website}/examples/hello-world-flask.md (100%) rename {website => aider/website}/examples/hello.md (100%) rename {website => aider/website}/examples/no-color.md (100%) rename {website => aider/website}/examples/pong.md (100%) rename {website => aider/website}/examples/semantic-search-replace.md (100%) rename {website => aider/website}/examples/update-docs.md (100%) rename {website => aider/website}/index.md (100%) rename {website => aider/website}/share/index.md (100%) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 708083e4c..c3e28dac3 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -11,7 +11,7 @@ on: branches: - "main" paths: - - "website/**" + - "aider/website/**" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: website + working-directory: aider/website steps: - name: Checkout uses: actions/checkout@v3 @@ -43,7 +43,7 @@ jobs: ruby-version: '3.3' # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically cache-version: 0 # Increment this number if you need to re-download cached gems - working-directory: '${{ github.workspace }}/website' + working-directory: '${{ github.workspace }}/aider/website' - name: Setup Pages id: pages uses: actions/configure-pages@v3 @@ -56,7 +56,7 @@ jobs: # Automatically uploads an artifact from the './_site' directory by default uses: actions/upload-pages-artifact@v1 with: - path: "website/_site/" + path: "aider/website/_site/" # Deployment job deploy: diff --git a/aider/help.py b/aider/help.py index ae5aa8200..8a77017a5 100755 --- a/aider/help.py +++ b/aider/help.py @@ -24,7 +24,7 @@ exclude_website_pats = [ def get_package_files(): - for path in importlib_resources.files("website").iterdir(): + for path in importlib_resources.files("aider.website").iterdir(): if path.is_file(): yield path elif path.is_dir(): @@ -79,7 +79,7 @@ def get_index(): continue doc = Document( - text=importlib_resources.files("website").joinpath(fname).read_text(), + text=importlib_resources.files("aider.website").joinpath(fname).read_text(), metadata=dict( filename=fname.name, extension=fname.suffix, diff --git a/website/Gemfile b/aider/website/Gemfile similarity index 100% rename from website/Gemfile rename to aider/website/Gemfile diff --git a/website/HISTORY.md b/aider/website/HISTORY.md similarity index 100% rename from website/HISTORY.md rename to aider/website/HISTORY.md diff --git a/website/_config.yml b/aider/website/_config.yml similarity index 100% rename from website/_config.yml rename to aider/website/_config.yml diff --git a/website/_data/edit_leaderboard.yml b/aider/website/_data/edit_leaderboard.yml similarity index 100% rename from website/_data/edit_leaderboard.yml rename to aider/website/_data/edit_leaderboard.yml diff --git a/website/_data/refactor_leaderboard.yml b/aider/website/_data/refactor_leaderboard.yml similarity index 100% rename from website/_data/refactor_leaderboard.yml rename to aider/website/_data/refactor_leaderboard.yml diff --git a/website/_includes/get-started.md b/aider/website/_includes/get-started.md similarity index 100% rename from website/_includes/get-started.md rename to aider/website/_includes/get-started.md diff --git a/website/_includes/head_custom.html b/aider/website/_includes/head_custom.html similarity index 100% rename from website/_includes/head_custom.html rename to aider/website/_includes/head_custom.html diff --git a/website/_includes/help.md b/aider/website/_includes/help.md similarity index 100% rename from website/_includes/help.md rename to aider/website/_includes/help.md diff --git a/website/_includes/model-warnings.md b/aider/website/_includes/model-warnings.md similarity index 100% rename from website/_includes/model-warnings.md rename to aider/website/_includes/model-warnings.md diff --git a/website/_includes/multi-line.md b/aider/website/_includes/multi-line.md similarity index 100% rename from website/_includes/multi-line.md rename to aider/website/_includes/multi-line.md diff --git a/website/_includes/nav_footer_custom.html b/aider/website/_includes/nav_footer_custom.html similarity index 100% rename from website/_includes/nav_footer_custom.html rename to aider/website/_includes/nav_footer_custom.html diff --git a/website/_includes/special-keys.md b/aider/website/_includes/special-keys.md similarity index 100% rename from website/_includes/special-keys.md rename to aider/website/_includes/special-keys.md diff --git a/website/_layouts/redirect.html b/aider/website/_layouts/redirect.html similarity index 100% rename from website/_layouts/redirect.html rename to aider/website/_layouts/redirect.html diff --git a/website/_posts/2023-05-25-ctags.md b/aider/website/_posts/2023-05-25-ctags.md similarity index 100% rename from website/_posts/2023-05-25-ctags.md rename to aider/website/_posts/2023-05-25-ctags.md diff --git a/website/_posts/2023-07-02-benchmarks.md b/aider/website/_posts/2023-07-02-benchmarks.md similarity index 100% rename from website/_posts/2023-07-02-benchmarks.md rename to aider/website/_posts/2023-07-02-benchmarks.md diff --git a/website/_posts/2023-10-22-repomap.md b/aider/website/_posts/2023-10-22-repomap.md similarity index 100% rename from website/_posts/2023-10-22-repomap.md rename to aider/website/_posts/2023-10-22-repomap.md diff --git a/website/_posts/2023-11-06-benchmarks-1106.md b/aider/website/_posts/2023-11-06-benchmarks-1106.md similarity index 100% rename from website/_posts/2023-11-06-benchmarks-1106.md rename to aider/website/_posts/2023-11-06-benchmarks-1106.md diff --git a/website/_posts/2023-11-06-benchmarks-speed-1106.md b/aider/website/_posts/2023-11-06-benchmarks-speed-1106.md similarity index 100% rename from website/_posts/2023-11-06-benchmarks-speed-1106.md rename to aider/website/_posts/2023-11-06-benchmarks-speed-1106.md diff --git a/website/_posts/2023-12-21-unified-diffs.md b/aider/website/_posts/2023-12-21-unified-diffs.md similarity index 100% rename from website/_posts/2023-12-21-unified-diffs.md rename to aider/website/_posts/2023-12-21-unified-diffs.md diff --git a/website/_posts/2024-01-25-benchmarks-0125.md b/aider/website/_posts/2024-01-25-benchmarks-0125.md similarity index 100% rename from website/_posts/2024-01-25-benchmarks-0125.md rename to aider/website/_posts/2024-01-25-benchmarks-0125.md diff --git a/website/_posts/2024-03-08-claude-3.md b/aider/website/_posts/2024-03-08-claude-3.md similarity index 100% rename from website/_posts/2024-03-08-claude-3.md rename to aider/website/_posts/2024-03-08-claude-3.md diff --git a/website/_posts/2024-04-09-gpt-4-turbo.md b/aider/website/_posts/2024-04-09-gpt-4-turbo.md similarity index 100% rename from website/_posts/2024-04-09-gpt-4-turbo.md rename to aider/website/_posts/2024-04-09-gpt-4-turbo.md diff --git a/website/_posts/2024-05-02-browser.md b/aider/website/_posts/2024-05-02-browser.md similarity index 100% rename from website/_posts/2024-05-02-browser.md rename to aider/website/_posts/2024-05-02-browser.md diff --git a/website/_posts/2024-05-13-models-over-time.md b/aider/website/_posts/2024-05-13-models-over-time.md similarity index 100% rename from website/_posts/2024-05-13-models-over-time.md rename to aider/website/_posts/2024-05-13-models-over-time.md diff --git a/website/_posts/2024-05-22-draft.md b/aider/website/_posts/2024-05-22-draft.md similarity index 100% rename from website/_posts/2024-05-22-draft.md rename to aider/website/_posts/2024-05-22-draft.md diff --git a/website/_posts/2024-05-22-linting.md b/aider/website/_posts/2024-05-22-linting.md similarity index 100% rename from website/_posts/2024-05-22-linting.md rename to aider/website/_posts/2024-05-22-linting.md diff --git a/website/_posts/2024-05-22-swe-bench-lite.md b/aider/website/_posts/2024-05-22-swe-bench-lite.md similarity index 100% rename from website/_posts/2024-05-22-swe-bench-lite.md rename to aider/website/_posts/2024-05-22-swe-bench-lite.md diff --git a/website/_posts/2024-05-24-self-assembly.md b/aider/website/_posts/2024-05-24-self-assembly.md similarity index 100% rename from website/_posts/2024-05-24-self-assembly.md rename to aider/website/_posts/2024-05-24-self-assembly.md diff --git a/website/_posts/2024-06-02-main-swe-bench.md b/aider/website/_posts/2024-06-02-main-swe-bench.md similarity index 100% rename from website/_posts/2024-06-02-main-swe-bench.md rename to aider/website/_posts/2024-06-02-main-swe-bench.md diff --git a/website/_posts/2024-07-01-sonnet-not-lazy.md b/aider/website/_posts/2024-07-01-sonnet-not-lazy.md similarity index 100% rename from website/_posts/2024-07-01-sonnet-not-lazy.md rename to aider/website/_posts/2024-07-01-sonnet-not-lazy.md diff --git a/website/_sass/custom/custom.scss b/aider/website/_sass/custom/custom.scss similarity index 100% rename from website/_sass/custom/custom.scss rename to aider/website/_sass/custom/custom.scss diff --git a/website/assets/2024-03-07-claude-3.jpg b/aider/website/assets/2024-03-07-claude-3.jpg similarity index 100% rename from website/assets/2024-03-07-claude-3.jpg rename to aider/website/assets/2024-03-07-claude-3.jpg diff --git a/website/assets/2024-03-07-claude-3.svg b/aider/website/assets/2024-03-07-claude-3.svg similarity index 100% rename from website/assets/2024-03-07-claude-3.svg rename to aider/website/assets/2024-03-07-claude-3.svg diff --git a/website/assets/2024-04-09-gpt-4-turbo-laziness.jpg b/aider/website/assets/2024-04-09-gpt-4-turbo-laziness.jpg similarity index 100% rename from website/assets/2024-04-09-gpt-4-turbo-laziness.jpg rename to aider/website/assets/2024-04-09-gpt-4-turbo-laziness.jpg diff --git a/website/assets/2024-04-09-gpt-4-turbo-laziness.svg b/aider/website/assets/2024-04-09-gpt-4-turbo-laziness.svg similarity index 100% rename from website/assets/2024-04-09-gpt-4-turbo-laziness.svg rename to aider/website/assets/2024-04-09-gpt-4-turbo-laziness.svg diff --git a/website/assets/2024-04-09-gpt-4-turbo.jpg b/aider/website/assets/2024-04-09-gpt-4-turbo.jpg similarity index 100% rename from website/assets/2024-04-09-gpt-4-turbo.jpg rename to aider/website/assets/2024-04-09-gpt-4-turbo.jpg diff --git a/website/assets/2024-04-09-gpt-4-turbo.svg b/aider/website/assets/2024-04-09-gpt-4-turbo.svg similarity index 100% rename from website/assets/2024-04-09-gpt-4-turbo.svg rename to aider/website/assets/2024-04-09-gpt-4-turbo.svg diff --git a/website/assets/aider-browser-social.mp4 b/aider/website/assets/aider-browser-social.mp4 similarity index 100% rename from website/assets/aider-browser-social.mp4 rename to aider/website/assets/aider-browser-social.mp4 diff --git a/website/assets/aider-square.jpg b/aider/website/assets/aider-square.jpg similarity index 100% rename from website/assets/aider-square.jpg rename to aider/website/assets/aider-square.jpg diff --git a/website/assets/aider.jpg b/aider/website/assets/aider.jpg similarity index 100% rename from website/assets/aider.jpg rename to aider/website/assets/aider.jpg diff --git a/website/assets/benchmarks-0125.jpg b/aider/website/assets/benchmarks-0125.jpg similarity index 100% rename from website/assets/benchmarks-0125.jpg rename to aider/website/assets/benchmarks-0125.jpg diff --git a/website/assets/benchmarks-0125.svg b/aider/website/assets/benchmarks-0125.svg similarity index 100% rename from website/assets/benchmarks-0125.svg rename to aider/website/assets/benchmarks-0125.svg diff --git a/website/assets/benchmarks-1106.jpg b/aider/website/assets/benchmarks-1106.jpg similarity index 100% rename from website/assets/benchmarks-1106.jpg rename to aider/website/assets/benchmarks-1106.jpg diff --git a/website/assets/benchmarks-1106.svg b/aider/website/assets/benchmarks-1106.svg similarity index 100% rename from website/assets/benchmarks-1106.svg rename to aider/website/assets/benchmarks-1106.svg diff --git a/website/assets/benchmarks-speed-1106.jpg b/aider/website/assets/benchmarks-speed-1106.jpg similarity index 100% rename from website/assets/benchmarks-speed-1106.jpg rename to aider/website/assets/benchmarks-speed-1106.jpg diff --git a/website/assets/benchmarks-speed-1106.svg b/aider/website/assets/benchmarks-speed-1106.svg similarity index 100% rename from website/assets/benchmarks-speed-1106.svg rename to aider/website/assets/benchmarks-speed-1106.svg diff --git a/website/assets/benchmarks-udiff.jpg b/aider/website/assets/benchmarks-udiff.jpg similarity index 100% rename from website/assets/benchmarks-udiff.jpg rename to aider/website/assets/benchmarks-udiff.jpg diff --git a/website/assets/benchmarks-udiff.svg b/aider/website/assets/benchmarks-udiff.svg similarity index 100% rename from website/assets/benchmarks-udiff.svg rename to aider/website/assets/benchmarks-udiff.svg diff --git a/website/assets/benchmarks.jpg b/aider/website/assets/benchmarks.jpg similarity index 100% rename from website/assets/benchmarks.jpg rename to aider/website/assets/benchmarks.jpg diff --git a/website/assets/benchmarks.svg b/aider/website/assets/benchmarks.svg similarity index 100% rename from website/assets/benchmarks.svg rename to aider/website/assets/benchmarks.svg diff --git a/website/assets/browser.jpg b/aider/website/assets/browser.jpg similarity index 100% rename from website/assets/browser.jpg rename to aider/website/assets/browser.jpg diff --git a/website/assets/codespaces.jpg b/aider/website/assets/codespaces.jpg similarity index 100% rename from website/assets/codespaces.jpg rename to aider/website/assets/codespaces.jpg diff --git a/website/assets/codespaces.mp4 b/aider/website/assets/codespaces.mp4 similarity index 100% rename from website/assets/codespaces.mp4 rename to aider/website/assets/codespaces.mp4 diff --git a/website/assets/figure.png b/aider/website/assets/figure.png similarity index 100% rename from website/assets/figure.png rename to aider/website/assets/figure.png diff --git a/website/assets/icons/android-chrome-192x192.png b/aider/website/assets/icons/android-chrome-192x192.png similarity index 100% rename from website/assets/icons/android-chrome-192x192.png rename to aider/website/assets/icons/android-chrome-192x192.png diff --git a/website/assets/icons/android-chrome-384x384.png b/aider/website/assets/icons/android-chrome-384x384.png similarity index 100% rename from website/assets/icons/android-chrome-384x384.png rename to aider/website/assets/icons/android-chrome-384x384.png diff --git a/website/assets/icons/apple-touch-icon.png b/aider/website/assets/icons/apple-touch-icon.png similarity index 100% rename from website/assets/icons/apple-touch-icon.png rename to aider/website/assets/icons/apple-touch-icon.png diff --git a/website/assets/icons/browserconfig.xml b/aider/website/assets/icons/browserconfig.xml similarity index 100% rename from website/assets/icons/browserconfig.xml rename to aider/website/assets/icons/browserconfig.xml diff --git a/website/assets/icons/favicon-16x16.png b/aider/website/assets/icons/favicon-16x16.png similarity index 100% rename from website/assets/icons/favicon-16x16.png rename to aider/website/assets/icons/favicon-16x16.png diff --git a/website/assets/icons/favicon-32x32.png b/aider/website/assets/icons/favicon-32x32.png similarity index 100% rename from website/assets/icons/favicon-32x32.png rename to aider/website/assets/icons/favicon-32x32.png diff --git a/website/assets/icons/favicon.ico b/aider/website/assets/icons/favicon.ico similarity index 100% rename from website/assets/icons/favicon.ico rename to aider/website/assets/icons/favicon.ico diff --git a/website/assets/icons/mstile-150x150.png b/aider/website/assets/icons/mstile-150x150.png similarity index 100% rename from website/assets/icons/mstile-150x150.png rename to aider/website/assets/icons/mstile-150x150.png diff --git a/website/assets/icons/safari-pinned-tab.svg b/aider/website/assets/icons/safari-pinned-tab.svg similarity index 100% rename from website/assets/icons/safari-pinned-tab.svg rename to aider/website/assets/icons/safari-pinned-tab.svg diff --git a/website/assets/icons/site.webmanifest b/aider/website/assets/icons/site.webmanifest similarity index 100% rename from website/assets/icons/site.webmanifest rename to aider/website/assets/icons/site.webmanifest diff --git a/website/assets/install.jpg b/aider/website/assets/install.jpg similarity index 100% rename from website/assets/install.jpg rename to aider/website/assets/install.jpg diff --git a/website/assets/install.mp4 b/aider/website/assets/install.mp4 similarity index 100% rename from website/assets/install.mp4 rename to aider/website/assets/install.mp4 diff --git a/website/assets/leaderboard.jpg b/aider/website/assets/leaderboard.jpg similarity index 100% rename from website/assets/leaderboard.jpg rename to aider/website/assets/leaderboard.jpg diff --git a/website/assets/linting.jpg b/aider/website/assets/linting.jpg similarity index 100% rename from website/assets/linting.jpg rename to aider/website/assets/linting.jpg diff --git a/website/assets/llms.jpg b/aider/website/assets/llms.jpg similarity index 100% rename from website/assets/llms.jpg rename to aider/website/assets/llms.jpg diff --git a/website/assets/models-over-time.png b/aider/website/assets/models-over-time.png similarity index 100% rename from website/assets/models-over-time.png rename to aider/website/assets/models-over-time.png diff --git a/website/assets/models-over-time.svg b/aider/website/assets/models-over-time.svg similarity index 100% rename from website/assets/models-over-time.svg rename to aider/website/assets/models-over-time.svg diff --git a/website/assets/robot-ast.png b/aider/website/assets/robot-ast.png similarity index 100% rename from website/assets/robot-ast.png rename to aider/website/assets/robot-ast.png diff --git a/website/assets/robot-flowchart.png b/aider/website/assets/robot-flowchart.png similarity index 100% rename from website/assets/robot-flowchart.png rename to aider/website/assets/robot-flowchart.png diff --git a/website/assets/sample.aider.conf.yml b/aider/website/assets/sample.aider.conf.yml similarity index 100% rename from website/assets/sample.aider.conf.yml rename to aider/website/assets/sample.aider.conf.yml diff --git a/website/assets/sample.env b/aider/website/assets/sample.env similarity index 100% rename from website/assets/sample.env rename to aider/website/assets/sample.env diff --git a/website/assets/screencast.svg b/aider/website/assets/screencast.svg similarity index 100% rename from website/assets/screencast.svg rename to aider/website/assets/screencast.svg diff --git a/website/assets/screenshot.png b/aider/website/assets/screenshot.png similarity index 100% rename from website/assets/screenshot.png rename to aider/website/assets/screenshot.png diff --git a/website/assets/self-assembly.jpg b/aider/website/assets/self-assembly.jpg similarity index 100% rename from website/assets/self-assembly.jpg rename to aider/website/assets/self-assembly.jpg diff --git a/website/assets/sonnet-not-lazy.jpg b/aider/website/assets/sonnet-not-lazy.jpg similarity index 100% rename from website/assets/sonnet-not-lazy.jpg rename to aider/website/assets/sonnet-not-lazy.jpg diff --git a/website/assets/swe_bench.jpg b/aider/website/assets/swe_bench.jpg similarity index 100% rename from website/assets/swe_bench.jpg rename to aider/website/assets/swe_bench.jpg diff --git a/website/assets/swe_bench.svg b/aider/website/assets/swe_bench.svg similarity index 100% rename from website/assets/swe_bench.svg rename to aider/website/assets/swe_bench.svg diff --git a/website/assets/swe_bench_lite.jpg b/aider/website/assets/swe_bench_lite.jpg similarity index 100% rename from website/assets/swe_bench_lite.jpg rename to aider/website/assets/swe_bench_lite.jpg diff --git a/website/assets/swe_bench_lite.svg b/aider/website/assets/swe_bench_lite.svg similarity index 100% rename from website/assets/swe_bench_lite.svg rename to aider/website/assets/swe_bench_lite.svg diff --git a/website/assets/udiffs.jpg b/aider/website/assets/udiffs.jpg similarity index 100% rename from website/assets/udiffs.jpg rename to aider/website/assets/udiffs.jpg diff --git a/website/blog/index.html b/aider/website/blog/index.html similarity index 100% rename from website/blog/index.html rename to aider/website/blog/index.html diff --git a/website/docs/benchmarks-0125.md b/aider/website/docs/benchmarks-0125.md similarity index 100% rename from website/docs/benchmarks-0125.md rename to aider/website/docs/benchmarks-0125.md diff --git a/website/docs/benchmarks-1106.md b/aider/website/docs/benchmarks-1106.md similarity index 100% rename from website/docs/benchmarks-1106.md rename to aider/website/docs/benchmarks-1106.md diff --git a/website/docs/benchmarks-speed-1106.md b/aider/website/docs/benchmarks-speed-1106.md similarity index 100% rename from website/docs/benchmarks-speed-1106.md rename to aider/website/docs/benchmarks-speed-1106.md diff --git a/website/docs/benchmarks.md b/aider/website/docs/benchmarks.md similarity index 100% rename from website/docs/benchmarks.md rename to aider/website/docs/benchmarks.md diff --git a/website/docs/browser.md b/aider/website/docs/browser.md similarity index 100% rename from website/docs/browser.md rename to aider/website/docs/browser.md diff --git a/website/docs/commands.md b/aider/website/docs/commands.md similarity index 100% rename from website/docs/commands.md rename to aider/website/docs/commands.md diff --git a/website/docs/config.md b/aider/website/docs/config.md similarity index 100% rename from website/docs/config.md rename to aider/website/docs/config.md diff --git a/website/docs/config/adv-model-settings.md b/aider/website/docs/config/adv-model-settings.md similarity index 100% rename from website/docs/config/adv-model-settings.md rename to aider/website/docs/config/adv-model-settings.md diff --git a/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md similarity index 100% rename from website/docs/config/aider_conf.md rename to aider/website/docs/config/aider_conf.md diff --git a/website/docs/config/dotenv.md b/aider/website/docs/config/dotenv.md similarity index 100% rename from website/docs/config/dotenv.md rename to aider/website/docs/config/dotenv.md diff --git a/website/docs/config/options.md b/aider/website/docs/config/options.md similarity index 100% rename from website/docs/config/options.md rename to aider/website/docs/config/options.md diff --git a/website/docs/conventions.md b/aider/website/docs/conventions.md similarity index 100% rename from website/docs/conventions.md rename to aider/website/docs/conventions.md diff --git a/website/docs/ctags.md b/aider/website/docs/ctags.md similarity index 100% rename from website/docs/ctags.md rename to aider/website/docs/ctags.md diff --git a/website/docs/faq.md b/aider/website/docs/faq.md similarity index 100% rename from website/docs/faq.md rename to aider/website/docs/faq.md diff --git a/website/docs/git.md b/aider/website/docs/git.md similarity index 100% rename from website/docs/git.md rename to aider/website/docs/git.md diff --git a/website/docs/images-urls.md b/aider/website/docs/images-urls.md similarity index 100% rename from website/docs/images-urls.md rename to aider/website/docs/images-urls.md diff --git a/website/docs/install.md b/aider/website/docs/install.md similarity index 100% rename from website/docs/install.md rename to aider/website/docs/install.md diff --git a/website/docs/install/codespaces.md b/aider/website/docs/install/codespaces.md similarity index 100% rename from website/docs/install/codespaces.md rename to aider/website/docs/install/codespaces.md diff --git a/website/docs/install/docker.md b/aider/website/docs/install/docker.md similarity index 100% rename from website/docs/install/docker.md rename to aider/website/docs/install/docker.md diff --git a/website/docs/install/install.md b/aider/website/docs/install/install.md similarity index 100% rename from website/docs/install/install.md rename to aider/website/docs/install/install.md diff --git a/website/docs/install/optional.md b/aider/website/docs/install/optional.md similarity index 100% rename from website/docs/install/optional.md rename to aider/website/docs/install/optional.md diff --git a/website/docs/install/pipx.md b/aider/website/docs/install/pipx.md similarity index 100% rename from website/docs/install/pipx.md rename to aider/website/docs/install/pipx.md diff --git a/website/docs/languages.md b/aider/website/docs/languages.md similarity index 100% rename from website/docs/languages.md rename to aider/website/docs/languages.md diff --git a/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md similarity index 100% rename from website/docs/leaderboards/index.md rename to aider/website/docs/leaderboards/index.md diff --git a/website/docs/llms.md b/aider/website/docs/llms.md similarity index 100% rename from website/docs/llms.md rename to aider/website/docs/llms.md diff --git a/website/docs/llms/anthropic.md b/aider/website/docs/llms/anthropic.md similarity index 100% rename from website/docs/llms/anthropic.md rename to aider/website/docs/llms/anthropic.md diff --git a/website/docs/llms/azure.md b/aider/website/docs/llms/azure.md similarity index 100% rename from website/docs/llms/azure.md rename to aider/website/docs/llms/azure.md diff --git a/website/docs/llms/cohere.md b/aider/website/docs/llms/cohere.md similarity index 100% rename from website/docs/llms/cohere.md rename to aider/website/docs/llms/cohere.md diff --git a/website/docs/llms/deepseek.md b/aider/website/docs/llms/deepseek.md similarity index 100% rename from website/docs/llms/deepseek.md rename to aider/website/docs/llms/deepseek.md diff --git a/website/docs/llms/editing-format.md b/aider/website/docs/llms/editing-format.md similarity index 100% rename from website/docs/llms/editing-format.md rename to aider/website/docs/llms/editing-format.md diff --git a/website/docs/llms/gemini.md b/aider/website/docs/llms/gemini.md similarity index 100% rename from website/docs/llms/gemini.md rename to aider/website/docs/llms/gemini.md diff --git a/website/docs/llms/groq.md b/aider/website/docs/llms/groq.md similarity index 100% rename from website/docs/llms/groq.md rename to aider/website/docs/llms/groq.md diff --git a/website/docs/llms/ollama.md b/aider/website/docs/llms/ollama.md similarity index 100% rename from website/docs/llms/ollama.md rename to aider/website/docs/llms/ollama.md diff --git a/website/docs/llms/openai-compat.md b/aider/website/docs/llms/openai-compat.md similarity index 100% rename from website/docs/llms/openai-compat.md rename to aider/website/docs/llms/openai-compat.md diff --git a/website/docs/llms/openai.md b/aider/website/docs/llms/openai.md similarity index 100% rename from website/docs/llms/openai.md rename to aider/website/docs/llms/openai.md diff --git a/website/docs/llms/openrouter.md b/aider/website/docs/llms/openrouter.md similarity index 100% rename from website/docs/llms/openrouter.md rename to aider/website/docs/llms/openrouter.md diff --git a/website/docs/llms/other.md b/aider/website/docs/llms/other.md similarity index 100% rename from website/docs/llms/other.md rename to aider/website/docs/llms/other.md diff --git a/website/docs/llms/warnings.md b/aider/website/docs/llms/warnings.md similarity index 100% rename from website/docs/llms/warnings.md rename to aider/website/docs/llms/warnings.md diff --git a/website/docs/more-info.md b/aider/website/docs/more-info.md similarity index 100% rename from website/docs/more-info.md rename to aider/website/docs/more-info.md diff --git a/website/docs/repomap.md b/aider/website/docs/repomap.md similarity index 100% rename from website/docs/repomap.md rename to aider/website/docs/repomap.md diff --git a/website/docs/scripting.md b/aider/website/docs/scripting.md similarity index 100% rename from website/docs/scripting.md rename to aider/website/docs/scripting.md diff --git a/website/docs/tips.md b/aider/website/docs/tips.md similarity index 100% rename from website/docs/tips.md rename to aider/website/docs/tips.md diff --git a/website/docs/troubleshooting.md b/aider/website/docs/troubleshooting.md similarity index 100% rename from website/docs/troubleshooting.md rename to aider/website/docs/troubleshooting.md diff --git a/website/docs/troubleshooting/edit-errors.md b/aider/website/docs/troubleshooting/edit-errors.md similarity index 100% rename from website/docs/troubleshooting/edit-errors.md rename to aider/website/docs/troubleshooting/edit-errors.md diff --git a/website/docs/troubleshooting/support.md b/aider/website/docs/troubleshooting/support.md similarity index 100% rename from website/docs/troubleshooting/support.md rename to aider/website/docs/troubleshooting/support.md diff --git a/website/docs/troubleshooting/token-limits.md b/aider/website/docs/troubleshooting/token-limits.md similarity index 100% rename from website/docs/troubleshooting/token-limits.md rename to aider/website/docs/troubleshooting/token-limits.md diff --git a/website/docs/troubleshooting/warnings.md b/aider/website/docs/troubleshooting/warnings.md similarity index 100% rename from website/docs/troubleshooting/warnings.md rename to aider/website/docs/troubleshooting/warnings.md diff --git a/website/docs/tutorials.md b/aider/website/docs/tutorials.md similarity index 100% rename from website/docs/tutorials.md rename to aider/website/docs/tutorials.md diff --git a/website/docs/unified-diffs.md b/aider/website/docs/unified-diffs.md similarity index 100% rename from website/docs/unified-diffs.md rename to aider/website/docs/unified-diffs.md diff --git a/website/docs/usage.md b/aider/website/docs/usage.md similarity index 100% rename from website/docs/usage.md rename to aider/website/docs/usage.md diff --git a/website/docs/voice.md b/aider/website/docs/voice.md similarity index 100% rename from website/docs/voice.md rename to aider/website/docs/voice.md diff --git a/website/examples/2048-game.md b/aider/website/examples/2048-game.md similarity index 100% rename from website/examples/2048-game.md rename to aider/website/examples/2048-game.md diff --git a/website/examples/README.md b/aider/website/examples/README.md similarity index 100% rename from website/examples/README.md rename to aider/website/examples/README.md diff --git a/website/examples/add-test.md b/aider/website/examples/add-test.md similarity index 100% rename from website/examples/add-test.md rename to aider/website/examples/add-test.md diff --git a/website/examples/asciinema.md b/aider/website/examples/asciinema.md similarity index 100% rename from website/examples/asciinema.md rename to aider/website/examples/asciinema.md diff --git a/website/examples/census.md b/aider/website/examples/census.md similarity index 100% rename from website/examples/census.md rename to aider/website/examples/census.md diff --git a/website/examples/chat-transcript-css.md b/aider/website/examples/chat-transcript-css.md similarity index 100% rename from website/examples/chat-transcript-css.md rename to aider/website/examples/chat-transcript-css.md diff --git a/website/examples/complex-change.md b/aider/website/examples/complex-change.md similarity index 100% rename from website/examples/complex-change.md rename to aider/website/examples/complex-change.md diff --git a/website/examples/css-exercises.md b/aider/website/examples/css-exercises.md similarity index 100% rename from website/examples/css-exercises.md rename to aider/website/examples/css-exercises.md diff --git a/website/examples/hello-world-flask.md b/aider/website/examples/hello-world-flask.md similarity index 100% rename from website/examples/hello-world-flask.md rename to aider/website/examples/hello-world-flask.md diff --git a/website/examples/hello.md b/aider/website/examples/hello.md similarity index 100% rename from website/examples/hello.md rename to aider/website/examples/hello.md diff --git a/website/examples/no-color.md b/aider/website/examples/no-color.md similarity index 100% rename from website/examples/no-color.md rename to aider/website/examples/no-color.md diff --git a/website/examples/pong.md b/aider/website/examples/pong.md similarity index 100% rename from website/examples/pong.md rename to aider/website/examples/pong.md diff --git a/website/examples/semantic-search-replace.md b/aider/website/examples/semantic-search-replace.md similarity index 100% rename from website/examples/semantic-search-replace.md rename to aider/website/examples/semantic-search-replace.md diff --git a/website/examples/update-docs.md b/aider/website/examples/update-docs.md similarity index 100% rename from website/examples/update-docs.md rename to aider/website/examples/update-docs.md diff --git a/website/index.md b/aider/website/index.md similarity index 100% rename from website/index.md rename to aider/website/index.md diff --git a/website/share/index.md b/aider/website/share/index.md similarity index 100% rename from website/share/index.md rename to aider/website/share/index.md diff --git a/setup.py b/setup.py index 1d7d36ae7..f1189d57e 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ with open("README.md", "r", encoding="utf-8") as f: # long_description = re.sub(r"\n- \[.*\]\(.*\)", "", long_description) # Debug: Print discovered packages -packages = find_packages(exclude=["benchmark"]) + ["website"] +packages = find_packages(exclude=["benchmark"]) + ["aider.website"] print("Discovered packages:", packages) # Note: The 'build' directory is populated when running commands like @@ -28,9 +28,9 @@ setup( include_package_data=True, package_data={ "aider": ["queries/*.scm"], - "website": ["**/*.md"], + "aider.website": ["**/*.md"], }, - exclude_package_data={"website": exclude_website_pats}, + exclude_package_data={"aider.website": exclude_website_pats}, install_requires=requirements, python_requires=">=3.9,<3.13", entry_points={ From 3d51102de534641dc7daa594c4ee2d6baf3717bb Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 10:03:51 -0300 Subject: [PATCH 21/39] version help index --- aider/help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/help.py b/aider/help.py index 8a77017a5..4a4f380c7 100755 --- a/aider/help.py +++ b/aider/help.py @@ -7,6 +7,7 @@ from pathlib import Path import importlib_resources +from aider import __version__ from aider.dump import dump # noqa: F401 warnings.simplefilter("ignore", category=FutureWarning) @@ -62,7 +63,7 @@ def get_index(): ) from llama_index.core.node_parser import MarkdownNodeParser - dname = Path.home() / ".aider" / "help" + dname = Path.home() / ".aider" / ("help." + __version__) if dname.exists(): storage_context = StorageContext.from_defaults( From 81195dad02f7268e9a39ea712ca7e25f2cd3113b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 10:06:23 -0300 Subject: [PATCH 22/39] use ~/.aider/caches --- aider/help.py | 4 ++-- aider/versioncheck.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/aider/help.py b/aider/help.py index 4a4f380c7..4fa242af7 100755 --- a/aider/help.py +++ b/aider/help.py @@ -63,7 +63,7 @@ def get_index(): ) from llama_index.core.node_parser import MarkdownNodeParser - dname = Path.home() / ".aider" / ("help." + __version__) + dname = Path.home() / ".aider" / "caches" / ("help." + __version__) if dname.exists(): storage_context = StorageContext.from_defaults( @@ -90,7 +90,7 @@ def get_index(): nodes += parser.get_nodes_from_documents([doc]) index = VectorStoreIndex(nodes, show_progress=True) - dname.parent.mkdir(exist_ok=True) + dname.parent.mkdir(parents=True, exist_ok=True) index.storage_context.persist(dname) return index diff --git a/aider/versioncheck.py b/aider/versioncheck.py index e93e238fe..f5098c5aa 100644 --- a/aider/versioncheck.py +++ b/aider/versioncheck.py @@ -8,7 +8,7 @@ import aider def check_version(print_cmd): - fname = Path.home() / ".aider/versioncheck" + fname = Path.home() / ".aider" / "caches" / "versioncheck" day = 60 * 60 * 24 if fname.exists() and time.time() - fname.stat().st_mtime < day: return @@ -35,8 +35,7 @@ def check_version(print_cmd): else: print_cmd(f"{py} -m pip install --upgrade aider-chat") - if not fname.parent.exists(): - fname.parent.mkdir() + fname.parent.mkdir(parents=True, exist_ok=True) fname.touch() return is_update_available except Exception as err: From 6e95dc80eac779737d952a82eb4fa0e663544e4b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 10:08:17 -0300 Subject: [PATCH 23/39] cleanup --- aider/help.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/aider/help.py b/aider/help.py index 4fa242af7..f839ed5cc 100755 --- a/aider/help.py +++ b/aider/help.py @@ -1,7 +1,6 @@ #!/usr/bin/env python import os -import sys import warnings from pathlib import Path @@ -127,17 +126,3 @@ class Help: context += "\n\n\n" return context - - -# -# question = "how can i convert a python script to js" -# question = "i am getting an error message about unknown context window" -# question = "i am getting an error message about exhausted context window" -# question = "The chat session is larger than the context window!" -# question = "how do i add deepseek api key to yaml" -# question = ( -# "It would be great if I could give aider an example github PR and instruct it to do the same" -# " exact thing for another integration." -# ) - -question = " ".join(sys.argv[1:]) From 05caccf3ccbc2c9a44ac0dccfd0c47eb9da4920a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 10:09:13 -0300 Subject: [PATCH 24/39] cleanup --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index f1189d57e..8fd34532b 100644 --- a/setup.py +++ b/setup.py @@ -17,10 +17,6 @@ with open("README.md", "r", encoding="utf-8") as f: packages = find_packages(exclude=["benchmark"]) + ["aider.website"] print("Discovered packages:", packages) -# Note: The 'build' directory is populated when running commands like -# 'python setup.py sdist bdist_wheel', which use this setup() configuration -# to build distribution packages. - setup( name="aider-chat", version=__version__, From 6c92dedac176ce29cabd3e25730d215df1975720 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 10:13:54 -0300 Subject: [PATCH 25/39] updated cogs to aider/website/ --- README.md | 2 +- aider/website/docs/commands.md | 2 +- aider/website/docs/config/aider_conf.md | 4 ++-- aider/website/docs/config/dotenv.md | 4 ++-- aider/website/index.md | 2 +- scripts/update-docs.sh | 14 +++++++------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a682c458a..92f326d11 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ and works best with GPT-4o, Claude 3.5 Sonnet, Claude 3 Opus and DeepSeek Coder You can get started quickly like this: diff --git a/aider/website/docs/commands.md b/aider/website/docs/commands.md index b74f720fa..0188aa4ef 100644 --- a/aider/website/docs/commands.md +++ b/aider/website/docs/commands.md @@ -18,7 +18,7 @@ cog.out(get_help_md()) - **/drop** Remove files from the chat session to free up context space - **/exit** Exit the application - **/git** Run a git command -- **/help** Show help about all commands +- **/help** Ask questions about aider - **/lint** Lint and fix provided files or in-chat files if none provided - **/ls** List all known files and indicate which are included in the chat session - **/model** Switch to a new LLM diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index a3c2bd48b..da7c02831 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -14,13 +14,13 @@ your git repo. Below is a sample of the file, which you can also -[download from GitHub](https://github.com/paul-gauthier/aider/blob/main/website/assets/sample.aider.conf.yml). +[download from GitHub](https://github.com/paul-gauthier/aider/blob/main/aider/website/assets/sample.aider.conf.yml). You can get started quickly like this: diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh index feb5d7f43..20a7304b3 100755 --- a/scripts/update-docs.sh +++ b/scripts/update-docs.sh @@ -12,10 +12,10 @@ fi # README.md before index.md, because index.md uses cog to include README.md cog $ARG \ README.md \ - website/index.md \ - website/HISTORY.md \ - website/docs/commands.md \ - website/docs/languages.md \ - website/docs/config/dotenv.md \ - website/docs/config/options.md \ - website/docs/config/aider_conf.md + aider/website/index.md \ + aider/website/HISTORY.md \ + aider/website/docs/commands.md \ + aider/website/docs/languages.md \ + aider/website/docs/config/dotenv.md \ + aider/website/docs/config/options.md \ + aider/website/docs/config/aider_conf.md From 929aa7f9acff0a9c5f14b6452f3a26414c337ed2 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 10:18:34 -0300 Subject: [PATCH 26/39] refac to help_pats --- aider/help.py | 12 +----------- aider/help_pats.py | 10 ++++++++++ setup.py | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 aider/help_pats.py diff --git a/aider/help.py b/aider/help.py index f839ed5cc..5d9d6d5df 100755 --- a/aider/help.py +++ b/aider/help.py @@ -8,20 +8,10 @@ import importlib_resources from aider import __version__ from aider.dump import dump # noqa: F401 +from aider.help_pats import exclude_website_pats warnings.simplefilter("ignore", category=FutureWarning) -exclude_website_pats = [ - "examples/**", - "_posts/**", - "HISTORY.md", - "docs/benchmarks*md", - "docs/ctags.md", - "docs/unified-diffs.md", - "docs/leaderboards/index.md", - "assets/**", -] - def get_package_files(): for path in importlib_resources.files("aider.website").iterdir(): diff --git a/aider/help_pats.py b/aider/help_pats.py new file mode 100644 index 000000000..6a2c20a0b --- /dev/null +++ b/aider/help_pats.py @@ -0,0 +1,10 @@ +exclude_website_pats = [ + "examples/**", + "_posts/**", + "HISTORY.md", + "docs/benchmarks*md", + "docs/ctags.md", + "docs/unified-diffs.md", + "docs/leaderboards/index.md", + "assets/**", +] diff --git a/setup.py b/setup.py index 8fd34532b..60dfc95b4 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open("requirements.txt") as f: requirements = f.read().splitlines() from aider import __version__ -from aider.help import exclude_website_pats +from aider.help_pats import exclude_website_pats with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() From 2a506d4d1581a9a426abdad7148a6d932a33786b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 13:30:18 -0300 Subject: [PATCH 27/39] update jekyll to aider/website/ --- scripts/jekyll_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/jekyll_run.sh b/scripts/jekyll_run.sh index a2ea847d5..97aa071ff 100755 --- a/scripts/jekyll_run.sh +++ b/scripts/jekyll_run.sh @@ -3,7 +3,7 @@ # Run the Docker container docker run \ --rm \ - -v "$PWD/website:/site" \ + -v "$PWD/aider/website:/site" \ -p 4000:4000 \ -e HISTFILE=/site/.bash_history \ -it \ From 9ab36b565da8120e526bae6f3c6e1a8cf9abc744 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 13:38:06 -0300 Subject: [PATCH 28/39] better in chat commands table --- aider/commands.py | 10 +++++--- aider/website/docs/commands.md | 42 +++++++++++++++++++--------------- aider/website/docs/usage.md | 2 +- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 4c8933f7e..571b9372b 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -680,17 +680,21 @@ class Commands: def get_help_md(self): "Show help about all commands in markdown" - res = "" + res = """ +|Command|Description| +|:------|:----------| +""" commands = sorted(self.get_commands()) for cmd in commands: cmd_method_name = f"cmd_{cmd[1:]}" cmd_method = getattr(self, cmd_method_name, None) if cmd_method: description = cmd_method.__doc__ - res += f"- **{cmd}** {description}\n" + res += f"| **{cmd}** | {description} |\n" else: - res += f"- **{cmd}**\n" + res += f"| **{cmd}** | |\n" + res += "\n" return res def cmd_voice(self, args): diff --git a/aider/website/docs/commands.md b/aider/website/docs/commands.md index 0188aa4ef..3196a4f76 100644 --- a/aider/website/docs/commands.md +++ b/aider/website/docs/commands.md @@ -11,25 +11,29 @@ Aider supports commands from within the chat, which all start with `/`. from aider.commands import get_help_md cog.out(get_help_md()) ]]]--> -- **/add** Add files to the chat so GPT can edit them or review them in detail -- **/clear** Clear the chat history -- **/commit** Commit edits to the repo made outside the chat (commit message optional) -- **/diff** Display the diff of the last aider commit -- **/drop** Remove files from the chat session to free up context space -- **/exit** Exit the application -- **/git** Run a git command -- **/help** Ask questions about aider -- **/lint** Lint and fix provided files or in-chat files if none provided -- **/ls** List all known files and indicate which are included in the chat session -- **/model** Switch to a new LLM -- **/models** Search the list of available models -- **/quit** Exit the application -- **/run** Run a shell command and optionally add the output to the chat (alias: !) -- **/test** Run a shell command and add the output to the chat on non-zero exit code -- **/tokens** Report on the number of tokens used by the current chat context -- **/undo** Undo the last git commit if it was done by aider -- **/voice** Record and transcribe voice input -- **/web** Use headless selenium to scrape a webpage and add the content to the chat + +|Command|Description| +|:------|:----------| +| **/add** | Add files to the chat so GPT can edit them or review them in detail | +| **/clear** | Clear the chat history | +| **/commit** | Commit edits to the repo made outside the chat (commit message optional) | +| **/diff** | Display the diff of the last aider commit | +| **/drop** | Remove files from the chat session to free up context space | +| **/exit** | Exit the application | +| **/git** | Run a git command | +| **/help** | Ask questions about aider | +| **/lint** | Lint and fix provided files or in-chat files if none provided | +| **/ls** | List all known files and indicate which are included in the chat session | +| **/model** | Switch to a new LLM | +| **/models** | Search the list of available models | +| **/quit** | Exit the application | +| **/run** | Run a shell command and optionally add the output to the chat (alias: !) | +| **/test** | Run a shell command and add the output to the chat on non-zero exit code | +| **/tokens** | Report on the number of tokens used by the current chat context | +| **/undo** | Undo the last git commit if it was done by aider | +| **/voice** | Record and transcribe voice input | +| **/web** | Use headless selenium to scrape a webpage and add the content to the chat | + # Entering multi-line chat messages diff --git a/aider/website/docs/usage.md b/aider/website/docs/usage.md index ad6bf5870..c84d0dfd6 100644 --- a/aider/website/docs/usage.md +++ b/aider/website/docs/usage.md @@ -30,7 +30,7 @@ Git repo: .git with 258 files Repo-map: using 1024 tokens Use /help to see in-chat commands, run with --help to see cmd line args ─────────────────────────────────────────────────────────────────────── ->`Make a program that asks for a number and prints its factorial +> Make a program that asks for a number and prints its factorial ... ``` From cd81e967f39d53523a2573515ba7c16ad5d596f4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 5 Jul 2024 14:05:26 -0300 Subject: [PATCH 29/39] Added tips --- aider/args_formatter.py | 4 ++++ aider/website/_config.yml | 5 +++++ aider/website/_includes/env-keys-tip.md | 6 ++++++ aider/website/_includes/help-tip.md | 4 ++++ aider/website/_includes/model-warnings.md | 5 +++-- aider/website/assets/sample.aider.conf.yml | 4 ++++ aider/website/docs/config.md | 3 +++ aider/website/docs/config/aider_conf.md | 6 ++++++ aider/website/docs/faq.md | 2 ++ aider/website/docs/troubleshooting.md | 2 ++ aider/website/docs/usage.md | 20 +++++++++++++------- 11 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 aider/website/_includes/env-keys-tip.md create mode 100644 aider/website/_includes/help-tip.md diff --git a/aider/args_formatter.py b/aider/args_formatter.py index cc7e3e73d..f2f1df195 100644 --- a/aider/args_formatter.py +++ b/aider/args_formatter.py @@ -96,6 +96,10 @@ class YamlHelpFormatter(argparse.HelpFormatter): # Place in your home dir, or at the root of your git repo. ########################################################## +# Note: You can only put OpenAI and Anthropic API keys in the yaml +# config file. Keys for all APIs can be stored in a .env file +# https://aider.chat/docs/config/dotenv.html + """ def _format_action(self, action): diff --git a/aider/website/_config.yml b/aider/website/_config.yml index 7d8f53af0..b95a2a158 100644 --- a/aider/website/_config.yml +++ b/aider/website/_config.yml @@ -37,3 +37,8 @@ nav_external_links: url: "https://discord.gg/Tv2uQnR88V" repository: paul-gauthier/aider + +callouts: + tip: + title: Tip + color: green \ No newline at end of file diff --git a/aider/website/_includes/env-keys-tip.md b/aider/website/_includes/env-keys-tip.md new file mode 100644 index 000000000..634c41d06 --- /dev/null +++ b/aider/website/_includes/env-keys-tip.md @@ -0,0 +1,6 @@ +{: .tip } +All API keys can be stored in a +Use a [.env file](/docs/config/dotenv.html) to store API keys. +OpenAI and Anthropic keys can be stored in the +[YAML config file](/docs/config/aider_conf.html). + diff --git a/aider/website/_includes/help-tip.md b/aider/website/_includes/help-tip.md new file mode 100644 index 000000000..0f90d0d46 --- /dev/null +++ b/aider/website/_includes/help-tip.md @@ -0,0 +1,4 @@ +{: .tip } +Use `/help ` to ask aider about itself. +You can ask how to customize options or troubleshoot +errors and warnings. diff --git a/aider/website/_includes/model-warnings.md b/aider/website/_includes/model-warnings.md index aaba1f0b1..bcf483b48 100644 --- a/aider/website/_includes/model-warnings.md +++ b/aider/website/_includes/model-warnings.md @@ -5,8 +5,6 @@ Model foobar: Unknown context window size and costs, using sane defaults. ``` -*You can probably ignore the unknown context window size and token costs warning.* - If you specify a model that aider has never heard of, you will get this warning. This means aider doesn't know the context window size and token costs @@ -18,6 +16,9 @@ See the docs on [configuring advanced model settings](/docs/config/adv-model-settings.html) for details on how to remove this warning. +{: .tip } +You can probably ignore the unknown context window size and token costs warning. + ## Did you mean? If aider isn't familiar with the model you've specified, diff --git a/aider/website/assets/sample.aider.conf.yml b/aider/website/assets/sample.aider.conf.yml index afadcbecb..e5bc4ca95 100644 --- a/aider/website/assets/sample.aider.conf.yml +++ b/aider/website/assets/sample.aider.conf.yml @@ -4,6 +4,10 @@ # Place in your home dir, or at the root of your git repo. ########################################################## +# Note: You can only put OpenAI and Anthropic API keys in the yaml +# config file. Keys for all APIs can be stored in a .env file +# https://aider.chat/docs/config/dotenv.html + ########## # options: diff --git a/aider/website/docs/config.md b/aider/website/docs/config.md index 1aeb6e975..40087c936 100644 --- a/aider/website/docs/config.md +++ b/aider/website/docs/config.md @@ -39,3 +39,6 @@ Using an `.env` file: ``` AIDER_DARK_MODE=true ``` + +{% include env-keys-tip.md %} + diff --git a/aider/website/docs/config/aider_conf.md b/aider/website/docs/config/aider_conf.md index da7c02831..6a6799ab8 100644 --- a/aider/website/docs/config/aider_conf.md +++ b/aider/website/docs/config/aider_conf.md @@ -16,6 +16,8 @@ Below is a sample of the file, which you can also [download from GitHub](https://github.com/paul-gauthier/aider/blob/main/aider/website/assets/sample.aider.conf.yml). +{% include env-keys-tip.md %} +