<commit_before>//these requires are needed in order to load objects on the Browser side of things
var Task = require("./js/Task.js");
var TaskList = require("./js/TaskList.js");

var app = require('electron').remote;
var dialog = app.dialog;

var _ = require("lodash")

//TODO clean this section up to hide these variables
//delcare any local/global variables
var grid;

function entryPoint() {
    //this is equal to the onLoad event for the body
    setupMainPageTasks();

    mainTaskList = new TaskList();
}

function renderGrid() {
    grid.load(mainTaskList.getGridDataObject());
    grid.renderGrid("gridList", "testgrid");
}

//check if the filename is already in the list
function addFileToRecentFileList(fileName) {
    _.remove(recentFiles, function (item) {
        return (item == fileName);
    })
    recentFiles.unshift(fileName);
    console.log(recentFiles);
    //if not, add to the top of the list

    updateRecentFileButton();
}

function updateRecentFileButton() {

    if (recentFiles.length > 0) {
        $("#recentFileGroup ul").empty();
    }

    _.each(recentFiles, function (sortDir) {
        console.log("sort dir", sortDir)
        var label = $("<li/>").appendTo("#recentFileGroup ul")
        var aDom = $("<a/>").attr("href", "#").text(sortDir).appendTo(label);

        //set up a click event on the LABEL... does not work for the input
        $(label).on("click", function (ev) {
            //this seems to be opposite of the actual value<commit_msg>Save recent files back to localStorage<commit_after>//these requires are needed in order to load objects on the Browser side of things
var Task = require("./js/Task.js");
var TaskList = require("./js/TaskList.js");

var app = require('electron').remote;
var dialog = app.dialog;

var _ = require("lodash")

//TODO clean this section up to hide these variables
//delcare any local/global variables
var grid;

function entryPoint() {
    //this is equal to the onLoad event for the body
    setupMainPageTasks();

    mainTaskList = new TaskList();
}

function renderGrid() {
    grid.load(mainTaskList.getGridDataObject());
    grid.renderGrid("gridList", "testgrid");
}

//check if the filename is already in the list
function addFileToRecentFileList(fileName) {
    _.remove(recentFiles, function (item) {
        return (item == fileName);
    })
    recentFiles.unshift(fileName);
    console.log(recentFiles);
    //if not, add to the top of the list

    localStorage.setItem("recentFiles", recentFiles);
    updateRecentFileButton();
}

function updateRecentFileButton() {

    if (recentFiles.length > 0) {
        $("#recentFileGroup ul").empty();
    }

    _.each(recentFiles, function (sortDir) {
        console.log("sort dir", sortDir)
        var label = $("<li/>").appendTo("#recentFileGroup ul")
        var aDom = $("<a/>").attr("href", "#").text(sortDir).appendTo(label);

        //set up a click event on the LABEL... does not work for the input
        $(label).on("click", function (ev) {
            //this seems to be opposite of the actual value
{'fraction_non_alphanumeric': 0.13361646520744855, 'fraction_numerical': 0.0006533812479581836, 'mean_word_length': 3.330975954738331, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2604654', 'n_tokens_mistral': 910, 'n_tokens_neox': 876, 'n_words': 288}