(arr, maxStringLength)
| 85396 | INIT_MAIN_PROMPT2(translation3.localLanguage, fullGitMojiSpec, context), |
| 85397 | INIT_DIFF_PROMPT, |
| 85398 | INIT_CONSISTENCY_PROMPT(translation3) |
| 85399 | ]; |
| 85400 | } |
| 85401 | }; |
| 85402 | |
| 85403 | // src/utils/mergeDiffs.ts |
| 85404 | function mergeDiffs(arr, maxStringLength) { |
| 85405 | const mergedArr = []; |
| 85406 | let currentItem = arr[0]; |
| 85407 | for (const item of arr.slice(1)) { |
| 85408 | if (tokenCount(currentItem + item) <= maxStringLength) { |
| 85409 | currentItem += item; |
| 85410 | } else { |
| 85411 | mergedArr.push(currentItem); |
| 85412 | currentItem = item; |
| 85413 | } |
| 85414 | } |
no test coverage detected
searching dependent graphs…