]> git.giacomolli.uk - onechat/blobdiff - subagent_run.go
Name subtests for the behavior they prove
[onechat] / subagent_run.go
index 3df12ce74483725ed8d97883f938cd99bff175fc..1da858890c7992707dfed02e96b1ee36aedfeb33 100644 (file)
@@ -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
 // 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
 //
 // 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
 }
 
        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))...),
 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)
 }
 
        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()
 func (r *SubagentRuns) take(run *SubagentRun) []Message {
        r.mutex.Lock()
        defer r.mutex.Unlock()