MCPcopy Index your code
hub / github.com/docker/docker-agent / appendSteerAndEmit

Method appendSteerAndEmit

pkg/runtime/loop.go:60–63  ·  view source on GitHub ↗

appendSteerAndEmit adds a steer message to the session and emits the corresponding event.

(sess *session.Session, sm QueuedMessage, events EventSink)

Source from the content-addressed store, hash-verified

58
59// appendSteerAndEmit adds a steer message to the session and emits the corresponding event.
60func (r *LocalRuntime) appendSteerAndEmit(sess *session.Session, sm QueuedMessage, events EventSink) {
61 sess.AddMessage(session.UserMessage(sm.Content, sm.MultiContent...))
62 events.Emit(UserMessage(sm.Content, sess.ID, sm.MultiContent, len(sess.Messages)-1))
63}
64
65// drainAndEmitSteered drains all messages from the steer queue and injects
66// them into the session as individual user messages. When multiple messages

Callers 1

drainAndEmitSteeredMethod · 0.95

Calls 4

UserMessageFunction · 0.92
UserMessageFunction · 0.70
AddMessageMethod · 0.65
EmitMethod · 0.65

Tested by

no test coverage detected