Description
The messages package has the most duplication between its blocking and streaming ProcessRequest implementations.
Tasks:
- Identify the flow that
ProcessRequest follows in both blocking and streaming
- Extract the tool result content conversion (TextContent, EmbeddedResource, BlobResourceContents handling) into a shared method on interceptionBase
- Extract tool call handling and recording logic as methods on
interceptionBase, following the pattern already established in the responses package
- Fix bugs found during the refactor
- Add unit tests for the extracted methods