<commit_before>const ipcRenderer = require('electron').ipcRenderer

const fs = require('fs')
const path = require('path')

const layout = require('dw-layout')
const logger = require('dw-log')

const settingsFile = path.join(__dirname, '..', 'settings.json')

let entryInputs = {}

function onSettingChange(event) {
    if (!event.fromUser) {
        return false
    }

    ipcRenderer.send('set-setting', event.from.key, event.value)
}
ipcRenderer.on('setting', (event, key, value) => {
    if (entryInputs.hasOwnProperty(key)) {
        entryInputs[key].value = value
    }
})

function getEntryBlock(key, data) {
    let input = false

    data.tooltip = data.description
    data.highlight = true

    switch (data.type) {
        case 'boolean':
            data.label = 'Enabled'
            input = new layout.CheckboxInput(data)
            break
        case 'number':
            input = new layout.NumberInput(data)
            break
        case 'color':
            input = new layout.ColorInput(data)
            break
        case 'select':
            input = new layout.SelectInput(data)

            let maxChars = 5

            for (let i = 0; i < data.options.length; i++) {
                maxChars = Math.max(maxChars, data.options[i].length)
            }

            maxChars /= 1.8

            layout.change(input, {
                width: maxChars + 'em'<commit_msg>Removed settings highlight<commit_after>const ipcRenderer = require('electron').ipcRenderer

const fs = require('fs')
const path = require('path')

const layout = require('dw-layout')
const logger = require('dw-log')

const settingsFile = path.join(__dirname, '..', 'settings.json')

let entryInputs = {}

function onSettingChange(event) {
    if (!event.fromUser) {
        return false
    }

    ipcRenderer.send('set-setting', event.from.key, event.value)
}
ipcRenderer.on('setting', (event, key, value) => {
    if (entryInputs.hasOwnProperty(key)) {
        entryInputs[key].value = value
    }
})

function getEntryBlock(key, data) {
    let input = false

    data.tooltip = data.description

    switch (data.type) {
        case 'boolean':
            data.label = 'Enabled'
            input = new layout.CheckboxInput(data)
            break
        case 'number':
            input = new layout.NumberInput(data)
            break
        case 'color':
            input = new layout.ColorInput(data)
            break
        case 'select':
            input = new layout.SelectInput(data)

            let maxChars = 5

            for (let i = 0; i < data.options.length; i++) {
                maxChars = Math.max(maxChars, data.options[i].length)
            }

            maxChars /= 1.8

            layout.change(input, {
                width: maxChars + 'em'
{'fraction_non_alphanumeric': 0.12315448325531149, 'fraction_numerical': 0.0028808066258552397, 'mean_word_length': 2.110862262038074, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5255275', 'n_tokens_mistral': 822, 'n_tokens_neox': 792, 'n_words': 187}