p9: remove newline event handling; reset assistantStarted on user event
Drop formatEvent "newline" case (event no longer emitted). Reset assistantStarted on "user" event instead so chained turns get the "assistant: " prefix correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b9509a0961
commit
6527f243c5
|
|
@ -1354,8 +1354,6 @@ func formatEvent(ev agent.Event) []byte {
|
|||
return []byte("agent stalled\n")
|
||||
case "info":
|
||||
return []byte(ev.Content)
|
||||
case "newline":
|
||||
return []byte("\n")
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ func (s *SessionFileStore) makePublish() func(agent.Event) {
|
|||
assistantStarted := false
|
||||
return func(ev agent.Event) {
|
||||
switch ev.Role {
|
||||
case "call", "tool", "newline":
|
||||
case "user", "call", "tool":
|
||||
assistantStarted = false
|
||||
case "assistant":
|
||||
if !assistantStarted {
|
||||
|
|
|
|||
Reference in New Issue