import { buildCommandContext } from '../../../../app/command-context.js';
import { readGlobalOptions } from '../../../shared/shared.utils.js';
import { Command } from 'commander';
import { defaultTriageDependencies, runTriageComments, } from './triage-comments.js';
export function createPrCommentsTriageCommand(deps = defaultTriageDependencies) {
    return new Command('triage-collection')
        .description('Interactively triage collected PR review comments (keep/discard)')
        .requiredOption('--month <YYYY-MM>', 'Month chunk to triage')
        .option('--input-dir <path>', 'Directory containing collected JSON', '.oat/review-comments')
        .option('--output-dir <path>', 'Output directory for triaged results', '.oat/review-comments')
        .action(async (opts, command) => {
        const globalOptions = readGlobalOptions(command);
        const context = buildCommandContext(globalOptions);
        const options = {
            inputDir: opts.inputDir,
            outputDir: opts.outputDir,
            month: opts.month,
        };
        await runTriageComments(context, options, deps);
    });
}
