Skip to content

Commit

Permalink
fix: informative message for agent when permission isn't granted (#223)
Browse files Browse the repository at this point in the history
* fix: informative message for agent when permission isn't granted

* chore: typo fix in comments
  • Loading branch information
0xbrayo authored Oct 31, 2024
1 parent 4665f49 commit 5ee0f2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gptme/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def execute_cmd(msg: Message, log: LogManager, confirm: ConfirmFunc) -> bool:
"""Executes any user-command, returns True if command was executed."""
assert msg.role == "user"

# if message starts with ., treat as command
# if message starts with / treat as command
# when command has been run,
if msg.content[:1] in ["/"]:
for resp in handle_cmd(msg.content, log, confirm):
Expand Down
2 changes: 1 addition & 1 deletion gptme/tools/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def execute_shell(
if not allowlisted:
print_preview(cmd, "bash")
if not confirm("Run command?"):
yield Message("system", "Command not run")
yield Message("system", "User chose not to run command.")
return

try:
Expand Down

0 comments on commit 5ee0f2f

Please sign in to comment.