Skip to main content

Module prompt

Module prompt 

Source
Expand description

Core agentic prompt loop used by Session::prompt.

This is the non-streaming, non-event-emitting variant. It loads the provider registry from Vault, runs the completion/tool-call loop up to max_steps times, and returns the final plain-text answer.

The code here was extracted from src/session/mod.rs verbatim to keep the Session facade small and keep the loop’s behavior stable. Refinements to the loop should be made here (and mirrored in prompt_events where appropriate).