executeUserFollowupSubmitHooks fires user_followup_submit each time the runtime dequeues a follow-up message at the end of a turn and starts a fresh turn for it. Follow-ups are user messages queued for end-of-turn processing (the FollowUp API / queue), distinct from mid-turn steering. It mirrors use
(ctx context.Context, sess *session.Session, a *agent.Agent, prompt string, events EventSink)
| 591 | // returned as a transient system message that the caller threads into |
| 592 | // the follow-up turn only — never persisted. |
| 593 | func (r *LocalRuntime) executeUserFollowupSubmitHooks(ctx context.Context, sess *session.Session, a *agent.Agent, prompt string, events EventSink) (stop bool, message string, contextMsgs []chat.Message) { |
| 594 | result := r.dispatchHook(ctx, a, hooks.EventUserFollowupSubmit, &hooks.Input{ |
| 595 | SessionID: sess.ID, |
| 596 | Prompt: prompt, |
| 597 | }, events) |
| 598 | if result == nil { |
| 599 | return false, "", nil |
| 600 | } |
| 601 | if !result.Allowed { |
| 602 | return true, result.Message, nil |
| 603 | } |
| 604 | return false, "", contextMessages(result) |
| 605 | } |
| 606 | |
| 607 | // executePreCompactHooks fires pre_compact just before compaction. |
| 608 | // The trigger reason ("manual", "auto", "overflow", "tool_overflow") |
no test coverage detected