<commit_before>const Store = require('../handler').Store;
const Handler = require('../handler').Handler;

var stor = new Store([new Handler(),]);
stor.emit('data','please show me commits')<commit_msg>intent system is somewhat functional, TODO: write another test creating a sample express server with this system<commit_after>const Store = require('../handler').Store;
const Handler = require('../handler').Handler;


class GitHub extends Handler {
  constructor(){
    super('github');
  }

  template(){
    return [
      'show github commits',
      'show history',
      'please show me commits'
    ]
  }
}

class Default extends Handler {
  constructor(){
    super('fallback');
  }
  //this may seem weird but im creating a default handler so that if all else fails, this failureFunction would dispatch an error api message to the siri app
  //which would allow the user to try again
  failureFunction(){
    console.log("I don't know")
  }

  template(){
    return [];
  }
}
//the default handler always goes last
var stor = new Store([new Handler('default'),new GitHub(),new Default()]);
stor.emit('data','please show me songs')
{'fraction_non_alphanumeric': 0.13081650570676032, 'fraction_numerical': 0.0, 'mean_word_length': 3.892703862660944, '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': '3364090', 'n_tokens_mistral': 316, 'n_tokens_neox': 296, 'n_words': 118}