Open ilteoood opened 1 year ago
Thanks for raising @ilteoood. IIRC this was an intentional omission on my part. During the MVP, I created this TODO to track adding support for multiple suggestions on individual files. The snippet from GPT might work yes. Although it would need tested with the GitHub createReview
API.
I'd park this for the time being. The idea behind this project was mostly to serve as a showcase for something that can be built with Node.js and ChatGPT, but not serve as a real product.
Looking at the code of the createSuggestions function, we are always overwriting the content of the
suggestionsForFile
variable, keeping only its last value.Is this behaviour correct? If it's correct, we could avoid iterating the
transformerResponse
array and take only the last entry. Otherwise, theforEach
function should became amap
to keep all the possible results.P.S. I also asked an opinion to ChatGPT 😄