Skip to content

Commit 8aa86e0

Browse files
Vikhyath MondretiVikhyath Mondreti
authored andcommitted
remove duplicate info in trace span info for tool calls
1 parent 148f0a6 commit 8aa86e0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

apps/sim/executor/handlers/agent/agent-handler.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,14 @@ export class AgentBlockHandler implements BlockHandler {
737737

738738
private formatToolCall(tc: any) {
739739
return {
740-
...tc,
741740
name: this.stripCustomToolPrefix(tc.name),
742741
startTime: tc.startTime,
743742
endTime: tc.endTime,
744743
duration: tc.duration,
745-
input: tc.arguments || tc.input,
746-
output: tc.result || tc.output,
744+
arguments: tc.arguments || tc.input,
745+
result: tc.result || tc.output,
746+
// Don't spread the original object to avoid duplication
747+
// Only include the fields we actually need
747748
}
748749
}
749750

apps/sim/lib/logs/trace-spans.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ export function buildTraceSpans(result: ExecutionResult): {
175175
startTime: tc.startTime || log.startedAt,
176176
endTime: tc.endTime || log.endedAt,
177177
status: tc.error ? 'error' : 'success',
178-
input: tc.arguments || tc.input,
179-
output: tc.result || tc.output,
178+
input: tc.arguments,
179+
output: tc.result,
180180
error: tc.error,
181181
}
182182
} catch (tcError) {

0 commit comments

Comments
 (0)