This commit is contained in:
afjcjsbx 2026-03-13 18:45:51 +01:00
parent 950b373e2b
commit a7756e2a1c

View file

@ -202,9 +202,19 @@ func TestParseSteeringMode(t *testing.T) {
// --- AgentLoop steering integration tests ---
func TestAgentLoop_Steer_Enqueues(t *testing.T) {
al, _, _, _, cleanup := newTestAgentLoop(t)
al, cfg, msgBus, provider, cleanup := newTestAgentLoop(t)
defer cleanup()
if cfg == nil {
t.Fatal("expected config to be initialized")
}
if msgBus == nil {
t.Fatal("expected message bus to be initialized")
}
if provider == nil {
t.Fatal("expected provider to be initialized")
}
al.Steer(providers.Message{Role: "user", Content: "interrupt me"})
if al.steering.len() != 1 {
@ -218,9 +228,19 @@ func TestAgentLoop_Steer_Enqueues(t *testing.T) {
}
func TestAgentLoop_SteeringMode_GetSet(t *testing.T) {
al, _, _, _, cleanup := newTestAgentLoop(t)
al, cfg, msgBus, provider, cleanup := newTestAgentLoop(t)
defer cleanup()
if cfg == nil {
t.Fatal("expected config to be initialized")
}
if msgBus == nil {
t.Fatal("expected message bus to be initialized")
}
if provider == nil {
t.Fatal("expected provider to be initialized")
}
if al.SteeringMode() != SteeringOneAtATime {
t.Fatalf("expected default mode one-at-a-time, got %v", al.SteeringMode())
}
@ -260,9 +280,19 @@ func TestAgentLoop_SteeringMode_ConfiguredFromConfig(t *testing.T) {
}
func TestAgentLoop_Continue_NoMessages(t *testing.T) {
al, _, _, _, cleanup := newTestAgentLoop(t)
al, cfg, msgBus, provider, cleanup := newTestAgentLoop(t)
defer cleanup()
if cfg == nil {
t.Fatal("expected config to be initialized")
}
if msgBus == nil {
t.Fatal("expected message bus to be initialized")
}
if provider == nil {
t.Fatal("expected provider to be initialized")
}
resp, err := al.Continue(context.Background(), "test-session", "test", "chat1")
if err != nil {
t.Fatalf("unexpected error: %v", err)