Function
stringifyToolResultContent
(
content: SdkToolResultContent | undefined,
)
Source from the content-addressed store, hash-verified
| 48 | } |
| 49 | |
| 50 | function stringifyToolResultContent( |
| 51 | content: SdkToolResultContent | undefined, |
| 52 | ): string { |
| 53 | if (content === undefined) return '' |
| 54 | if (typeof content === 'string') return content |
| 55 | return content |
| 56 | .map((block) => (typeof block.text === 'string' ? block.text : '')) |
| 57 | .join('') |
| 58 | } |
| 59 | |
| 60 | function buildUsage( |
| 61 | usage: SdkUsage | undefined, |
Tested by
no test coverage detected