<commit_before>var BasicMenu = function(app, endpoint, config) {
  this._app = app;
  this._endpoint = endpoint;
  this.config = config;
}

BasicMenu.prototype.init = function() {
  // Write the template specified in the config to the buffer
  this._endpoint.sock.write(this._app.templates[this.config.template]);
  // Implement hooks on the endpoint socket
}

module.exports = BasicMenu;
<commit_msg>start processing user input in basic menu<commit_after>var BasicMenu = function(app, endpoint, config) {
  this._app = app;
  this._endpoint = endpoint;
  this.config = config;
}

BasicMenu.prototype.init = function() {
  // Write the template specified in the config to the buffer
  this._endpoint.sock.write(this._app.templates[this.config.template]);

  // Get user input
  getSelection.call(this);
}

function getSelection() {
  function onLine(str) {
    // TODO Process the line
    console.log("The user chose " + str);

    this._endpoint.gets(onLine.bind(this));
  };

  this._endpoint.gets(onLine.bind(this));
}

module.exports = BasicMenu;

{'fraction_non_alphanumeric': 0.12167300380228137, 'fraction_numerical': 0.0, 'mean_word_length': 4.014285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2084614', 'n_tokens_mistral': 317, 'n_tokens_neox': 314, 'n_words': 82}