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

Method Run

pkg/runtime/loop.go:963–971  ·  view source on GitHub ↗

Run executes the agent loop synchronously and returns the final session messages. This is a convenience wrapper around RunStream for non-streaming callers.

(ctx context.Context, sess *session.Session)

Source from the content-addressed store, hash-verified

961// messages. This is a convenience wrapper around RunStream for non-streaming
962// callers.
963func (r *LocalRuntime) Run(ctx context.Context, sess *session.Session) ([]session.Message, error) {
964 events := r.RunStream(ctx, sess)
965 for event := range events {
966 if errEvent, ok := event.(*ErrorEvent); ok {
967 return nil, fmt.Errorf("%s", errEvent.Error)
968 }
969 }
970 return sess.GetAllMessages(), nil
971}
972
973// computeMessageCost returns the USD cost of a single model response,
974// or nil when the response cannot be priced. It is nil when there is

Callers

nothing calls this directly

Calls 2

RunStreamMethod · 0.95
GetAllMessagesMethod · 0.80

Tested by

no test coverage detected