<commit_before>remote = require 'remote'
Menu = remote.require 'menu'

templateOsx = (viewstate) -> [{
    label: 'Yakyak'
    submenu: [
        { label: 'About YakYak', selector: 'orderFrontStandardAboutPanel:' }
        { type: 'separator' }
        # { label: 'Preferences...', accelerator: 'Command+,', click: => delegate.openConfig() }
        { type: 'separator' }
        { label: 'Hide YakYak', accelerator: 'Command+H', selector: 'hide:' }
        { label: 'Hide Others', accelerator: 'Command+Shift+H', selector: 'hideOtherApplications:' }
        { label: 'Show All', selector: 'unhideAllApplications:' }
        { type: 'separator' }
        { label: 'Open Inspector', accelerator: 'Command+Alt+I', click: -> action 'devtools' }
        { type: 'separator' }
        { label: 'Logout', click: -> action 'logout' }
        { label: 'Quit', accelerator: 'Command+Q', click: -> action 'quit' }
    ]},{
    label: 'Edit'
    submenu: [
        { label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' }
        { label: 'Redo', accelerator: 'Command+Shift+Z', selector: 'redo:' }
        { type: 'separator' }
        { label: 'Cut', accelerator: 'Command+X', selector: 'cut:' }
        { label: 'Copy', accelerator: 'Command+C', selector: 'copy:' }
        { label: 'Paste', accelerator: 'Command+V', selector: 'paste:' }
        { label: 'Select All', accelerator: 'Command+A', selector: 'selectAll:' }
    ]},{
    label: 'View'
    submenu: [
        {
            type:'checkbox'
            label: 'Show Conversation Thumbnails'
            checked:viewstate.showConvThumbs
            click: (it) -> action 'showconvthumbs', it.checked
        }, {
            label: 'Enter Full Screen',
            accelerator: 'Command+Control+F',
            click: -> action 'togglefullscreen'
        }, {
            label: 'Previous Conversation',
            click: -> action 'selectNextConv', -1
        }, {
            label: 'Next Conversation',
            click: -> action 'selectNextConv', +1
        }
    ]},{
    label: 'Window',
    submenu: [
        {
            label: 'Minimize',
            accelerator: 'Command+M',
            selector: 'performMiniaturize:'
        },
        {
            label: 'Close',
            accelerator: 'Command+W',
            selector: 'performClose:'
        },
        {
            type: 'separator'
        },
        {
            label: 'Bring All to Front',
            selector: 'arrangeInFront:'
        }
      ]
    }
]

# TODO: find proper windows/linux accelerators
templateOthers = (viewstate) -> [{
    label: 'Yakyak'
    submenu: [
        { label: 'Open Inspector', accelerator: 'Command+Alt+I', click: -> action 'devtools' }
        { type: 'separator' }
        { label: 'Logout', click: -> action 'logout' }
        { label: 'Quit', accelerator: 'Command+Q', click: -> action 'quit' }
    ]}, {
    label: 'View'
    submenu: [
        {
            type:'checkbox'
            label: 'Show Conversation Thumbnails'
            checked:viewstate.showConvThumbs
            click: (it) -> action 'showconvthumbs', it.checked
        }, {
            label: 'Enter Full Screen',
            accelerator: 'Command+Control+F',
            click: -> action 'togglefullscreen'
        }, {
            label: 'Previous Conversation',
            click: -> action 'selectNextConv', -1
        }, {
            label: 'Next Conversation',
            click: -> action 'selectNextConv', +1
        }
    ]}
]

module.exports = (viewstate) -><commit_msg>fixed menu shortcuts on windows/linux<commit_after>remote = require 'remote'
Menu = remote.require 'menu'

templateOsx = (viewstate) -> [{
    label: 'Yakyak'
    submenu: [
        { label: 'About YakYak', selector: 'orderFrontStandardAboutPanel:' }
        { type: 'separator' }
        # { label: 'Preferences...', accelerator: 'Command+,', click: => delegate.openConfig() }
        { type: 'separator' }
        { label: 'Hide YakYak', accelerator: 'Command+H', selector: 'hide:' }
        { label: 'Hide Others', accelerator: 'Command+Shift+H', selector: 'hideOtherApplications:' }
        { label: 'Show All', selector: 'unhideAllApplications:' }
        { type: 'separator' }
        { label: 'Open Inspector', accelerator: 'Command+Alt+I', click: -> action 'devtools' }
        { type: 'separator' }
        { label: 'Logout', click: -> action 'logout' }
        { label: 'Quit', accelerator: 'Command+Q', click: -> action 'quit' }
    ]},{
    label: 'Edit'
    submenu: [
        { label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' }
        { label: 'Redo', accelerator: 'Command+Shift+Z', selector: 'redo:' }
        { type: 'separator' }
        { label: 'Cut', accelerator: 'Command+X', selector: 'cut:' }
        { label: 'Copy', accelerator: 'Command+C', selector: 'copy:' }
        { label: 'Paste', accelerator: 'Command+V', selector: 'paste:' }
        { label: 'Select All', accelerator: 'Command+A', selector: 'selectAll:' }
    ]},{
    label: 'View'
    submenu: [
        {
            type:'checkbox'
            label: 'Show Conversation Thumbnails'
            checked:viewstate.showConvThumbs
            click: (it) -> action 'showconvthumbs', it.checked
        }, {
            label: 'Enter Full Screen',
            accelerator: 'Command+Control+F',
            click: -> action 'togglefullscreen'
        }, {
            label: 'Previous Conversation',
            click: -> action 'selectNextConv', -1
        }, {
            label: 'Next Conversation',
            click: -> action 'selectNextConv', +1
        }
    ]},{
    label: 'Window',
    submenu: [
        {
            label: 'Minimize',
            accelerator: 'Command+M',
            selector: 'performMiniaturize:'
        },
        {
            label: 'Close',
            accelerator: 'Command+W',
            selector: 'performClose:'
        },
        {
            type: 'separator'
        },
        {
            label: 'Bring All to Front',
            selector: 'arrangeInFront:'
        }
      ]
    }
]

# TODO: find proper windows/linux accelerators
templateOthers = (viewstate) -> [{
    label: 'Yakyak'
    submenu: [
        { label: 'Open Inspector', accelerator: 'Control+Alt+I', click: -> action 'devtools' }
        { type: 'separator' }
        { label: 'Logout', click: -> action 'logout' }
        { label: 'Quit', accelerator: 'Control+Q', click: -> action 'quit' }
    ]}, {
    label: 'View'
    submenu: [
        {
            type:'checkbox'
            label: 'Show Conversation Thumbnails'
            checked:viewstate.showConvThumbs
            click: (it) -> action 'showconvthumbs', it.checked
        }, {
            label: 'Enter Full Screen',
            accelerator: 'Control+Control+F',
            click: -> action 'togglefullscreen'
        }, {
            label: 'Previous Conversation',
            click: -> action 'selectNextConv', -1
        }, {
            label: 'Next Conversation',
            click: -> action 'selectNextConv', +1
        }
    ]}
]

module.exports = (viewstate) ->
{'fraction_non_alphanumeric': 0.15429136081309994, 'fraction_numerical': 0.001129305477131564, 'mean_word_length': 2.0303678357570574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, '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': '5415754', 'n_tokens_mistral': 2095, 'n_tokens_neox': 2037, 'n_words': 490}