Skip to content

Commit

Permalink
fix: improved shell tool preview format
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Oct 19, 2024
1 parent acd0cee commit 756e420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gptme/tools/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ def execute_shell(
if cmd.startswith("$ "):
cmd = cmd[len("$ ") :]

print_preview(f"$ {cmd}", "bash")
if not confirm(f"Run command `{cmd}`?"):
print_preview(cmd, "bash")
if not confirm("Run command?"):
yield Message("system", "Command not run")
return

Expand Down

0 comments on commit 756e420

Please sign in to comment.