<commit_before>{Emitter, Disposable} = require 'event-kit'
Message = require '../src/message'

# Experimental: Allows messaging the user. This will likely change, dont use
# quite yet!
module.exports =
class MessageManager
  constructor: ->
    @messages = []
    @emitter = new Emitter

  ###
  Section: Events
  ###

  onDidAddMessage: (callback) ->
    @emitter.on 'did-add-message', callback

  addSuccess: (messageString, options) ->
    @addMessage(new Message('success', messageString, options))

  addInfo: (messageString, options) ->
    @addMessage(new Message('info', messageString, options))

  addWarning: (messageString, options) ->
    @addMessage(new Message('warning', messageString, options))

  addError: (messageString, options) ->
    @addMessage(new Message('error', messageString, options))
<commit_msg>:memo:<commit_after>{Emitter, Disposable} = require 'event-kit'
Message = require '../src/message'

# Experimental: Allows messaging the user. This will likely change, dont use
# quite yet!
module.exports =
class MessageManager
  constructor: ->
    @messages = []
    @emitter = new Emitter

  ###
  Section: Events
  ###

  onDidAddMessage: (callback) ->
    @emitter.on 'did-add-message', callback

  ###
  Section: Adding Messages
  ###

  addSuccess: (messageString, options) ->
    @addMessage(new Message('success', messageString, options))

  addInfo: (messageString, options) ->
    @addMessage(new Message('info', messageString, options))

  addWarning: (messageString, options) ->
    @addMessage(new Message('warning', messageString, options))

  addError: (messageString, options) ->
    @addMessage(new Message('error', messageString, options))

{'fraction_non_alphanumeric': 0.1394658753709199, 'fraction_numerical': 0.0, 'mean_word_length': 4.456310679611651, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '634270', 'n_tokens_mistral': 500, 'n_tokens_neox': 475, 'n_words': 129}