@@ -567,7 +567,7 @@ func (r *Runner) resume(callCtx engine.Context, monitor Monitor, env []string, s
567
567
Time : time .Now (),
568
568
CallContext : callCtx .GetCallContext (),
569
569
Type : EventTypeCallFinish ,
570
- Content : getFinishEventContent (* state , callCtx ),
570
+ Content : getEventContent (* state . Continuation . Result , callCtx ),
571
571
})
572
572
if callCtx .Tool .Chat {
573
573
return & State {
@@ -681,7 +681,7 @@ func streamProgress(callCtx *engine.Context, monitor Monitor) (chan<- types.Comp
681
681
CallContext : callCtx .GetCallContext (),
682
682
Type : EventTypeCallProgress ,
683
683
ChatCompletionID : status .CompletionID ,
684
- Content : message .String (),
684
+ Content : getEventContent ( message .String (), * callCtx ),
685
685
})
686
686
} else {
687
687
monitor .Event (Event {
@@ -821,13 +821,13 @@ func (r *Runner) subCalls(callCtx engine.Context, monitor Monitor, env []string,
821
821
return state , callResults , nil
822
822
}
823
823
824
- func getFinishEventContent ( state State , callCtx engine.Context ) string {
825
- // If it is a credential tool, the finish event contains its output, which is sensitive, so we don't return it.
824
+ func getEventContent ( content string , callCtx engine.Context ) string {
825
+ // If it is a credential tool, the progress and finish events may contain its output, which is sensitive, so we don't return it.
826
826
if callCtx .ToolCategory == engine .CredentialToolCategory {
827
827
return ""
828
828
}
829
829
830
- return * state . Continuation . Result
830
+ return content
831
831
}
832
832
833
833
func (r * Runner ) handleCredentials (callCtx engine.Context , monitor Monitor , env []string ) ([]string , error ) {
0 commit comments