Skip to content

Commit 99b0209

Browse files
committed
feat: Add placeholder parameter to SwitchCoder
1 parent 4d61b59 commit 99b0209

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

aider/commands.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828

2929

3030
class SwitchCoder(Exception):
31-
def __init__(self, **kwargs):
31+
def __init__(self, placeholder=None, **kwargs):
3232
self.kwargs = kwargs
33+
self.placeholder = placeholder
3334

3435

3536
class Commands:

aider/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,10 @@ def get_io(pretty):
11091109
except SwitchCoder as switch:
11101110
coder.ok_to_warm_cache = False
11111111

1112+
# Set the placeholder if provided
1113+
if hasattr(switch, 'placeholder') and switch.placeholder is not None:
1114+
io.placeholder = switch.placeholder
1115+
11121116
kwargs = dict(io=io, from_coder=coder)
11131117
kwargs.update(switch.kwargs)
11141118
if "show_announcements" in kwargs:

0 commit comments

Comments
 (0)