<commit_before>function commandsCommand(argv, session) {
    return Promise.resolve({
        response: JSON.keys(apiBone.commands),
        formatText: (result) => {
            for (let command of result) {
                session.log(command);
            }
        },
        formatMarkdown: (result) => {
            for (let command of result) {
                session.log(command);
            }
        },
        formatJson: (result) => { session.log(result); }
    });
}

apiBone.addCommand({
    command: 'commands',
    description: 'List of commands',
    demandArgs: 0,
    demandOptions: [ ],
    callback: commandsCommand
});<commit_msg>* commands command fix.<commit_after>function commandsCommand(argv, session) {
    return Promise.resolve({
        response: Object.keys(apiBone.commands).map((item) => {
            const command = apiBone.commands[item];

            return {
                command: command.command,
                description: command.description,
                usage: command.usage
            };
        }),
        formatText: (result) => {
            for (let command of result) {
                session.log(`${command.command}: ${command.description}`);
            }
        },
        formatMarkdown: (result) => {
            for (let command of result) {
                session.log(`*${command.command}*: ${command.description}`);
            }
        },
        formatJson: (result) => { session.log(result); }
    });
}

apiBone.addCommand({
    command: 'commands',
    description: 'List of commands',
    usage: 'commands',
    demandArgs: 0,
    demandOptions: [ ],
    callback: commandsCommand
});
{'fraction_non_alphanumeric': 0.13401442307692307, 'fraction_numerical': 0.001201923076923077, 'mean_word_length': 1.915936952714536, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1972032', 'n_tokens_mistral': 445, 'n_tokens_neox': 436, 'n_words': 93}