mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
feat: 完成第二版类型清理
This commit is contained in:
@@ -164,7 +164,7 @@ export async function generateAgent(
|
||||
},
|
||||
})
|
||||
|
||||
const textBlocks = response.message.content.filter(
|
||||
const textBlocks = (Array.isArray(response.message.content) ? response.message.content : []).filter(
|
||||
(block): block is ContentBlock & { type: 'text' } => block.type === 'text',
|
||||
)
|
||||
const responseText = textBlocks.map(block => block.text).join('\n')
|
||||
|
||||
Reference in New Issue
Block a user