@@ -173,6 +173,9 @@ func (r *runInfo) process(e event) map[string]any {
173173 if e .Content != "" {
174174 call .Input = e .Content
175175 }
176+ if e .ToolResults > 0 {
177+ call .ToolResults = e .ToolResults
178+ }
176179
177180 case runner .EventTypeCallSubCalls :
178181 call .setSubCalls (e .ToolSubCalls )
@@ -185,6 +188,8 @@ func (r *runInfo) process(e event) map[string]any {
185188 call .setOutput (e .Content )
186189
187190 case runner .EventTypeChat :
191+ call .Usage = e .Usage
192+ call .ChatResponseCached = e .ChatResponseCached
188193 if e .ChatRequest != nil {
189194 call .LLMRequest = e .ChatRequest
190195 }
@@ -210,14 +215,16 @@ func (r *runInfo) processStdout(cs runner.ChatResponse) {
210215type call struct {
211216 engine.CallContext `json:",inline"`
212217
213- Type runner.EventType `json:"type"`
214- Start time.Time `json:"start"`
215- End time.Time `json:"end"`
216- Input string `json:"input"`
217- Output []output `json:"output"`
218- Usage types.Usage `json:"usage"`
219- LLMRequest any `json:"llmRequest"`
220- LLMResponse any `json:"llmResponse"`
218+ Type runner.EventType `json:"type"`
219+ Start time.Time `json:"start"`
220+ End time.Time `json:"end"`
221+ Input string `json:"input"`
222+ Output []output `json:"output"`
223+ Usage types.Usage `json:"usage"`
224+ ChatResponseCached bool `json:"chatResponseCached"`
225+ ToolResults int `json:"toolResults"`
226+ LLMRequest any `json:"llmRequest"`
227+ LLMResponse any `json:"llmResponse"`
221228}
222229
223230func (c * call ) setSubCalls (subCalls map [string ]engine.Call ) {
0 commit comments