mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
feat: Add all_fences list to base_coder.py
This commit is contained in:
parent
f064820f06
commit
f8a1db5318
1 changed files with 11 additions and 8 deletions
|
@ -51,6 +51,16 @@ def wrap_fence(name):
|
||||||
return f"<{name}>", f"</{name}>"
|
return f"<{name}>", f"</{name}>"
|
||||||
|
|
||||||
|
|
||||||
|
all_fences = [
|
||||||
|
("``" + "`", "``" + "`"),
|
||||||
|
wrap_fence("source"),
|
||||||
|
wrap_fence("code"),
|
||||||
|
wrap_fence("pre"),
|
||||||
|
wrap_fence("codeblock"),
|
||||||
|
wrap_fence("sourcecode"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ChatChunks:
|
class ChatChunks:
|
||||||
system: List = field(default_factory=list)
|
system: List = field(default_factory=list)
|
||||||
|
@ -503,14 +513,7 @@ class Coder:
|
||||||
self.abs_root_path_cache[key] = res
|
self.abs_root_path_cache[key] = res
|
||||||
return res
|
return res
|
||||||
|
|
||||||
fences = [
|
fences = all_fences
|
||||||
("``" + "`", "``" + "`"),
|
|
||||||
wrap_fence("source"),
|
|
||||||
wrap_fence("code"),
|
|
||||||
wrap_fence("pre"),
|
|
||||||
wrap_fence("codeblock"),
|
|
||||||
wrap_fence("sourcecode"),
|
|
||||||
]
|
|
||||||
fence = fences[0]
|
fence = fences[0]
|
||||||
|
|
||||||
def show_pretty(self):
|
def show_pretty(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue