mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 03:31:24 +08:00
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:
parent
e09cd6b6d7
commit
8fbb93b0bf
@ -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
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user