Run starts the agent's interaction loop and returns the final messages
(ctx context.Context, sess *session.Session)
| 313 | |
| 314 | // Run starts the agent's interaction loop and returns the final messages |
| 315 | func (r *RemoteRuntime) Run(ctx context.Context, sess *session.Session) ([]session.Message, error) { |
| 316 | eventsChan := r.RunStream(ctx, sess) |
| 317 | |
| 318 | for event := range eventsChan { |
| 319 | if errEvent, ok := event.(*ErrorEvent); ok { |
| 320 | return nil, fmt.Errorf("%s", errEvent.Error) |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | return sess.GetAllMessages(), nil |
| 325 | } |
| 326 | |
| 327 | // Steer enqueues a user message for mid-turn injection into the running |
| 328 | // agent loop on the remote server. |
nothing calls this directly
no test coverage detected