Extract logic for extracting diffs for prompt
## Background As of this writing, we are extracting diffs in 3 different places: - `Llm::MergeRequests::SummarizeDiffService` - `Gitlab::Llm::Templates::GenerateCommitMessage` - `Gitlab::Llm::Templates::FillInMergeRequestTemplate` It is also possible to have a MR with huge diffs and we won't be able to send them to AI provider in a single request as we can hit a token limit. ## Proposal Create a new module/class to encapsulate the logic of extracting diffs that can be re-used by different classes. Regarding the token limit issue, it still needs to be discussed. --- The following discussion from !121233 should be addressed: - [ ] @patrickbajao started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121233#note_1399277188): (+4 comments) > This is borrowed from `Llm::MergeRequests::SummarizeDiffService`. We can extract this in a separate module/class in a follow up so it can be re-usable.
issue