Fix toolName reference in ClaudeCode message transformation
- Correctly reference toolName from contentBlockState using blockKey instead of block.tool_use_id - Ensure proper tool result chunk generation when handling assistant messages - Maintain consistent data structure for tool call processing
This commit is contained in:
@@ -118,7 +118,7 @@ function handleUserOrAssistantMessage(message: Extract<SDKMessage, { type: 'assi
|
||||
chunks.push({
|
||||
type: 'tool-result',
|
||||
toolCallId: block.tool_use_id,
|
||||
toolName: contentBlockState[block.tool_use_id].toolName,
|
||||
toolName: contentBlockState[blockKey].toolName,
|
||||
input: '',
|
||||
output: block.content
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user