cancelOperation method
Cancel an operation
Implementation
void cancelOperation(String operationId) {
final operation = _pendingOperations[operationId];
if (operation != null) {
operation.isCancelled = true;
// Don't remove from _pendingOperations yet, keep for status checking
// Notify the session about cancellation
_sendNotification(operation.sessionId, 'notifications/cancelled', {
'operationId': operationId,
'reason': 'Operation cancelled by server',
});
_logger.info('Cancelled operation: $operationId');
}
}