mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
feat: Add placeholder parameter to SwitchCoder
This commit is contained in:
parent
4d61b596ff
commit
99b0209c89
2 changed files with 6 additions and 1 deletions
|
@ -28,8 +28,9 @@ from .dump import dump # noqa: F401
|
|||
|
||||
|
||||
class SwitchCoder(Exception):
|
||||
def __init__(self, **kwargs):
|
||||
def __init__(self, placeholder=None, **kwargs):
|
||||
self.kwargs = kwargs
|
||||
self.placeholder = placeholder
|
||||
|
||||
|
||||
class Commands:
|
||||
|
|
|
@ -1109,6 +1109,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
except SwitchCoder as switch:
|
||||
coder.ok_to_warm_cache = False
|
||||
|
||||
# Set the placeholder if provided
|
||||
if hasattr(switch, 'placeholder') and switch.placeholder is not None:
|
||||
io.placeholder = switch.placeholder
|
||||
|
||||
kwargs = dict(io=io, from_coder=coder)
|
||||
kwargs.update(switch.kwargs)
|
||||
if "show_announcements" in kwargs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue