Add debug logging for message content blocks

- Log each content block when processing user or assistant messages
- Maintain existing switch case logic for text block handling
- Improve debugging visibility for multi-block message processing
This commit is contained in:
suyao 2025-09-22 15:21:59 +08:00
parent 17a27f0d55
commit 4a5d3b31ab
No known key found for this signature in database

View File

@ -100,6 +100,7 @@ function handleUserOrAssistantMessage(message: Extract<SDKMessage, { type: 'assi
}
} else if (Array.isArray(message.message.content)) {
for (const block of message.message.content) {
logger.debug('Handling user or assistant message:', { block })
switch (block.type) {
case 'text':
chunks.push(...generateTextChunks(messageId, block.text, message))