Skip to content

Commit be87ff0

Browse files
committed
feat: Set placeholder with args in /context command
1 parent c7fe860 commit be87ff0

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

aider/commands.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,12 +1167,22 @@ def _generic_chat_command(self, args, edit_format):
11671167
user_msg = args
11681168
coder.run(user_msg)
11691169

1170-
raise SwitchCoder(
1171-
edit_format=self.coder.edit_format,
1172-
summarize_from_coder=False,
1173-
from_coder=coder,
1174-
show_announcements=False,
1175-
)
1170+
# When using context command, set the placeholder to the args
1171+
if edit_format == "context" and args.strip():
1172+
raise SwitchCoder(
1173+
edit_format=self.coder.edit_format,
1174+
summarize_from_coder=False,
1175+
from_coder=coder,
1176+
show_announcements=False,
1177+
placeholder=args,
1178+
)
1179+
else:
1180+
raise SwitchCoder(
1181+
edit_format=self.coder.edit_format,
1182+
summarize_from_coder=False,
1183+
from_coder=coder,
1184+
show_announcements=False,
1185+
)
11761186

11771187
def get_help_md(self):
11781188
"Show help about all commands in markdown"

0 commit comments

Comments
 (0)