From 2043da78d71f3f43e6f299844be882c0e8c036b5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 28 Jul 2024 19:25:35 -0300 Subject: [PATCH] Add support for new editing modes in the `aider` tool. --- aider/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 41213fc14..69bd4c7db 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -6,7 +6,7 @@ from pathlib import Path import git -from aider import models, prompts, voice +from aider import models, prompts, voice, coders from aider.help import Help, install_help_extra from aider.llm import litellm from aider.scrape import Scraper, install_playwright @@ -48,7 +48,8 @@ class Commands: "Switch to a new editing mode" ef = args.strip() - valid_formats = [coder.edit_format for coder in self.coder.__all__ if hasattr(coder, 'edit_format')] + valid_formats = [coder.edit_format for coder in coders.__all__ if getattr(coder, 'edit_format', None)] + dump(valid_formats) if ef not in valid_formats: self.io.tool_error(