enqueuePendingNotification method

void enqueuePendingNotification(
  1. QueuedCommand command
)

Add a task notification. Defaults priority to 'later'.

Implementation

void enqueuePendingNotification(QueuedCommand command) {
  _commandQueue.add(
    QueuedCommand(
      value: command.value,
      mode: command.mode,
      priority: command.priority == QueuePriority.next
          ? QueuePriority.later
          : command.priority,
      skipSlashCommands: command.skipSlashCommands,
      isMeta: command.isMeta,
      agentId: command.agentId,
      origin: command.origin,
      pastedContents: command.pastedContents,
    ),
  );
  _notifySubscribers();
  final content = command.value is StringCommandValue
      ? (command.value as StringCommandValue).value
      : null;
  _logOperation(QueueOperation.enqueue, content);
}