<commit_before>import { app, BrowserWindow, Menu, crashReporter, shell } from 'electron';

let menu;
let template;
let mainWindow = null;

crashReporter.start();

if (process.env.NODE_ENV === 'development') {
  require('electron-debug')();
}


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


app.on('ready', () => {
  mainWindow = new BrowserWindow({
    show: false,
    width: 1024,
    height: 728
  });

  mainWindow.loadURL(`http://localhost:3030/`);

  mainWindow.webContents.on('did-finish-load', () => {
    mainWindow.show();
    mainWindow.focus();
  });
<commit_msg>clear electron session data when the logout url is requested<commit_after>import { app, BrowserWindow, Menu, crashReporter, shell } from 'electron';

let menu;
let template;
let mainWindow = null;

crashReporter.start();

if (process.env.NODE_ENV === 'development') {
  require('electron-debug')();
}


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


app.on('ready', () => {
  mainWindow = new BrowserWindow({
    show: false,
    width: 1024,
    height: 728
  });

  mainWindow.loadURL(`http://localhost:3030/`);

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

  mainWindow.webContents.on('will-navigate', (event, url) => {
    if (url === 'http://localhost:3030/logout') {
		mainWindow.webContents.session.clearStorageData(() => {
			console.log('session data cleared');
		});
	}
  });

{'fraction_non_alphanumeric': 0.1928665785997358, 'fraction_numerical': 0.017173051519154558, 'mean_word_length': 4.05, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6050741', 'n_tokens_mistral': 541, 'n_tokens_neox': 499, 'n_words': 97}