(self, args, edit_format, placeholder=None)
| 1186 | return self._generic_chat_command(args, "context", placeholder=args.strip() or None) |
| 1187 | |
| 1188 | def _generic_chat_command(self, args, edit_format, placeholder=None): |
| 1189 | if not args.strip(): |
| 1190 | # Switch to the corresponding chat mode if no args provided |
| 1191 | return self.cmd_chat_mode(edit_format) |
| 1192 | |
| 1193 | from aider.coders.base_coder import Coder |
| 1194 | |
| 1195 | coder = Coder.create( |
| 1196 | io=self.io, |
| 1197 | from_coder=self.coder, |
| 1198 | edit_format=edit_format, |
| 1199 | summarize_from_coder=False, |
| 1200 | ) |
| 1201 | |
| 1202 | user_msg = args |
| 1203 | coder.run(user_msg) |
| 1204 | |
| 1205 | # Use the provided placeholder if any |
| 1206 | raise SwitchCoder( |
| 1207 | edit_format=self.coder.edit_format, |
| 1208 | summarize_from_coder=False, |
| 1209 | from_coder=coder, |
| 1210 | show_announcements=False, |
| 1211 | placeholder=placeholder, |
| 1212 | ) |
| 1213 | |
| 1214 | def get_help_md(self): |
| 1215 | "Show help about all commands in markdown" |
no test coverage detected