]> git.giacomolli.uk - onechat/blobdiff - daemon_start_helper_test.go
Show an input prompt while the agent is idle
[onechat] / daemon_start_helper_test.go
index 8ed36e990e2f9b34121f6870b7053af66ce324fc..81399ce3ca3c3548d815bd52294723e58863d6c3 100644 (file)
@@ -50,9 +50,10 @@ func daemonStartTestWithSchedules(t *testing.T, server *ModelFake, bot *Telegram
        client := newModelClient(server.URL, ModelAPIKey(modelTestKey), agent.CacheKey(), filepath.Join(agent.dir, "usage.jsonl"))
        ctx, cancel := context.WithCancel(t.Context())
        done := make(chan error)
        client := newModelClient(server.URL, ModelAPIKey(modelTestKey), agent.CacheKey(), filepath.Join(agent.dir, "usage.jsonl"))
        ctx, cancel := context.WithCancel(t.Context())
        done := make(chan error)
+       subagents := newTestSubagents(t)
        go func() {
                done <- daemonServe(ctx, listener, bot, whatsapp, schedules, func(notify func(Event)) (*TurnLoop, error) {
        go func() {
                done <- daemonServe(ctx, listener, bot, whatsapp, schedules, func(notify func(Event)) (*TurnLoop, error) {
-                       return newTurnLoop(agent, memory, newTestSubagents(t), whatsapp, schedules, client, clock, discardLog(), notify)
+                       return newTurnLoop(agent, memory, subagents, whatsapp, schedules, client, clock, discardLog(), notify)
                })
        }()
 
                })
        }()