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

View File

@@ -261,10 +261,7 @@ func fixCLIToolResponse(input string) (string, error) {
log.Warnf("failed to parse function response")
continue
}
raw := response.Raw
if ri < len(group.CallNames) {
raw = backfillFunctionResponseName(raw, group.CallNames[ri])
}
raw := backfillFunctionResponseName(response.Raw, group.CallNames[ri])
functionResponseContent, _ = sjson.SetRaw(functionResponseContent, "parts.-1", raw)
}