MCPcopy
hub / github.com/docker/docker-agent / sendEvent

Method sendEvent

pkg/app/app.go:619–624  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

617// sendEvent sends an event to the TUI, respecting context cancellation to
618// avoid blocking on the channel when the consumer has stopped reading.
619func (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.

Callers 7

RunSkillForkMethod · 0.95
RunMethod · 0.95
processFileAttachmentMethod · 0.95
RetryMethod · 0.95
RunWithMessageMethod · 0.95
InjectUserMessageMethod · 0.95
CompactSessionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected