diff --git a/HISTORY.md b/HISTORY.md index 6cf4e3304..e7201212b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,8 +1,13 @@ # Release history -### main branch +### v0.11.1 -- Fixed /commit bug from repo refactor, added test coverage +- Added a progress bar when initially creating a repo map. +- Fixed bad commit message when adding new file to empty repo. +- Fixed corner case of pending chat history summarization when dirty committing. +- Fixed corner case of undefined `text` when using `--no-pretty`. +- Fixed /commit bug from repo refactor, added test coverage. +- [Benchmarked](https://aider.chat/docs/benchmarks.html) at 53.4% for gpt-3.5/whole (no regression). ### v0.11.0 diff --git a/README.md b/README.md index cf5e4e959..21bb06b85 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ -# aider is GPT powered coding in your terminal +# aider is AI pair programming in your terminal -`aider` is a command-line chat tool that allows you to write and edit -code with OpenAI's GPT models. You can ask GPT to help you start -a new project, or modify code in your existing git repo. -Aider makes it easy to -[git commit, diff & undo changes](https://aider.chat/docs/faq.html#how-does-aider-use-git) -proposed by GPT without copy/pasting. -It also has features that [help GPT-4 understand and modify larger codebases](https://aider.chat/docs/ctags.html). +Aider is a command line tool that lets you pair program with GPT-3.5/GPT-4, +to edit code stored in your local git repository. +You can start a new project or work with an existing repo. +And you can fluidly switch back and forth between the aider chat where you ask +GPT to edit the code and your own editor to make changes yourself. +Aider makes sure edits from you and GPT are +[committed to git](https://aider.chat/docs/faq.html#how-does-aider-use-git) +with sensible commit messages. +Aider is unique in that it [works well with pre-existing, larger codebases](https://aider.chat/docs/ctags.html).
@@ -43,7 +45,7 @@ $ aider hello.js
Using git repo: .git
Added hello.js to the chat.
-hello.js> write a js app that prints hello world
+hello.js> write a js script that prints hello world
```
## Example chat transcripts
diff --git a/_layouts/default.html b/_layouts/default.html
index 771b6635a..8e4956b1a 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -20,7 +20,7 @@
aider
- GPT powered coding in your terminal
+ AI pair programming in your terminal
{% else %}
{{ page.title | default: site.title | default: site.github.repository_name }}
{{ page.description | default: site.description | default: site.github.project_tagline }}
diff --git a/aider/__init__.py b/aider/__init__.py
index f092757d2..2093e1749 100644
--- a/aider/__init__.py
+++ b/aider/__init__.py
@@ -1 +1 @@
-__version__ = "0.11.1-dev"
+__version__ = "0.11.2-dev"
diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py
index 07a0974b9..6b821ba9e 100755
--- a/aider/coders/base_coder.py
+++ b/aider/coders/base_coder.py
@@ -365,8 +365,8 @@ class Coder:
if not self.summarizer.too_big(self.done_messages):
return
- assert self.summarizer_thread is None
- assert self.summarized_done_messages is None
+ self.summarize_end()
+
if self.verbose:
self.io.tool_output("Starting to summarize chat history.")
@@ -653,6 +653,9 @@ class Coder:
live.start()
for chunk in completion:
+ if len(chunk.choices) == 0:
+ continue
+
if chunk.choices[0].finish_reason == "length":
raise ExhaustedContextWindow()
@@ -672,11 +675,11 @@ class Coder:
if text:
self.partial_response_content += text
except AttributeError:
- pass
+ text = None
if self.pretty:
self.live_incremental_response(live, False)
- else:
+ elif text:
sys.stdout.write(text)
sys.stdout.flush()
finally:
diff --git a/aider/commands.py b/aider/commands.py
index b6d214006..463b69f91 100644
--- a/aider/commands.py
+++ b/aider/commands.py
@@ -350,8 +350,9 @@ class Commands:
combined_output = None
try:
parsed_args = shlex.split("git " + args)
+ env = dict(GIT_EDITOR="true", **subprocess.os.environ)
result = subprocess.run(
- parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True
+ parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, env=env
)
combined_output = result.stdout
except Exception as e:
diff --git a/aider/repo.py b/aider/repo.py
index 16bcc45e4..28b3c700d 100644
--- a/aider/repo.py
+++ b/aider/repo.py
@@ -126,19 +126,11 @@ class GitRepo:
return commit_message
def get_diffs(self, pretty, *args):
- try:
- commits = self.repo.iter_commits(self.repo.active_branch)
- current_branch_has_commits = any(commits)
- except git.exc.GitCommandError:
- current_branch_has_commits = False
-
- if not current_branch_has_commits:
- return ""
+ # we always want diffs of working-dir + index versus repo
+ args = ["--cached"] + list(args)
if pretty:
args = ["--color"] + list(args)
- if not args:
- args = ["HEAD"]
diffs = self.repo.git.diff(*args)
return diffs
diff --git a/aider/repomap.py b/aider/repomap.py
index defc4ed4b..5f9ae3a8a 100644
--- a/aider/repomap.py
+++ b/aider/repomap.py
@@ -307,6 +307,10 @@ class RepoMap:
self.cache_missing = False
for fname in fnames:
+ if not Path(fname).is_file():
+ self.io.tool_error(f"Repo-map can't include {fname}")
+ continue
+
# dump(fname)
rel_fname = os.path.relpath(fname, self.root)
diff --git a/assets/css/style.scss b/assets/css/style.scss
index 47cd764ba..9c6a1cd09 100644
--- a/assets/css/style.scss
+++ b/assets/css/style.scss
@@ -41,6 +41,10 @@
color: #00FFFF;
}
+.chat-transcript h1 {
+ display: none;
+}
+
.chat-transcript h4 {
color: #32FF32;
border-top: 1px solid #32FF32;
diff --git a/docs/faq.md b/docs/faq.md
index 58ce94a46..789adecb5 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -107,41 +107,30 @@ In these cases, here are some things you might try:
## Can I use aider with other LLMs, local LLMs, etc?
-Aider does not officially support use with LLMs other than OpenAI's gpt-3.5-turbo and gpt-4
-and their variants.
-This is because while it's "easy" to connect aider to a new LLM, it's "hard"
-to actually teach new LLMs to *edit* code.
+Aider only has experimental support for LLMs other than OpenAI's GPT-3.5 and GPT-4. This is for two reasons:
-GPT-3.5 is just barely able to understand how to modify existing source code files,
-and GPT-4 is quite good at it.
-Getting them working that well was a significant undertaking, involving
-[specific code editing prompts and backends for each model and extensive benchmarking](https://aider.chat/docs/benchmarks.html).
-Officially supporting new LLMs will probably require a similar effort to tailor the
-prompts and editing backends.
+- GPT-3.5 is just barely capable of *editing code* to provide aider's interactive "pair programming" style workflow. None of the other models seem to be as capable as GPT-3.5.
+- Just "hooking up" aider to a new model by connecting to its API is almost certainly not enough to get it working in a useful way. Getting aider working well with GPT-3.5 and GPT-4 was a significant undertaking, involving [specific code editing prompts and backends for each model and extensive benchmarking](https://aider.chat/docs/benchmarks.html). Officially supporting each new LLM will probably require a similar effort to tailor the prompts and editing backends.
-That said, aider does provide some features to experiment with other models.
-Numerous users have already done experiments with numerous models.
-So far, no one has reported much success in working with them the way aider
-can work with GPT-3.5 and GPT-4.
+That said, aider does provide features to experiment with other models. Numerous users have already done experiments with numerous models. None of these experiments have yet identified other models that look like they are capable of working with aider.
-Once we see signs that a *particular* model is capable of code editing,
-it would be reasonable for aider to attempt to officially support such a model.
-Until then, aider will simply maintain experimental support for using alternative models.
+Once we see signs that a *particular* model is capable of code editing, it would be reasonable for aider to attempt to officially support such a model. Until then, aider will simply maintain experimental support for using alternative models.
+
+There are ongoing discussions about [LLM integrations in the aider discord](https://discord.com/channels/1131200896827654144/1133060780649087048).
+
+Here are some [GitHub issues which may contain relevant information](https://github.com/paul-gauthier/aider/issues?q=is%3Aissue+%23172).
### OpenAI API compatible LLMs
If you can make the model accessible via an OpenAI compatible API,
you can use `--openai-api-base` to connect to a different API endpoint.
-Here are some
-[GitHub issues which may contain relevant information](https://github.com/paul-gauthier/aider/issues?q=is%3Aissue+%22openai-api-base%22+).
-
### Local LLMs
[LocalAI](https://github.com/go-skynet/LocalAI)
and
[SimpleAI](https://github.com/lhenault/simpleAI)
-look like relevant tools to serve local models via a compatible API:
+look like relevant tools to serve local models via a compatible API.
### Azure
diff --git a/hello.py b/hello.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/share/index.md b/share/index.md
new file mode 100644
index 000000000..b323163d3
--- /dev/null
+++ b/share/index.md
@@ -0,0 +1,69 @@
+
+# Shared aider chat transcript
+
+A user has shared the following transcript of a pair programming chat session
+created using aider.
+Aider is a command line tool that lets you pair program with GPT-3.5 or
+GPT-4, to edit code stored in your local git repository.
+
+## Transcript format
+
+