Exception: Assistant::Cancelled
- Inherits:
-
StandardError
- Object
- StandardError
- Assistant::Cancelled
- Defined in:
- app/services/assistant/cancelled.rb
Overview
Raised when the user clicks Stop and the cancellation must propagate up
the entire chat call stack — past the LLM tool loop, past ChatService,
back to AssistantChatWorker which discards the partial response.
The first defense is Assistant::ToolHalt returned from ToolLoopGuard's
preflight. That short-circuits the in-flight tool loop. This exception
is the second line of defense, raised from postflight when the cancel
flag flips DURING a tool execution (e.g. several parallel tool calls
were dispatched in one assistant turn and the user clicked Stop while
they were running).
Instance Method Summary collapse
Constructor Details
#initialize(message = 'User cancelled this request.') ⇒ void
18 19 20 |
# File 'app/services/assistant/cancelled.rb', line 18 def initialize( = 'User cancelled this request.') super end |