isSlashCommand method

bool isSlashCommand(
  1. QueuedCommand cmd
)

Returns true if the command is a slash command that should be routed through processSlashCommand rather than sent to the model as text.

Implementation

bool isSlashCommand(QueuedCommand cmd) {
  if (cmd.value is! StringCommandValue) return false;
  final text = (cmd.value as StringCommandValue).value;
  return text.trim().startsWith('/') && !cmd.skipSlashCommands;
}