<commit_before>json_messages = []
@messages.each do |message|
  if message.sender_id == current_user.id
    new_message = message.as_json(only: [:id, :word_count, :time_saved]).merge(disposition: 'sent')
    json_messages << new_message
  end

  if message.receiver_id == current_user.id
    new_message = message.as_json(only: [:id, :word_count, :time_saved]).merge(disposition: 'received')
    json_messages << new_message
  end
end

json.array!(messages: json_messages)
<commit_msg>Include created_at timestamp in messages<commit_after>json_messages = []
@messages.each do |message|
  if message.sender_id == current_user.id
    new_message = message.as_json(only: [:id, :time_saved, :created_at]).merge(disposition: 'sent')
    json_messages << new_message
  end

  if message.receiver_id == current_user.id
    new_message = message.as_json(only: [:id, :time_saved, :created_at]).merge(disposition: 'received')
    json_messages << new_message
  end
end

json.array!(messages: json_messages)

{'fraction_non_alphanumeric': 0.12637913741223672, 'fraction_numerical': 0.0, 'mean_word_length': 5.438709677419355, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3504026', 'n_tokens_mistral': 335, 'n_tokens_neox': 330, 'n_words': 66}