Better visible error message for cancel

Refs #1005
This commit is contained in:
Simon Willison 2025-05-12 21:08:03 -07:00
parent 9650c5de10
commit 336948f8fe

View file

@ -794,7 +794,7 @@ def prompt(
err=True,
)
if not click.confirm("Approve tool call?"):
raise CancelToolCall()
raise CancelToolCall("User cancelled tool call")
kwargs["before_call"] = approve_tool_call
# Look up all those tools