feat: add shell command suggestion toggle and related prompts

This commit is contained in:
Paul Gauthier 2024-09-07 07:17:05 -07:00
parent 304566a914
commit d2379a6d73
3 changed files with 26 additions and 1 deletions

View file

@ -923,10 +923,21 @@ class Coder:
lazy_prompt = self.gpt_prompts.lazy_prompt if self.main_model.lazy else ""
platform_text = self.get_platform_info()
if self.suggest_shell_commands:
shell_cmd_prompt = self.gpt_prompts.shell_cmd_prompt.format(platform=platform_text)
shell_cmd_reminder = self.gpt_prompts.shell_cmd_reminder.format(platform=platform_text)
else:
shell_cmd_prompt = self.gpt_prompts.no_shell_cmd_prompt.format(platform=platform_text)
shell_cmd_reminder = self.gpt_prompts.no_shell_cmd_reminder.format(
platform=platform_text
)
prompt = prompt.format(
fence=self.fence,
lazy_prompt=lazy_prompt,
platform=platform_text,
shell_cmd_prompt=shell_cmd_prompt,
shell_cmd_reminder=shell_cmd_reminder,
)
return prompt