X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/38a9b0502a1ccefc6ccb3472c4a21805b222caa6..0a98ccb67c3df55c0fe6d76b45afcbaa58c2eda1:/turn.go?ds=sidebyside diff --git a/turn.go b/turn.go index c6ab5e9..837ac7c 100644 --- a/turn.go +++ b/turn.go @@ -10,9 +10,9 @@ import ( ) // newTurnLoop returns the loop of agent with its memory, its subagents, and the -// WhatsApp link of its tools. Its calls go through client, and notify gets each -// event. The clock gives the date of a turn. -func newTurnLoop(agent *Agent, memory *Memory, subagents *Subagents, whatsapp *WhatsApp, client ChainClient, clock func() time.Time, notify func(Event)) (*TurnLoop, error) { +// WhatsApp link and the schedules of its tools. Its calls go through client, +// and notify gets each event. The clock gives the date of a turn. +func newTurnLoop(agent *Agent, memory *Memory, subagents *Subagents, whatsapp *WhatsApp, schedules *Schedules, client ChainClient, clock func() time.Time, notify func(Event)) (*TurnLoop, error) { layout, err := loadViewLayout(filepath.Join(agent.dir, viewLayoutFileName)) if err != nil { return nil, err @@ -48,6 +48,7 @@ func newTurnLoop(agent *Agent, memory *Memory, subagents *Subagents, whatsapp *W subagents: subagents, runs: l.runs, whatsapp: whatsapp, + schedules: schedules, workdir: agent.config.Workdir, }