sendEvent sends an event to the TUI, respecting context cancellation to avoid blocking on the channel when the consumer has stopped reading.
(ctx context.Context, event tea.Msg)
| 617 | // sendEvent sends an event to the TUI, respecting context cancellation to |
| 618 | // avoid blocking on the channel when the consumer has stopped reading. |
| 619 | func (a *App) sendEvent(ctx context.Context, event tea.Msg) { |
| 620 | select { |
| 621 | case a.events <- event: |
| 622 | case <-ctx.Done(): |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | // processInlineAttachment handles content that is already in memory (e.g. pasted |
| 627 | // text). The content is appended to textBuilder wrapped in an XML tag for context. |
no outgoing calls
no test coverage detected