<commit_before>const {CompositeDisposable} = require('atom')

const KeyBindingResolverView = require('./keybinding-resolver-view')

const KEYBINDING_RESOLVER_URI = 'atom://keybinding-resolver'

module.exports = {
  activate () {
    this.subscriptions = new CompositeDisposable()

    this.subscriptions.add(atom.workspace.addOpener(uri => {
      if (uri === KEYBINDING_RESOLVER_URI) {
        return new KeyBindingResolverView()
      }
    }))

    this.subscriptions.add(atom.commands.add('atom-workspace', {
      'key-binding-resolver:toggle': () => this.toggle()
    }))
  },

  async deactivate () {
    this.subscriptions.dispose()
    let pane = atom.workspace.paneForURI(KEYBINDING_RESOLVER_URI)
    while (pane) {
      await pane.destroyItem(pane.itemForURI(KEYBINDING_RESOLVER_URI))
      pane = atom.workspace.paneForURI(KEYBINDING_RESOLVER_URI)
    }<commit_msg>There will only be one keybinding view<commit_after>const {CompositeDisposable} = require('atom')

const KeyBindingResolverView = require('./keybinding-resolver-view')

const KEYBINDING_RESOLVER_URI = 'atom://keybinding-resolver'

module.exports = {
  activate () {
    this.subscriptions = new CompositeDisposable()

    this.subscriptions.add(atom.workspace.addOpener(uri => {
      if (uri === KEYBINDING_RESOLVER_URI) {
        return new KeyBindingResolverView()
      }
    }))

    this.subscriptions.add(atom.commands.add('atom-workspace', {
      'key-binding-resolver:toggle': () => this.toggle()
    }))
  },

  deactivate () {
    this.subscriptions.dispose()
    const pane = atom.workspace.paneForURI(KEYBINDING_RESOLVER_URI)
    if (pane) {
      pane.destroyItem(pane.itemForURI(KEYBINDING_RESOLVER_URI))
    }
{'fraction_non_alphanumeric': 0.12969483568075119, 'fraction_numerical': 0.0, 'mean_word_length': 3.9563953488372094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5846061', 'n_tokens_mistral': 580, 'n_tokens_neox': 562, 'n_words': 74}