diff --git a/fs/types.go b/fs/types.go index 779ff63..ffc6b94 100644 --- a/fs/types.go +++ b/fs/types.go @@ -290,6 +290,10 @@ func NewEventHandler(as *AgentLog) agent.EventHandler { case "call": if streamingRole != "" { + if streamingFence != "" { + as.AppendLog([]byte("\n" + streamingFence + "\n")) + streamingFence = "" + } as.AppendLog([]byte("\n" + format.EndTag + "\n")) streamingRole = "" } @@ -297,6 +301,10 @@ func NewEventHandler(as *AgentLog) agent.EventHandler { default: if streamingRole != "" { + if streamingFence != "" { + as.AppendLog([]byte("\n" + streamingFence + "\n")) + streamingFence = "" + } as.AppendLog([]byte("\n" + format.EndTag + "\n")) streamingRole = "" }