(value string, maxRunes int)
| 1532 | } |
| 1533 | |
| 1534 | func subagentTruncateRunes(value string, maxRunes int) string { |
| 1535 | if maxRunes <= 0 { |
| 1536 | return "" |
| 1537 | } |
| 1538 | |
| 1539 | runes := []rune(value) |
| 1540 | if len(runes) <= maxRunes { |
| 1541 | return value |
| 1542 | } |
| 1543 | |
| 1544 | return string(runes[:maxRunes]) |
| 1545 | } |
| 1546 | |
| 1547 | func toolJSONResponse(result map[string]any) fantasy.ToolResponse { |
| 1548 | data, err := json.Marshal(result) |
no outgoing calls
no test coverage detected