mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
[Fix Telemetry for tool calls, PR 1/n] Propagate tool reported errors via ToolCallResponseInfo and ToolResult (#5222)
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
ErroredToolCall,
|
||||
SuccessfulToolCall,
|
||||
} from '../core/coreToolScheduler.js';
|
||||
import { ToolErrorType } from '../tools/tool-error.js';
|
||||
import { Tool, ToolConfirmationOutcome } from '../tools/tools.js';
|
||||
|
||||
const createFakeCompletedToolCall = (
|
||||
@@ -54,6 +55,7 @@ const createFakeCompletedToolCall = (
|
||||
},
|
||||
},
|
||||
error: undefined,
|
||||
errorType: undefined,
|
||||
resultDisplay: 'Success!',
|
||||
},
|
||||
durationMs: duration,
|
||||
@@ -73,6 +75,7 @@ const createFakeCompletedToolCall = (
|
||||
},
|
||||
},
|
||||
error: error || new Error('Tool failed'),
|
||||
errorType: ToolErrorType.UNKNOWN,
|
||||
resultDisplay: 'Failure!',
|
||||
},
|
||||
durationMs: duration,
|
||||
|
||||
Reference in New Issue
Block a user