MCPcopy Create free account
hub / github.com/AI45Lab/Code / cancel

Method cancel

core/src/agent_api.rs:804–806  ·  view source on GitHub ↗

Cancel the current ongoing operation (send/stream). If an operation is in progress, this will trigger cancellation of the LLM streaming and tool execution. The operation will terminate as soon as possible. Returns `true` if an operation was cancelled, `false` if no operation was in progress.

(&self)

Source from the content-addressed store, hash-verified

802 ///
803 /// Returns `true` if an operation was cancelled, `false` if no operation was in progress.
804 pub async fn cancel(&self) -> bool {
805 RunControl::from_session(self).cancel_current().await
806 }
807
808 /// Cancel a specific run only if it is still the active run.
809 ///

Callers 1

cancel_subagent_taskMethod · 0.45

Calls 1

cancel_currentMethod · 0.80

Tested by

no test coverage detected