feat: langfuse 工具调用显示为嵌套结构

This commit is contained in:
claude-code-best
2026-04-13 18:05:13 +08:00
parent d4b30d32c3
commit 05cabbbd73
6 changed files with 99 additions and 12 deletions

View File

@@ -1309,6 +1309,7 @@ async function checkPermissionsAndCallTool(
output: toolResultStr,
startTime: new Date(startTime),
isError: false,
parentBatchSpan: toolUseContext.langfuseBatchSpan,
})
// Map the tool result to API format once and cache it. This block is reused
@@ -1628,6 +1629,7 @@ async function checkPermissionsAndCallTool(
output: errorMessage(error),
startTime: new Date(startTime),
isError: true,
parentBatchSpan: toolUseContext.langfuseBatchSpan,
})
// Handle MCP auth errors by updating the client status to 'needs-auth'