X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/80e348724041a694002fc38f57e8868b9b9a2be9..496569ab5b179932c60b2924bf4c61176c8be004:/subagent_run.go diff --git a/subagent_run.go b/subagent_run.go index 3df12ce..1da8588 100644 --- a/subagent_run.go +++ b/subagent_run.go @@ -53,8 +53,8 @@ var errSubagentClosed = errors.New("the daemon stops, so no subagent starts") // work.json in the directory of the agent holds the names of the running // subagents. Each start and each end of a run writes it whole, but Close does // not, so after a stop of the daemon it names the runs that the stop cut, and -// Resume goes on with them. The logs alone cannot tell this, because a stop -// can cut a run just after its final reply. +// Resume goes on with them. The logs alone cannot tell this, because a stop can +// cut a run just after its final reply. // // Spawn and Tell split the view with the layout of the agent, which has no // lock. They are tools, so they run in the goroutine of the turns, as each @@ -418,8 +418,8 @@ func (r *SubagentRuns) load() ([]string, error) { return file.Running, nil } -// save writes the names of the running subagents to work.json. The caller -// holds the mutex. +// save writes the names of the running subagents to work.json. The caller holds +// the mutex. func (r *SubagentRuns) save() error { file := SubagentWorkFile{ Running: append([]string{}, slices.Sorted(maps.Keys(r.running))...), @@ -558,8 +558,8 @@ func (r *SubagentRuns) chain(ctx context.Context, run *SubagentRun) (string, err return chain.Run(ctx, input) } -// take returns the messages of Tell that wait for a request of run, and -// removes them. +// take returns the messages of Tell that wait for a request of run, and removes +// them. func (r *SubagentRuns) take(run *SubagentRun) []Message { r.mutex.Lock() defer r.mutex.Unlock()