Steer enqueues a user message for urgent mid-turn injection into the running agent loop. The message will be picked up after the current batch of tool calls finishes but before the loop checks whether to stop.
(ctx context.Context, msg QueuedMessage)
| 1779 | // running agent loop. The message will be picked up after the current batch |
| 1780 | // of tool calls finishes but before the loop checks whether to stop. |
| 1781 | func (r *LocalRuntime) Steer(ctx context.Context, msg QueuedMessage) error { |
| 1782 | if !r.steerQueue.Enqueue(ctx, msg) { |
| 1783 | return errors.New("steer queue full") |
| 1784 | } |
| 1785 | return nil |
| 1786 | } |
| 1787 | |
| 1788 | // FollowUp enqueues a message to be processed after the current agent turn |
| 1789 | // finishes. Unlike Steer, follow-ups are popped one at a time and each gets |