<commit_before>import { shell, ipcMain, MenuItemConstructorOptions, BrowserWindow, MenuItem } from "electron"

export function createSharedMenuItems(window: BrowserWindow) {
  const visit: MenuItemConstructorOptions = {
    label: "On The Web",
    click() {
      if (process.env.HOMEPAGE) {
        shell.openExternal(process.env.HOMEPAGE)
      }
    },
  }

  const reload: MenuItemConstructorOptions = {
    label: "Reload",
    click() {
      window.webContents.reload()
    },
  }

  const storybook: MenuItemConstructorOptions = {
    label: "Toggle Storybook",
    click() {
      ipcMain.emit("storybook-toggle")
    },
  }

  const quit: MenuItemConstructorOptions = { label: "Quit", role: "quit" }

  const toggleDevTools: MenuItemConstructorOptions = {
    label: "Toggle Developer Tools",
    click() {
      window.webContents.toggleDevTools()
    },
  }

  const fullScreen: MenuItemConstructorOptions = {
    label: "Toggle Full Screen",
    click() {
      window.setFullScreen(!window.isFullScreen())
    },
  }

  return {
    visit,
    reload,
    storybook,
    quit,
    toggleDevTools,
    fullScreen,
  }
}

export const fileOperations: MenuItemConstructorOptions = {
  label: "File",
  submenu: [
    {
      label: "Load Media",
      accelerator: "CmdOrCtrl+O",
    },
    {
      label: "Open Transcript",
      accelerator: "CmdOrCtrl+T",
    },
  ],
}

export const editMenu: MenuItemConstructorOptions = {
  label: "Edit",
  submenu: [
    {
      label: "Undo",
      accelerator: "CmdOrCtrl+Z",
      role: "undo",
    },
    {
      label: "Redo",
      accelerator: "Shift+CmdOrCtrl+Z",
      role: "redo",
    },
    {
      type: "separator",
    },
    {
      label: "Cut",
      accelerator: "CmdOrCtrl+X",
      role: "cut",
    },
    {
      label: "Copy",
      accelerator: "CmdOrCtrl+C",
      role: "copy",
    },
    {
      label: "Paste",
      accelerator: "CmdOrCtrl+V",
      role: "paste",
    },
    {
      label: "Select All",
      accelerator: "CmdOrCtrl+A",
      role: "selectall",
    },
    {
      type: "separator",
    },
    {
      label: "Insert Current Time",
      accelerator: "CmdOrCtrl+;",
      click: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => {
        browserWindow.webContents.send("insert-current-time", "clicked")
      },
    },
    {
      label: "Toggle Play/Pause",
      accelerator: "Tab",
      click: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => {
        const toggleMessage: string = "User has toggled play/Pause"
        browserWindow.webContents.send(toggleMessage)
      },
    },
    {
      label: "Skip Backward in Time",
      accelerator: "Shift+Tab",
      click: (): null => {
        // window.webContents.send(jumpBackwardsMessage)
        return null
      },
    },
  ],
}
<commit_msg>Stub the Load Media function<commit_after>import { shell, ipcMain, MenuItemConstructorOptions, BrowserWindow, MenuItem } from "electron"

export function createSharedMenuItems(window: BrowserWindow) {
  const visit: MenuItemConstructorOptions = {
    label: "On The Web",
    click() {
      if (process.env.HOMEPAGE) {
        shell.openExternal(process.env.HOMEPAGE)
      }
    },
  }

  const reload: MenuItemConstructorOptions = {
    label: "Reload",
    click() {
      window.webContents.reload()
    },
  }

  const storybook: MenuItemConstructorOptions = {
    label: "Toggle Storybook",
    click() {
      ipcMain.emit("storybook-toggle")
    },
  }

  const quit: MenuItemConstructorOptions = { label: "Quit", role: "quit" }

  const toggleDevTools: MenuItemConstructorOptions = {
    label: "Toggle Developer Tools",
    click() {
      window.webContents.toggleDevTools()
    },
  }

  const fullScreen: MenuItemConstructorOptions = {
    label: "Toggle Full Screen",
    click() {
      window.setFullScreen(!window.isFullScreen())
    },
  }

  return {
    visit,
    reload,
    storybook,
    quit,
    toggleDevTools,
    fullScreen,
  }
}

export const fileOperations: MenuItemConstructorOptions = {
  label: "File",
  submenu: [
    {
      label: "Load Media",
      accelerator: "CmdOrCtrl+O",
      click: (m: MenuItem, w: BrowserWindow, e: Event) => {
        alert("Load Media!")
      },
    },
    {
      label: "Open Transcript",
      accelerator: "CmdOrCtrl+T",
    },
  ],
}

export const editMenu: MenuItemConstructorOptions = {
  label: "Edit",
  submenu: [
    {
      label: "Undo",
      accelerator: "CmdOrCtrl+Z",
      role: "undo",
    },
    {
      label: "Redo",
      accelerator: "Shift+CmdOrCtrl+Z",
      role: "redo",
    },
    {
      type: "separator",
    },
    {
      label: "Cut",
      accelerator: "CmdOrCtrl+X",
      role: "cut",
    },
    {
      label: "Copy",
      accelerator: "CmdOrCtrl+C",
      role: "copy",
    },
    {
      label: "Paste",
      accelerator: "CmdOrCtrl+V",
      role: "paste",
    },
    {
      label: "Select All",
      accelerator: "CmdOrCtrl+A",
      role: "selectall",
    },
    {
      type: "separator",
    },
    {
      label: "Insert Current Time",
      accelerator: "CmdOrCtrl+;",
      click: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => {
        browserWindow.webContents.send("insert-current-time", "clicked")
      },
    },
    {
      label: "Toggle Play/Pause",
      accelerator: "Tab",
      click: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Event) => {
        const toggleMessage: string = "User has toggled play/Pause"
        browserWindow.webContents.send(toggleMessage)
      },
    },
    {
      label: "Skip Backward in Time",
      accelerator: "Shift+Tab",
      click: (): null => {
        // window.webContents.send(jumpBackwardsMessage)
        return null
      },
    },
  ],
}

{'fraction_non_alphanumeric': 0.13735979292493528, 'fraction_numerical': 0.0, 'mean_word_length': 2.431616341030195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4404970', 'n_tokens_mistral': 1866, 'n_tokens_neox': 1859, 'n_words': 377}