(cmd *cobra.Command, messages []AgentChannelMessageRecord)
| 399 | } |
| 400 | |
| 401 | func writeAgentChannelMessages(cmd *cobra.Command, messages []AgentChannelMessageRecord) error { |
| 402 | mode, err := resolveOutputFormat(cmd) |
| 403 | if err != nil { |
| 404 | return err |
| 405 | } |
| 406 | if mode == OutputJSONL { |
| 407 | for _, message := range messages { |
| 408 | if err := writeJSONLine(cmd, message); err != nil { |
| 409 | return err |
| 410 | } |
| 411 | } |
| 412 | return nil |
| 413 | } |
| 414 | return writeCommandOutput(cmd, agentChannelMessagesBundle(messages)) |
| 415 | } |
| 416 | |
| 417 | func agentMeBundle(record AgentMeRecord) outputBundle { |
| 418 | return outputBundle{ |
no test coverage detected