Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@ OPENROUTER_API_KEY="..."
DEEPSEEK_API_KEY="..."
```

### Run Program

If you are in the directory with your .aider.conf.yml file, then simply running `aider-ce` or `cecli` will start the agent with your configuration. If you want additional sandboxing, we publish a docker container that can be ran as follows:

```bash
docker pull dustinwashington/aider-ce
docker run \
-it \
--user $(id -u):$(id -g) \
--volume $(pwd):/app dustinwashington/aider-ce \
--volume $(pwd)/.aider.conf.yml:/.aider.conf.yml \
--volume $(pwd)/.aider.env:/.aider/.env \
--config /app/.aider.conf.yml
```

This command will make sure all commands ran by the coding agent happen in context of the docker container to protect the house file system for any infamous agentic mishap

## Project Roadmap/Goals

The current priorities are to improve core capabilities and user experience of the Aider project
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.89.2.dev"
__version__ = "0.89.3.dev"
safe_version = __version__

try:
Expand Down
2 changes: 1 addition & 1 deletion aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3804,7 +3804,7 @@ async def run_shell_commands(self):
self.commands.cmd_running = False

async def handle_shell_commands(self, commands_str, group):
commands = commands_str.strip().splitlines()
commands = commands_str.strip().split(";")
command_count = sum(
1 for cmd in commands if cmd.strip() and not cmd.strip().startswith("#")
)
Expand Down
17 changes: 16 additions & 1 deletion aider/coders/chat_chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,25 @@ def add_cache_control_headers(self):
# The history is ephemeral on its own.
self.add_cache_control(self.done)

# Per this: https://github.com/BerriAI/litellm/issues/10226
# The first and second to last messages are cache optimal
# Since caches are also written to incrementally and you need
# the past and current states to properly append and gain
# efficiencies/savings in cache writing
def add_cache_control(self, messages):
if not messages:
if not messages or len(messages) < 2:
return

content = messages[-2]["content"]
if type(content) is str:
content = dict(
type="text",
text=content,
)
content["cache_control"] = {"type": "ephemeral"}

messages[-2]["content"] = [content]

content = messages[-1]["content"]
if type(content) is str:
content = dict(
Expand Down
2 changes: 1 addition & 1 deletion aider/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class InputOutput:
bell_on_next_input = False
notifications_command = None
encoding = "utf-8"
VALID_STYLES = {"bold", "red", "green", "blue", "orange"}
VALID_STYLES = {"bold", "red", "green", "blue", "bright_cyan"}
VALID_OPEN_TAG_PATTERN = re.compile(
r"\\\[(" + "|".join(re.escape(s) for s in VALID_STYLES) + r")\]"
)
Expand Down
12 changes: 10 additions & 2 deletions aider/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,11 +977,19 @@ async def send_completion(
dump(kwargs)
kwargs["messages"] = messages

# Cache System Prompts When Possible
# Per this: https://github.com/BerriAI/litellm/issues/10226
# The first and second to last messages are cache optimal
# Since caches are also written to incrementally and you need
# the past and current states to properly append and gain
# efficiencies/savings in cache writing
kwargs["cache_control_injection_points"] = [
{
"location": "message",
"role": "system",
"index": -1,
},
{
"location": "message",
"index": -2,
},
]

Expand Down
4 changes: 2 additions & 2 deletions aider/tools/utils/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def color_markers(coder):
Args:
coder: An instance of base_coder
"""
color_start = "[blue]" if coder.pretty else ""
color_end = "[/blue]" if coder.pretty else ""
color_start = "[bright_cyan]" if coder.pretty else ""
color_end = "[/bright_cyan]" if coder.pretty else ""

return color_start, color_end
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ RUN uv pip install . && \
# Switch to appuser
USER appuser

ENTRYPOINT ["/venv/bin/aider"]
ENTRYPOINT ["/venv/bin/aider-ce"]
Loading