import {Chunk, File} from "parse-diff"; export function createComment( file: File, chunk: Chunk, aiResponses: Array<{ lineNumber: string; reviewComment: string; }> ): Array<{ body: string; path: string; line: number }> { return aiResponses.flatMap((aiResponse) => { if (!file.to) { return []; } return { body: aiResponse.reviewComment, path: file.to, line: Number(aiResponse.lineNumber), }; }); }