Skip to main content

start

Function start 

Source
pub async fn start(
    store: &Chats,
    cfg: &Config,
    repo: PathBuf,
    idea: &str,
    agent: Option<&str>,
    from: Option<&Chat>,
) -> Result<Chat>
Expand description

Open a conversation and take the first agent turn.

The record is written to disk before the agent is invoked, so an agent that fails on the very first turn still leaves the operator a conversation they can look at, retry into, or abandon - rather than nothing at all. See open and first_turn, which this composes; POST /api/chats calls them separately instead so it can answer before the first turn lands.