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:
Levi Neely 2026-04-19 21:01:11 +02:00
parent b9509a0961
commit 6527f243c5
2 changed files with 1 additions and 3 deletions

View File

@ -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
}

View File

@ -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 {