mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-21 07:45:52 +00:00
feat: 全部类型问题解决
This commit is contained in:
@@ -423,11 +423,11 @@ export function startBackgroundSession({
|
||||
const contentBlocks = (msg.message?.content ?? []) as Array<{ type: string; text?: string; name?: string; input?: unknown }>
|
||||
for (const block of contentBlocks) {
|
||||
if (block.type === 'text') {
|
||||
tokenCount += roughTokenCountEstimation(block.text)
|
||||
tokenCount += roughTokenCountEstimation(block.text ?? '')
|
||||
} else if (block.type === 'tool_use') {
|
||||
toolCount++
|
||||
const activity: ToolActivity = {
|
||||
toolName: block.name,
|
||||
toolName: block.name ?? '',
|
||||
input: block.input as Record<string, unknown>,
|
||||
}
|
||||
recentActivities.push(activity)
|
||||
|
||||
Reference in New Issue
Block a user