Standardize on canceled instead of cancelled (#36385)

Release Notes:

- N/A
This commit is contained in:
Ben Brandt 2025-08-18 06:07:32 +02:00 committed by GitHub
parent 7dc4adbd40
commit b3969ed427
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 28 additions and 29 deletions

View file

@ -360,7 +360,7 @@ pub enum ToolCallStatus {
Failed,
/// The user rejected the tool call.
Rejected,
/// The user cancelled generation so the tool call was cancelled.
/// The user canceled generation so the tool call was canceled.
Canceled,
}
@ -1269,19 +1269,19 @@ impl AcpThread {
Err(e)
}
result => {
let cancelled = matches!(
let canceled = matches!(
result,
Ok(Ok(acp::PromptResponse {
stop_reason: acp::StopReason::Cancelled
stop_reason: acp::StopReason::Canceled
}))
);
// We only take the task if the current prompt wasn't cancelled.
// We only take the task if the current prompt wasn't canceled.
//
// This prompt may have been cancelled because another one was sent
// This prompt may have been canceled because another one was sent
// while it was still generating. In these cases, dropping `send_task`
// would cause the next generation to be cancelled.
if !cancelled {
// would cause the next generation to be canceled.
if !canceled {
this.send_task.take();
}