<commit_before>const electron = require('electron');
const app = electron.app;
const handleStartupEvent = require('./startuphandler.js');
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
const update = require('./updater');
let mainWindow;

let setApplicationMenu = function() {
  Menu.setApplicationMenu(Menu.buildFromTemplate(devMenuTemplate));
};

let devMenuTemplate = [{
  label: 'DevTools',
  submenu: [{
    label: 'Reload',
    accelerator: 'CmdOrCtrl+R',
    click: function() {
      BrowserWindow.getFocusedWindow().webContents.reloadIgnoringCache();
    }
  }, {
    label: 'Toggle DevTools',
    accelerator: 'Alt+CmdOrCtrl+I',
    click: function() {
      BrowserWindow.getFocusedWindow().toggleDevTools();
    }
  }]
}];

// handle any Squirrel event (installer events)
if (!handleStartupEvent()) {

  app.commandLine.appendSwitch('enable-transparent-visuals');
  app.on('window-all-closed', () => {
    if (process.platform !== 'darwin') {
      app.quit();
    }
  });

  app.on('ready', () => {
    setApplicationMenu();

    mainWindow = new BrowserWindow({
      width: 1024,
      height: 768
    });

    global.mainWindow = mainWindow;
    global.rootDir = __dirname;

    mainWindow.loadURL(`file://${__dirname}/index.html`);

    mainWindow.webContents.on('did-finish-load', () => {
      mainWindow.setTitle('Monterey');
    });
<commit_msg>chore(all): allow user to clear session<commit_after>const electron = require('electron');
const storage = require('electron-json-storage');
const app = electron.app;
const handleStartupEvent = require('./startuphandler.js');
const BrowserWindow = electron.BrowserWindow;
const Menu = electron.Menu;
const update = require('./updater');
let mainWindow;

let setApplicationMenu = function() {
  Menu.setApplicationMenu(Menu.buildFromTemplate(devMenuTemplate));
};

let devMenuTemplate = [{
  label: 'DevTools',
  submenu: [{
    label: 'Reload',
    accelerator: 'CmdOrCtrl+R',
    click: function() {
      BrowserWindow.getFocusedWindow().webContents.reloadIgnoringCache();
    }
  }, {
    label: 'Toggle DevTools',
    accelerator: 'Alt+CmdOrCtrl+I',
    click: function() {
      BrowserWindow.getFocusedWindow().toggleDevTools();
    }
  }, {
    label: 'Clear session',
    click: function() {
      storage.clear(function (err){});
      BrowserWindow.getFocusedWindow().loadURL(`file://${__dirname}/index.html`);
    }
  }]
}];

// handle any Squirrel event (installer events)
if (!handleStartupEvent()) {

  app.commandLine.appendSwitch('enable-transparent-visuals');
  app.on('window-all-closed', () => {
    if (process.platform !== 'darwin') {
      app.quit();
    }
  });

  app.on('ready', () => {
    setApplicationMenu();

    mainWindow = new BrowserWindow({
      width: 1024,
      height: 768
    });

    global.mainWindow = mainWindow;
    global.rootDir = __dirname;

    mainWindow.loadURL(`file://${__dirname}/index.html`);

    mainWindow.webContents.on('did-finish-load', () => {
      mainWindow.setTitle('Monterey');
    });

{'fraction_non_alphanumeric': 0.1620734908136483, 'fraction_numerical': 0.004593175853018373, 'mean_word_length': 3.816745655608215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4846519', 'n_tokens_mistral': 962, 'n_tokens_neox': 928, 'n_words': 164}