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

Method EmitAgentInfo

pkg/runtime/runtime.go:1455–1467  ·  view source on GitHub ↗

EmitAgentInfo implements [Runtime.EmitAgentInfo]: it refreshes the agent and team display without touching toolset discovery.

(ctx context.Context, events EventSink)

Source from the content-addressed store, hash-verified

1453// EmitAgentInfo implements [Runtime.EmitAgentInfo]: it refreshes the agent and
1454// team display without touching toolset discovery.
1455func (r *LocalRuntime) EmitAgentInfo(ctx context.Context, events EventSink) {
1456 a := r.CurrentAgent()
1457 if a == nil {
1458 return
1459 }
1460 r.emitAgentAndTeamInfo(ctx, a, func(event Event) bool {
1461 if ctx.Err() != nil {
1462 return false
1463 }
1464 events.Emit(event)
1465 return true
1466 })
1467}
1468
1469// EmitStartupInfo emits initial agent, team, and toolset information for immediate sidebar display.
1470// When sess is non-nil and contains token data, a TokenUsageEvent is also emitted so that the

Callers

nothing calls this directly

Calls 4

CurrentAgentMethod · 0.95
emitAgentAndTeamInfoMethod · 0.95
ErrMethod · 0.65
EmitMethod · 0.65

Tested by

no test coverage detected