mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
feat: add custom UnknownEditFormat exception with documentation link
This commit is contained in:
parent
bbd81c3cf7
commit
75bc2dd564
3 changed files with 8 additions and 2 deletions
|
@ -22,7 +22,7 @@ from typing import List
|
|||
from aider import __version__, models, prompts, urls, utils
|
||||
from aider.analytics import Analytics
|
||||
from aider.commands import Commands
|
||||
from aider.exceptions import LiteLLMExceptions
|
||||
from aider.exceptions import LiteLLMExceptions, UnknownEditFormat
|
||||
from aider.history import ChatSummary
|
||||
from aider.io import ConfirmGroup, InputOutput
|
||||
from aider.linter import Linter
|
||||
|
@ -157,7 +157,8 @@ class Coder:
|
|||
res.original_kwargs = dict(kwargs)
|
||||
return res
|
||||
|
||||
raise ValueError(f"Unknown edit format {edit_format}")
|
||||
valid_formats = [c.edit_format for c in coders.__all__ if hasattr(c, "edit_format")]
|
||||
raise UnknownEditFormat(edit_format, valid_formats)
|
||||
|
||||
def clone(self, **kwargs):
|
||||
new_coder = Coder.create(from_coder=self, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue