(part fantasy.MessagePart)
| 49 | } |
| 50 | |
| 51 | func safeAsToolResultPart(part fantasy.MessagePart) (fantasy.ToolResultPart, bool) { |
| 52 | var zero fantasy.ToolResultPart |
| 53 | if part == nil { |
| 54 | return zero, false |
| 55 | } |
| 56 | if value, ok := part.(*fantasy.ToolResultPart); ok && value == nil { |
| 57 | return zero, false |
| 58 | } |
| 59 | type toolResultPart = fantasy.ToolResultPart |
| 60 | return fantasy.AsMessagePart[toolResultPart](part) |
| 61 | } |
| 62 | |
| 63 | // FileData holds resolved file content for LLM prompt building. |
| 64 | type FileData struct { |
no outgoing calls
no test coverage detected