Skip to content

Commit

Permalink
Merge remote-tracking branch 'them/main' into feat/add-process-commen…
Browse files Browse the repository at this point in the history
…ts-cmd
  • Loading branch information
aweis89 committed Jan 21, 2025
2 parents 6c53990 + 843720a commit a271719
Show file tree
Hide file tree
Showing 40 changed files with 1,480 additions and 700 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ on:
push:
paths-ignore:
- 'aider/website/**'
- README.md
- HISTORY.md
- 'README.md'
- 'HISTORY.md'
- '.github/workflows/*'
- '!.github/workflows/docker-build-test.yml'
branches:
- main
pull_request:
paths-ignore:
- 'aider/website/**'
- README.md
- 'README.md'
- 'HISTORY.md'
- '.github/workflows/*'
- '!.github/workflows/docker-build-test.yml'
branches:
- main

Expand All @@ -31,12 +36,24 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push Docker images
- name: Build Docker images (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
target: aider

- name: Build Docker images (Push)
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -46,7 +63,18 @@ jobs:
tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:dev
target: aider

- name: Build and push Docker full image
- name: Build Docker full image (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
target: aider-full

- name: Build Docker full image (Push)
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v5
with:
context: .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- "main"
paths:
- "aider/website/**"
- ".github/workflows/pages.yml"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -55,10 +56,9 @@ jobs:
env:
JEKYLL_ENV: production
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: "aider/website/_site/"
path: "aider/website/_site"

# Deployment job
deploy:
Expand All @@ -70,7 +70,7 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ubuntu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ on:
push:
paths-ignore:
- 'aider/website/**'
- README.md
- HISTORY.md
- 'README.md'
- 'HISTORY.md'
- '.github/workflows/*'
- '!.github/workflows/ubuntu-tests.yml'
branches:
- main
pull_request:
paths-ignore:
- 'aider/website/**'
- README.md
- 'README.md'
- 'HISTORY.md'
- '.github/workflows/*'
- '!.github/workflows/ubuntu-tests.yml'
branches:
- main

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/windows-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ on:
push:
paths-ignore:
- 'aider/website/**'
- README.md
- HISTORY.md
- 'README.md'
- 'HISTORY.md'
- '.github/workflows/*'
- '!.github/workflows/windows-tests.yml'
branches:
- main
pull_request:
paths-ignore:
- 'aider/website/**'
- README.md
- 'README.md'
- 'HISTORY.md'
- '.github/workflows/*'
- '!.github/workflows/windows-tests.yml'
branches:
- main

Expand Down
19 changes: 17 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Release history

### Aider v0.72.1

- Fix model metadata for `openrouter/deepseek/deepseek-r1`

### Aider v0.72.0

- Support for DeepSeek R1.
- Use shortcut: `--model r1`
- Also via OpenRouter: `--model openrouter/deepseek/deepseek-r1`
- Added Kotlin syntax support to repo map, by Paul Walker.
- Added `--line-endings` for file writing, by Titusz Pan.
- Added examples_as_sys_msg=True for GPT-4o models, improves benchmark scores.
- Bumped all dependencies, to pick up litellm support for o1 system messages.
- Bugfix for turn taking when reflecting lint/test errors.
- Aider wrote 52% of the code in this release.

### Aider v0.71.1

- Fix permissions issue in Docker images.
- Added read-only file announcements to chat.
- Added read-only file announcements.
- Bugfix: ASCII fallback for unicode errors.
- Bugfix: integer indices for list slicing in repomap calculations.
- Aider wrote 83% of the code in this release.

### Aider v0.71.0

Expand Down
2 changes: 1 addition & 1 deletion aider/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from packaging import version

__version__ = "0.71.2.dev"
__version__ = "0.72.2.dev"
safe_version = __version__

try:
Expand Down
16 changes: 9 additions & 7 deletions aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ def __init__(

self.summarizer_thread = None
self.summarized_done_messages = []
self.summarizing_messages = None

if not self.done_messages and restore_chat_history:
history_md = self.io.read_text(self.io.chat_history_file)
Expand Down Expand Up @@ -942,8 +943,9 @@ def summarize_start(self):
self.summarizer_thread.start()

def summarize_worker(self):
self.summarizing_messages = list(self.done_messages)
try:
self.summarized_done_messages = self.summarizer.summarize(self.done_messages)
self.summarized_done_messages = self.summarizer.summarize(self.summarizing_messages)
except ValueError as err:
self.io.tool_warning(err.args[0])

Expand All @@ -957,7 +959,9 @@ def summarize_end(self):
self.summarizer_thread.join()
self.summarizer_thread = None

self.done_messages = self.summarized_done_messages
if self.summarizing_messages == self.done_messages:
self.done_messages = self.summarized_done_messages
self.summarizing_messages = None
self.summarized_done_messages = []

def move_back_cur_messages(self, message):
Expand Down Expand Up @@ -1327,6 +1331,8 @@ def send_message(self, inp):
self.num_exhausted_context_windows += 1
return

self.add_assistant_reply_to_cur_messages()

if self.partial_response_function_call:
args = self.parse_partial_args()
if args:
Expand Down Expand Up @@ -1359,8 +1365,6 @@ def send_message(self, inp):

edited = self.apply_updates()

self.update_cur_messages()

if edited:
self.aider_edited_files.update(edited)
saved_message = self.auto_commit(edited)
Expand All @@ -1381,7 +1385,6 @@ def send_message(self, inp):
ok = self.io.confirm_ask("Attempt to fix lint errors?")
if ok:
self.reflected_message = lint_errors
self.update_cur_messages()
return

shared_output = self.run_shell_commands()
Expand All @@ -1398,7 +1401,6 @@ def send_message(self, inp):
ok = self.io.confirm_ask("Attempt to fix test errors?")
if ok:
self.reflected_message = test_errors
self.update_cur_messages()
return

def reply_completed(self):
Expand Down Expand Up @@ -1474,7 +1476,7 @@ def lint_edited(self, fnames):

return res

def update_cur_messages(self):
def add_assistant_reply_to_cur_messages(self):
if self.partial_response_content:
self.cur_messages += [dict(role="assistant", content=self.partial_response_content)]
if self.partial_response_function_call:
Expand Down
2 changes: 1 addition & 1 deletion aider/coders/single_wholefile_func_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs):
self.gpt_prompts = SingleWholeFileFunctionPrompts()
super().__init__(*args, **kwargs)

def update_cur_messages(self, edited):
def add_assistant_reply_to_cur_messages(self, edited):
if edited:
self.cur_messages += [
dict(role="assistant", content=self.gpt_prompts.redacted_edit_message)
Expand Down
2 changes: 1 addition & 1 deletion aider/coders/wholefile_func_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self, *args, **kwargs):
self.gpt_prompts = WholeFileFunctionPrompts()
super().__init__(*args, **kwargs)

def update_cur_messages(self, edited):
def add_assistant_reply_to_cur_messages(self, edited):
if edited:
self.cur_messages += [
dict(role="assistant", content=self.gpt_prompts.redacted_edit_message)
Expand Down
8 changes: 7 additions & 1 deletion aider/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ def tokenize(self, messages):
return sized

def summarize(self, messages, depth=0):
messages = self.summarize_real(messages)
if messages and messages[-1]["role"] != "assistant":
messages.append(dict(role="assistant", content="Ok."))
return messages

def summarize_real(self, messages, depth=0):
if not self.models:
raise ValueError("No models available for summarization")

Expand Down Expand Up @@ -88,7 +94,7 @@ def summarize(self, messages, depth=0):
if summary_tokens + tail_tokens < self.max_tokens:
return result

return self.summarize(result, depth + 1)
return self.summarize_real(result, depth + 1)

def summarize_all(self, messages):
content = ""
Expand Down
Loading

0 comments on commit a271719

Please sign in to comment.