<commit_before>import * as path from 'path'
import { app } from 'electron'
import log from 'electron-log'
import imagine from './backend/app'
import updater from './backend/updater'
import { IS_DEV } from './common/env'
import { cleanTmpdir } from './common/file-utils'
import { setup as setupLocales } from './locales'

cleanTmpdir()

log.transports.file.level = 'info'

app.on('ready', () => {
  log.info('app launch', process.argv)

  imagine.receiveFiles(process.argv.slice(2))

  setupLocales(app.getLocale())

  if (IS_DEV) {
    // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
    require('./dev/dev').start().then(() => {
      imagine.start('http://localhost:9999/')
    })
  } else {
    imagine.start(`file://${path.resolve(app.getAppPath(), 'dist/web/index.html')}`)
    updater.checkForUpdates()
  }
})

app.on('open-file', (e, filePath) => {
  imagine.receiveFiles([filePath])
})
<commit_msg>fix(win32): context menu open files<commit_after>import * as path from 'path'
import { app } from 'electron'
import log from 'electron-log'
import imagine from './backend/app'
import updater from './backend/updater'
import { IS_DEV } from './common/env'
import { cleanTmpdir } from './common/file-utils'
import { setup as setupLocales } from './locales'

cleanTmpdir()

log.transports.file.level = 'info'

app.on('ready', () => {
  log.info('app launch', process.argv)

  imagine.receiveFiles(process.argv.slice(1))

  setupLocales(app.getLocale())

  if (IS_DEV) {
    // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
    require('./dev/dev').start().then(() => {
      imagine.start('http://localhost:9999/')
    })
  } else {
    imagine.start(`file://${path.resolve(app.getAppPath(), 'dist/web/index.html')}`)
    updater.checkForUpdates()
  }
})

app.on('open-file', (e, filePath) => {
  imagine.receiveFiles([filePath])
})

{'fraction_non_alphanumeric': 0.18618143459915612, 'fraction_numerical': 0.006329113924050633, 'mean_word_length': 3.979002624671916, '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': '1162094', 'n_tokens_mistral': 662, 'n_tokens_neox': 650, 'n_words': 122}