]> git.giacomolli.uk - onechat/blobdiff - subagent_run_test.go
Move whatsapp_find to its own file
[onechat] / subagent_run_test.go
index 647b7adbefdb03a53b5fd44cfcd6e2712b1916f5..9b8b8c5b8279b43c8369a1b26d2856c45e9e7ffa 100644 (file)
@@ -516,7 +516,8 @@ func subagentTestStart(t *testing.T, agent *Agent, server *ModelFake, events *Tu
 
        subagents := newSubagents(filepath.Join(agent.dir, subagentDirName), clock.Now, subagentNameRandom)
        client := newModelClient(server.URL, ModelAPIKey(modelTestKey), agent.CacheKey(), filepath.Join(agent.dir, "usage.jsonl"))
 
        subagents := newSubagents(filepath.Join(agent.dir, subagentDirName), clock.Now, subagentNameRandom)
        client := newModelClient(server.URL, ModelAPIKey(modelTestKey), agent.CacheKey(), filepath.Join(agent.dir, "usage.jsonl"))
-       loop, err := newTurnLoop(agent, memory, subagents, client, clock.Now, events.Add)
+       whatsapp, _, _ := whatsappStartTest(t, t.TempDir(), clock)
+       loop, err := newTurnLoop(agent, memory, subagents, whatsapp, client, clock.Now, events.Add)
        require.NoError(t, err)
 
        ctx, cancel := context.WithCancel(t.Context())
        require.NoError(t, err)
 
        ctx, cancel := context.WithCancel(t.Context())