<commit_before>{View, $$} = require 'space-pen'
SelectList = require 'select-list'
Editor = require 'editor'
$ = require 'jquery'
_ = require 'underscore'

module.exports =
class EventPalette extends SelectList
  @activate: (rootView) ->
    requireStylesheet 'event-palette/event-palette.css'
    @instance = new EventPalette(rootView)
    rootView.on 'event-palette:toggle', => @instance.attach()

  @viewClass: ->
    "#{super} event-palette"

  filterKey: 'eventDescription'

  previouslyFocusedElement: null
  keyBindings: null

  initialize: (@rootView) ->
    @on 'event-palette:toggle', => @cancel()
    super
<commit_msg>Use `@command` to register EventPalette commands<commit_after>{View, $$} = require 'space-pen'
SelectList = require 'select-list'
Editor = require 'editor'
$ = require 'jquery'
_ = require 'underscore'

module.exports =
class EventPalette extends SelectList
  @activate: (rootView) ->
    requireStylesheet 'event-palette/event-palette.css'
    @instance = new EventPalette(rootView)
    rootView.command 'event-palette:toggle', => @instance.attach()

  @viewClass: ->
    "#{super} event-palette"

  filterKey: 'eventDescription'

  previouslyFocusedElement: null
  keyBindings: null

  initialize: (@rootView) ->
    @command 'event-palette:toggle', => @cancel()
    super

{'fraction_non_alphanumeric': 0.1371647509578544, 'fraction_numerical': 0.0, 'mean_word_length': 4.581196581196581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7583168', 'n_tokens_mistral': 415, 'n_tokens_neox': 410, 'n_words': 91}