Function
findStructuredOutputPart
(
messages: Array<UIMessage>,
messageId: string,
)
Source from the content-addressed store, hash-verified
| 201 | } |
| 202 | |
| 203 | function findStructuredOutputPart( |
| 204 | messages: Array<UIMessage>, |
| 205 | messageId: string, |
| 206 | ) { |
| 207 | return messages |
| 208 | .find((message) => message.id === messageId) |
| 209 | ?.parts.find( |
| 210 | (part): part is Extract<MessagePart, { type: 'structured-output' }> => |
| 211 | part.type === 'structured-output', |
| 212 | ) |
| 213 | } |
| 214 | |
| 215 | function runStartedChunk(args: { threadId: string; runId: string }) { |
| 216 | return { |
Tested by
no test coverage detected