feat(tui): Task 3.5 — decode + render router.narration as bright narration_llm lines
Add TypeRouterNarration constant, mark it event-bearing, decode golden test,
applyServer case appending RouterEntry{Role:"narration_llm"} with metrics, and
routerRows render branch showing bright ◆ prefix with FgStrong content + metrics suffix.
This commit is contained in:
@@ -92,6 +92,12 @@ func (m *Model) applyServer(msg protocol.ServerMessage) {
|
||||
switch msg.Type {
|
||||
case protocol.TypeSessionAnnounced:
|
||||
m.onSessionAnnounced(msg)
|
||||
case protocol.TypeRouterNarration:
|
||||
entry := RouterEntry{Role: "narration_llm", Content: msg.Content}
|
||||
if msg.LatencyMs != nil && msg.TotalTokens != nil {
|
||||
entry.Metrics = &TurnMetrics{LatencyMs: *msg.LatencyMs, TotalTokens: *msg.TotalTokens}
|
||||
}
|
||||
m.appendRouter(msg.SessionID, entry)
|
||||
case protocol.TypeChatTurn:
|
||||
m.routerConnected = true
|
||||
role := "router"
|
||||
|
||||
Reference in New Issue
Block a user