InjectUserMessage feeds content into the app exactly as if the user had typed and submitted it in the TUI. It is the entry point external drivers (the --listen control plane) use to send follow-up prompts: routing through the normal SendMsg path means the message is queued when the agent is busy, tr
(ctx context.Context, content string)
| 752 | // SendMsg is a TUI message, not a runtime.Event, so SSE subscribers (which |
| 753 | // forward only runtime.Events) ignore it; it reaches the TUI program alone. |
| 754 | func (a *App) InjectUserMessage(ctx context.Context, content string) { |
| 755 | a.sendEvent(ctx, messages.SendMsg{Content: content}) |
| 756 | } |
| 757 | |
| 758 | // SubscribeWith subscribes to app events using a custom send function. |
| 759 | // Multiple concurrent subscribers are supported: a single fan-out goroutine |