newPressedActions property

List<PressedAction> get newPressedActions

The actions of views the agent drew that the user pressed, from the new app notes, oldest first.

Implementation

List<PressedAction> get newPressedActions => [
  for (final note in newNotes)
    if (note
        case {'pressed': final String tool, 'status': final Object? status} &&
            final Map<String, Object?> json)
      if (ToolStatus.named(status) case final status?)
        PressedAction._(
          tool,
          arguments: json['arguments'],
          status: status,
          answer: {...json}
            ..remove('pressed')
            ..remove('arguments'),
        ),
];