refactor: remove redundant bounds checks per code review

This commit is contained in:
Aikins Laryea
2026-03-12 00:12:43 +00:00
parent 861537c9bd
commit a6c3042e34
2 changed files with 2 additions and 9 deletions
@@ -305,11 +305,7 @@ func fixCLIToolResponse(input string) (string, error) {
functionResponseContent := `{"parts":[],"role":"function"}`
for ri, response := range groupResponses {
fallbackName := ""
if ri < len(group.CallNames) {
fallbackName = group.CallNames[ri]
}
partRaw := parseFunctionResponseRaw(response, fallbackName)
partRaw := parseFunctionResponseRaw(response, group.CallNames[ri])
if partRaw != "" {
functionResponseContent, _ = sjson.SetRaw(functionResponseContent, "parts.-1", partRaw)
}