X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/d7bc0a6ac452bfc646610fdfd7c8eccb5c55218f..9346d20fe4297dce1aa16171749a7ef3e41ce7bd:/turn.go?ds=inline diff --git a/turn.go b/turn.go index 01d6b7b..4652321 100644 --- a/turn.go +++ b/turn.go @@ -285,10 +285,11 @@ func (l *TurnLoop) Flush(ctx context.Context) error { return l.memory.Flush(ctx) } -// Run runs a turn each time user messages or reports wait, until ctx ends. It -// returns the error of a failed log write, which stops the agent. At its start -// it resumes the subagents that a stop of the daemon cut, and at its end it -// ends the runs of the subagents and waits for them. +// Run starts a turn when user messages, reports, or queued external events +// wait, until ctx ends. It returns the error of a failed log write, which stops +// the agent. External events enter memory only between chains. At its start it +// resumes the subagents that a stop of the daemon cut, and at its end it ends +// the runs of the subagents and waits for them. func (l *TurnLoop) Run(ctx context.Context) error { defer l.runs.Close()